title: Load balancing on wordpress - 2 LAP web servers 1 Mysql DB - How?
body: <p>Here is the problem: my client wants to setup a load-balancing wordpress server to handle the increasing number of visitors.</p>
  
  <p>2 Web servers will have setting below:</p>
  
  <ul>
  <li>Load balancer x 1</li>
  <li>Server #1: Linux, Apache, PHP 5, Wordpress 3.8.1</li>
  <li>Server #2: Linux, Apache, PHP 5, Wordpress 3.8.1</li>
  <li>Server #3: Linux, MySQL</li>
  </ul>
  
  <p>Load balancer will direct traffic to web server #1, and #2, and #1 and #2 will connect to #3 MySQL to get information.</p>
  
  <p>Notes: </p>
  
  <ul>
  <li>It is a must, so no need to consider another "Wordpress performance enhancement" solution.</li>
  <li>I understand that it will also has single point of failure, but it is fine.  My client just wants that.</li>
  </ul>
  
  <p>My questions:</p>
  
  <ol>
  <li>I will change the wp-config.php file to point to #3 database.  Is it ok?  Are there any potential problem?</li>
  <li>I will also mount the /upload directory to share by two web servers, both writable.  Is it fine?</li>
  <li>Session problem: how to share session between wordpress?  Somewhere on the web I read that the /tmp folder should be shared also, is it true?  If I want to save session to database, will it also work?</li>
  <li>Apart from the questions above, did I miss other steps that are critical to success?  What should I pay attention to also?</li>
  </ol>
  
  <p>Thanks in advance for your help.  All other result on the web are just using rackspace, AWS and other service, which is not what I need.</p>