title: Set timeout for request to my server
body: <ol>
  <li>I want that all requests to my server will get response in 2 seconds.</li>
  <li>If my server have an issue (for example: it's turned off), the user will get an error response after 2 seconds.</li>
  </ol>
  
  <p>The status now is that if there is an issue in my server, the user and browser, try for long time to connect. I don't want this.</p>
  
  <p>Currently I am not using any load-balance or CDN.</p>
  
  <p>Sometimes my server fall down. I don't want my users to wait forever for response, and hangout the browser.</p>
  
  <p>I Think that load balance service OR CDN can help.</p>
  
  <p>What I want it that after 2 seconds, the service before my server will return default error message.</p>
  
  <p>Which service can handle it for me?
  I checked out CloudFront and CloudFlare, and didn't found something like that.</p>
  
  <p>More info:
  1. Cache cannot help, because my server return different results for every request.
  2. I cannot use async code.</p>
  
  <p>Thank you.</p>