Jump to content

How to do load balancing in PHP?


shah_ankitb

Recommended Posts

I think the major browsers tell which one to load first.

 

1. Style & Lightweight HTML code

3. JavaScript / Ajax / -Something else-

2. Images / Other larger files / Flash / Videos

 

See more

http://stackoverflow.com/questions/1795438/load-and-execution-sequence-of-a-web-page
Edited by Mudsaf
Link to comment
Share on other sites

Load balancing is when you have multiple servers and you try to send the same number of requests to each server so that any one server does not become overloaded. If that's what you're trying to do, the actual load balancing has nothing to do with PHP, that is accomplished with network hardware (a load balancer) that decides where to send each request. The concurrency issues that you may deal with are making sure that the databases that each server uses are synchronized (probably using a database cluster), and making sure that each server saves session information in the same location so that no matter which server a request goes to it will find the same session. Some load balancers work per-client, so that it will always send a certain client to the same server. In that case you don't need to worry about the session issue.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...