We have a domain served by CloudFront and now we need to add a reverse proxy using Nginx (unfortunately the reverse proxying capabilities of CloudFront are insufficient for our use case). My question is, where should we put this Nginx server?
- Before CloudFront - In this case my fear is that we are completely loosing the benefits of the CDN. The entrypoint is Nginx which means we can't leverage the edge computing caching and improved latency of CloudFront, am I right?
- After CloudFront (as an origin) - In this case CloudFront is still the entrypoint and Nginx will be an origin server that performs reverse proxying. Using this configuration, are we still benefiting of CloudFront edge caching and improved latency?
Any other possible solution?