Monday 24 January 2011 5:04:47 pm - 6 replies
when setting up a MySQL Master Slave Setup with the ini settings
I got an error, when the slave server is not reachable.
An unexpected error has occurred. Please contact the webmaster.
Unable to connect to the database server 'xxx.xxx.xxx.xxx:3306' in /var/www/releases/ezp44/lib/ezdb/classes/ezmysqldb.php on line 151
I think, it would be better, when eZ Publish is still reachable, when only the master server is running.
The start eZ setup:
2 nodes MySQL - one master, one slave
2 nodes eZ Publish with GlusterFS
2 nodes eZ Find
Modified on Monday 24 January 2011 5:05:30 pm by Ekkehard Dörre
Tuesday 25 January 2011 7:02:44 am
I agree that the DB handler really should fallback to the master configuration if the slave is not available.
For the time being we utilise Triple-M (http://mysql-mmm.org/) for handling failover events. We assign floating IPs to mysql services and then failover the slave IP to another machine (master if needed).
Tuesday 25 January 2011 10:59:43 am
mmm, we discussed this, more complexity, more possible errors is a nice thing for sites with many write requests, but for classical content sites with a lot of read requests and PHP sessions, a master with multiple slaves setup is still a good solution, but we should implement a better logic in eZ Publish.
I'll ask our customer, if they are willing to spend an eZ Enterprise Ticket on it, or we are looking deeper into mmm or the http://www.continuent.com cluster solution.
Tuesday 25 January 2011 1:46:35 pm
While I agree that having smarter management inside of ez of master-slave setups would be nice (especially since this setup is supported with recent versions of postgres and oracle too, so that once it is coded in eZ it should be available to every user at no cost), generally speaking I prefer to push this kind of problems down to the architecture layer.
In the ideal world eZ should not even know about a master/slave setup. Oracle rac does it native of course, but it costs a huge amount of money, uses a lot of resources and is a pain to setup. Recent developments in the mysqlnd php driver indicate that we might get transparent load-balancing out of the box in the near future. Not sure about postgres, maybe there are commercial solutions (tungsten ?) doing that today.
The reason i say eZ should not care about this is because every complex architecture deployment has different needs in term of backups, availability, failover, polling, monitoring etc... A robust, complete and flexible solution takes a lot of time to develop, test and maintain. And in pur oss style, why reinvent the wheel inside eZ, if it already exists elsewhere?
Tuesday 25 January 2011 2:14:38 pm
thanks for the hint, I'll give it to the system admin and
Gaetano, your are right with the perfect world approach, I forgot a blog post from Ulf Wendel: PHP: Transparent load balancing and sharding with mysqlnd http://blog.ulf-wendel.de/?p=298 this is a nice way.
You must be logged in to post messages in this topic!