Publish Files to production server

Discussion in 'Site & Server Administration' started by sudesh_poojari, Aug 10, 2010.

  1. #1
    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
     
    sudesh_poojari, Aug 10, 2010 IP
  2. DoDo Me

    DoDo Me Peon

    Messages:
    2,257
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #2
    DoDo Me, Aug 11, 2010 IP
  3. sudesh_poojari

    sudesh_poojari Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    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
     
    sudesh_poojari, Aug 16, 2010 IP
  4. Gan-Yoshi

    Gan-Yoshi Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    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.
     
    Gan-Yoshi, Aug 17, 2010 IP
  5. sudesh_poojari

    sudesh_poojari Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    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)
     
    sudesh_poojari, Aug 17, 2010 IP
  6. RonBrown

    RonBrown Well-Known Member

    Messages:
    934
    Likes Received:
    55
    Best Answers:
    4
    Trophy Points:
    105
    #6
    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.
     
    RonBrown, Aug 17, 2010 IP
  7. sudesh_poojari

    sudesh_poojari Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    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)
     
    sudesh_poojari, Aug 17, 2010 IP
  8. cloudy3

    cloudy3 Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    that's right!
     
    cloudy3, Aug 17, 2010 IP