amazon cloudfront - Set timeout for request to my server -
- I want all requests to my server to get feedback in 2 seconds.
- If there is a problem with my server (for example: it is closed), the user will get an error response after 2 seconds.
The situation is now that if there is a problem in my server, try to connect the user and the browser, for long time. I do not want to be.
Currently, I am not using any load-balance or CDN.
Occasionally my server collapses. I do not want to always wait for my users to respond, and hang out to the browser.
I think load balancing service or CDN can help.
I would like to return the default error message served to my server before 2 seconds.
Which service can handle it for me? I checked CloudFriday and Cloud Flare, and there was no such thing.
More information: 1. The cache can not help, because my server returns different results for each request. 2. I can not use async code.
Thank you.
You configure a 2 second timeout in CloudFront, but if you are not responding properly , You can configure it some error page (which you can host anywhere outside of your server).
Here's a look at:
Besides, these error responses have been cached (for how long you can specify that they will be cached), so the next user Will receive instant errors
Comments
Post a Comment