Question about load balancing

Discussion in 'General' started by doniking, Mar 3, 2008.

  1. doniking

    doniking New Member

    Hello,

    How to synchronize the contents between webserver 1 and 2 if they are placed behind a load balancer?

    Thanks.
  2. Dani

    Dani New Member


    what content exactly? sessions, cookies, page content...? The probable answer is that you have to maintain a sync between the servers in some way. load balancer should only take care of the 'load' hence the name. Meaning it sends you to the server with the less load, the rest is up to you and your coding.
  3. doniking

    doniking New Member

    I mean the page content.
    Let say, the load balancer send a user to web 1, and he upload a file maybe
    a picture and save it to a folder on web 1. How to make web 2 do the same task like what the PHP script on web 1 does?
  4. Dani

    Dani New Member

    either have the upload script distribute the file on all servers when a new file is recieved, or have a common folder for those files that are uploaded using nfs (file sharing) which both servers read and write to...
  5. mistwang

    mistwang LiteSpeed Staff

    That's correct. You can either store the file in a shared folder, or use some synchronization technologies, like rsync, etc.
  6. doniking

    doniking New Member

    Thanks for your clue, guys!

Share This Page