Load Balancing, Syncing, Caching

Permalink 1 user found helpful
I currently have the latest version of Concrete5(5.4.1) installed on a Windows Server 2008r2 machine with IIS7.5 PHP5.x and MySQL. WinCache is installed and configured. Performance so far has been great, but I need configure load balancing. So here are a few questions. Hopefully someone here has dealt with this previously.

1. Does Concrete5 support running on identical servers behind a Network Load Balancer using the same DB?

2. If so what is the best way to synchronize core files/php code/blocks?

3. What is the best way to handle syncing of uploaded files? Store them all in the same place using virtual directories? Do some sort of file comparison and then sync them?

4. What about caching? Will there be any discrepancies between servers?

5. How will AJAX requests be handled? Will they just work or will there need to be special considerations?

Any insights?

 
jordanlev replied on at Permalink Best Answer Reply
jordanlev
My experience with this is not specific to Concrete5, but I have run wordpress and drupal installations on load-balanced windows servers with a common database.

1) Sharing a database is no problem at all -- but obviously there can only be 1 database so put that on a different machine than the web servers. Then just have every c5 installation use the same database connection information.

2) For files, see below. For all other content, it's in the database -- and since there will only be one database that the multiple web servers all talk to, this isn't a problem.

3) Syncing uploaded files can theoretically be done using virtual directories, BUT I remember running into a lot of problems with this (can't remember what the specifics were -- it may have been something specific to wordpress, but maybe not), and we wound up using a file synchronization program instead, which worked perfectly (of course I don't remember the name of this program either, but it was definitely something we paid for, not shareware or built in to windows).

4) You'll need to enable "sticky sessions" on the load balancer, which ensures that visitors are always sent to the same server they originally went to. This is true for any web application that stores session data on the server (as opposed to the database).

5) Nothing special about ajax requests -- they don't look any different to the server than normal browser requests.

HTH!

-Jordan