# Serve different static page depending of the server load

**URL:** <https://www.ruby-forum.com/t/serve-different-static-page-depending-of-the-server-load/226845>\
**Category:** NGINX\
**Created:** [February 22, 2013, 9:22pm UTC](https://www.ruby-forum.com/t/serve-different-static-page-depending-of-the-server-load/226845 "2013-02-22T21:22:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SSFrSSdSSric\_Bastie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e79b87/32.png) [@SSFrSSdSSric\_Bastie](https://www.ruby-forum.com/u/SSFrSSdSSric_Bastie)\
**Post date:** [February 22, 2013, 9:22pm UTC](https://www.ruby-forum.com/t/serve-different-static-page-depending-of-the-server-load/226845/1 "2013-02-22T21:22:48Z")

</div>

Hi,

We are planning releasing a new web site shortly and we try to get  
slash-dotted.

Our website is hosted with nginx, but I currently set the images of the  
main page on amazon S3 as it won’t be able to serve them if we get  
slash-dotted as planned.

To lower our cost, is there a way to tell nginx to serve for index.html  
another file like index\_local.html file when the load of the server is  
low  
and to serve index\_aws.html when the load is high?

index\_local.html would contain URL for images and an applet to the same  
nginx file server but index\_aws.html will set URL for them to S3.

If that is not possible, is there another way to do that? I don’t want  
to  
manually do the switch as we never know when the crowd come.

thanks

Frdric
