Hi all, I wanted to know is it possible to sync files in production server in way that the page request in process while file uploading should not go down (rather should show old files for same), once files uploaded should show the new files, something like publishing files in IIS. Is there any solution for such scenario
I asked a similar question here http://forums.digitalpoint.com/showthread.php?t=1901391 you can install squid reverse server with "stale-while-revalidate"
Hi, sorry for such a delayed reply. I read your thread, but that is not what i m looking for. Below is the scenario A browser requests index.php on my server, at same time a developer is uploading a index.php on server, the browser will see some PHP error like $end - blah blah. I wanted to know whether there is any solution where this scenario just wont arrive, by this i mean. say a apache module is there to which somehow we notify the we have a updated file for index.php, now this modules checks if a request for this file is being processed dont replace it wait till this request is served and also queue all future request for this page till we replace it, once request served (if any) we replace file and serve all queued request, something like this i m trying my best to explain scenario, i hope you all can understand
Hi, Maybe you should only work on you test server, and commit your code on your production server less often. You can set your site offline before commiting your code and of course it's better to do this when they are the less connection as possible.
Thanks Gan-Yoshi, I currently resort to that method only, but i keep thinking how does all these enterprise level servers handle this scenario, where they cant bear a seconds downtime or showing such errors on screen (E.G. facebook, youtube , given they have lots of datacenters but when they update files do divert traffic to other servers)
No-one has an answer because it's an issue that's unlikely to affect anyone else. Uploading a small file to a server takes such a short time that it isn't an issue for anyone, and no-one changes their site files THAT often for it to ever become a problem. If, as "Gan-Yoshi" suggests might be happening, you're uploading development files, checking for errors (or finding errors), then uploading a new version, checking that's OK, then doing more development, uploading to the server, checking for errors...etc etc then you are a fool to yourself. Live sites and servers are not development platforms. Code should be tested in a development environment BEFORE it's loaded to the server. Raw code can contain loops and all sorts of CPU and Disk I/O intensive processes which needs to be sorted before it goes anywhere near a live site or server because they could easily take the server down or cause it some serious problem. We have clauses in our terms that allow us to terminate an account that uses our shared servers as a testing environment i.e. in circumstance where we see multiple copies of the same file being uploaded over a relatively short period of time where development is obviously happening "on the hoof". No code is absolutely perfect and some tweaks might be necessary once a site goes live, but all of the serious issues should have been found first and any changes to a site on a live server should be minimal; certainly not enough to cause the type of problem you are experiencing.
Hi RonBrown, I would like to iterate i do that only what you said. But as i gave example of facebook, where i dont think they deployed hiphop in a minute (and it is not small file), obviously there must some strategy they do it to most of their servers without much of a downtime (not a facebook user to know that though, assumed it.) I just thought there should have been a way, if there is no way i can understand, just to add if people here think i m some .NET developer trying to prove its superiority or something sorry to disappoint you all i m not, i just thought something similar to that should have to be available may at enterprise level and not free, but it does not exists i still cant believe, some strategy has to be there to do what i said without downtime (No downtime is my goal)