Database Load Balancing with Propel 1.2
November 20th, 2008
Alvaro
Published in
Symfony, Technology | 2 Comments
For one of our projects we have load balanced database servers. We needed to have a way to reflect that in our project code which is written using symfony 1.0. The problem was that symfony 1.0 came by default with Propel 1.2, so our database code was targeted to that version of Propel -version 1.3 supports loadbalancing out of the box-.
For the development environment this represented no problem, but when we faced the deployment to production we needed a way to support loadbalancing with Propel 1.2. After some research we decided to create our own loadbalancer plugin for symfony.
We have been testing it live and is performing good so far.
The good news is that we released the plugin as open source so you can go and get it from the symfony website. There we provided a README with the instructions to set up the plugin.
As for the inner workings of the plugin, what it does is override the symfony default Peer builder to add the loadbalance support. Then the database connection for the slaves are specified in the normal database.yml file, so there is no learning curve on the usage of the plugin.
If you want more details on the implementation just drop a line on the comments and we can write a small tutorial about it.









November 20th, 2008 at 11:08 am (#)
[...] For the development environment this represented no problem, but when we faced the deployment to production we needed a way to support loadbalancing with Propel 1.2. After some research we decided to create our own loadbalancer plugin … Original post [...]
December 1st, 2008 at 12:09 am (#)
[...] Database Load Balancing with Propel 1.2 [...]