MySQL Replication Configuration

Author Message

Ted Prosser

Sunday 06 November 2005 4:25:37 am

I am trying to set up a secure eZ publish configuration with three servers and MySQL replication and rsync and I was hoping I could get some suggestions.

Currently, I have two front-line web servers for serving public requests. A load balancer alternates traffic between the two. The front line servers are set up to use a local MySQL slave database for reads and a non-public administrative server (the MySQL master) for writes. The admin server is the only box with an eZ admin web site, which is not public.

The front-line servers are getting constant database updates through MySQL replication. Rsync is set up to push out changes to /design, /var, and a few others, every 10 minutes or so. Cache folders are not set to synchronize.

The eZ pages seem to render properly on the front-line servers, but I have the following questions:

1) Do the the front-line display-site-only servers really need to be able to write to the eZ publish database at all? I would prefer not to allow this.

2) Would the display sites ever really need to make changes to /var that would need to get copied over to the other servers? Remember that these servers are never going to run the admin site and I don't intend to use eZ publish for anything more than displaying content (no commerce). It makes sense to me that database access in this case should be read-only. I would rather avoid the eZ clustering solution for rsync if I can (I try to avoid using "beta" versions and I want to keep things as simple as possible).

3) I experimented with setting up an array of MySQL slave databases, but I was disappointed to find that eZ publish appears to randomly choose a slave database for reads. When a MySQL connection attempt fails for whatever reason, it looks the page load simply fails. eZ does not appear to be smart enough to try a different slave server on a connection failure. This seems to defeat the whole purpose of adding MySQL slaves to increase availability. Has anyone else addressed this?

Thanks in advance for any replies.

Ted Prosser

Friday 11 November 2005 5:56:03 am

Looks like eZ publish has to have write access to a MySQL database no matter what you are doing with the front-end. The ezsession table gets updated constantly. We've also noted temp tables get created and dropped. So much for that.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 03:22:27
Script start
Timing: Jan 19 2025 03:22:27
Module start 'layout'
Timing: Jan 19 2025 03:22:27
Module start 'content'
Timing: Jan 19 2025 03:22:29
Module end 'content'
Timing: Jan 19 2025 03:22:29
Script end

Main resources:

Total runtime1.6254 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0083 589.2734152.6406
Module start 'layout' 0.00830.0062 741.914139.4766
Module start 'content' 0.01451.6095 781.3906425.7578
Module end 'content' 1.62410.0013 1,207.14848.1484
Script end 1.6254  1,215.2969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00470.2889160.0003
Check MTime0.00140.0832160.0001
Mysql Total
Database connection0.00070.044110.0007
Mysqli_queries1.580197.2121520.0304
Looping result0.00050.0325500.0000
Template Total1.565496.320.7827
Template load0.00190.115520.0009
Template processing1.563696.194320.7818
Template load and register function0.00020.009810.0002
states
state_id_array0.00160.097810.0016
state_identifier_array0.00440.268620.0022
Override
Cache load0.00150.0950130.0001
Sytem overhead
Fetch class attribute can translate value0.00080.050510.0008
Fetch class attribute name0.00200.121620.0010
XML
Image XML parsing0.00010.006810.0001
class_abstraction
Instantiating content class attribute0.00000.000620.0000
General
dbfile0.00070.0416100.0001
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 6
 Number of unique templates used: 4

Time used to render debug report: 0.0001 secs