Updating *HEAVILY* Accessed HTML Web Page
Posted on 1997-12-30
I am planning on having hundred of thousands of hits on my web site; I am certain my web pages will be heavily accessed.
A problem I'm facing is the "hourly" updates to the web pages; Updates can be a one liner to the entire HTML page. My Hourly Bot uses a .BAK file of the present web page to create the NEW web page named: WEB_PAGE.tmp. Then it sits in a WHILE loop waiting for the RENAME function to rename (move) the WEB_PAGE.TMP file to the visible (what the client sees) WEB_PAGE.HTML.
Once the RENAME has succeeded, any new accesses to
WEB_PAGE.HTML will be faced with the NEW page. Great! But, if I have hundreds of thousands of users to the old page, the above WHILE loop will be in there forever!
Is there another way to somehow HALT/PAUSE the clients for a split seconds to copy over the old HTML file with the NEW one?? Or is my above method the best, most efficient way?!
Maybe I should pass all calls on my site to a CGI script which uses the status 302 LOCATION command to redirect the client to the proper page. This way, if the Hourly Bot posts a STOP SIGNAL this CGI script can take notice and "pause/halt" any new calls to an HTML page.
Please, any suggestions which can help me out of this dilema would be GREATLY APPRECIATED!