-
Notifications
You must be signed in to change notification settings - Fork 823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent healthcheck from being cached #1205
Prevent healthcheck from being cached #1205
Conversation
Curious how you made your thumbor only respond to cloudfront. In order for CF to talk to your origin, it has to be publicly accessible. |
Using public load balancers and nginx, that re-route the requests to our applications in a private network. But back to the PR, I can't understand why Travis is failing to compile |
I think load balancers should check for service health and remove unhealthy service from pool. Doing it on cloudfront level seems weird. https://docs.nginx.com/nginx/admin-guide/load-balancer/http-health-check/ |
In terms of travis failure. It seems that travis is randomly deciding to run a test on ubuntu xenial instead of default trusty. I made a PR to fix it #1207 |
8c95acf
to
150c4e9
Compare
1 similar comment
Thank you @guilhermearaujo and @kkopachev! |
We run thumbor behind Cloudfront to cache the output images, without a direct, open route to the thumbor instances.
To monitor the application, we'd like to ping the health check route periodically, and since the only way for external tools to reach the server is going through Cloudfront, the health check route must no be cached.
This PR adds a cache control header with the
no-cache
policy to prevent Cloudfront (or whatever other service that may cache the result) from caching the response of the health check route.