简体   繁体   中英

IIS 7.5 Custom 503 error page

I have a site using asp.net and WebAPI deployed on IIS 7.5. Normal site usage is steady but occasionally there are bursty spikes with very high usage and users get very slow response timeouts. There is no option to improve performance at this time and the client has asked for a quick fix involving a customised 503 error page with the same look as the rest of the site.

The single IIS server sits behind a load balancer and there is the option of adding a 2nd server purely to serve a static error page when the site is under heavy load. There has been a suggestion of a solution where slow responses trigger all subsequent requests go to the static server and get the custom 503 error page until the usage subsides.

As far as I can see its not possible to customise the default 503 error page that is served automatically by IIS when its request queue is full.

I can't see anything on SO about how to solve this sort of issue - can anyone help?

Load balancers use probes to check if a node is operational. One possible solution is to make your own probe that checks if load on a node has reached defined threshold. If so then the probe (your probe) would return HTTP 500 to load balancer. If load balancer receives this error code from probe then it will not forward requests to this node. When threshold is not reached then the probe would return HTTP 200.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM