Re:Serverless Architecture – All you need to know about caching
by catlifeonmars on Sunday October 06, 2019 @02:26PM
(#21173838)
Proxy the calls to the external API via your own gateway. You’ll get better control over caching behavior, push complexity away from the client, and have more control over how you handle dependency failures. Also, you should load test lambda with expected traffic patterns to actually validate that container-based caching is insufficient. Dynamo also has good in-dc latency, with very good scaling behavior.
Re:Serverless Architecture – All you need to know about caching
by tayleeganj on Sunday October 06, 2019 @03:15PM
(#21174313)
interesting. yeah I'm definitely proxiying all API calls through my own gateway. and yeah I'll have to run some tests.
1. Call API with Lambda proxy with the access token stored as a global variable outside the handler. Would be reused but like article mentions not guaranteed and can miss often. 2. Store access token client side (cookie). This would require one call per client even if the access token already generated. 3. Store access token externally (S3 or secrets manager?). Latency would increase, but could be combined with #1.
Any other way to do this?