amazon cloudfront - Set timeout for request to my server -


  1. I want all requests to my server to get feedback in 2 seconds.
  2. 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

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -