Hi,
My website is sometimes faced with sudden rushes of visitors, which provoque a server crash, with an Error 503 Service Unavailable.
Is there a way to install a system to contain these overloads e.g. asking the visitors to come back later ?
Thanks by advance!
Max

Comments

Install a reverse proxy (Squid for example or Apache itself supports it) and in the configuration of the reverse proxy implement the following algorithm:
If your service or web site returns "Error 503 Service Unavailable" page, catch that page and then send users another "come back later" page!

My other recommendations read below:

1.
If you are a blogger who publishes his blogs from time to time to the internet why not to use plain old HTML static pages to serve static text and images and you will never face visit overloads.

2.
If you have a serious commercial site with business context for making money then there are lot's of options which needs you invest some money for hardware and services, some of them:
- choose the right hosting, use only dedicated servers, VPS or cloud hosting;
- optimize code, use only the needed;
- use native caching;
- use dedicated caching like Varnish;
- use load balancing and reverse proxy (Squid) with backup servers;