Reputation: 25
I have an API hosted on Elastic Beanstalk written in Node.js using nginx. I don't need an in-memory cache like ElasticCache provides. I just need the server to cache on disk the response when calls to my API are made. The reason is because the calls in my API make calls to a third-party API and they are expensive. The response from the third-parties are big in terms of file size.
Could you please help me figure out how I'd do it or if it's even possible?
Thanks.
Upvotes: 0
Views: 2256
Reputation: 13501
You could use beanstalk .config files to configure NGINX caching, see: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers.html http://nginx.com/resources/admin-guide/caching/
But it would probably be a better ideia to use CloudFront to cache content on the 50+ edge locations used by this service, thus requests that can be responded by the cache would not even hit your server.
Upvotes: 1