Question about load balancing

Dani

Well-Known Member
#2
Hello,

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

Thanks.

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
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?
 

Dani

Well-Known Member
#4
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?
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...
 

mistwang

LiteSpeed Staff
#5
That's correct. You can either store the file in a shared folder, or use some synchronization technologies, like rsync, etc.
 
Top