Forums / Install & configuration / MySQL Replication Configuration

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.

eZ debug

Timing: Jan 20 2025 09:00:21
Script start
Timing: Jan 20 2025 09:00:21
Module start 'content'
Timing: Jan 20 2025 09:00:21
Module end 'content'
Timing: Jan 20 2025 09:00:21
Script end

Main resources:

Total runtime0.1458 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 589.0703180.8281
Module start 'content' 0.00670.0045 769.898493.7109
Module end 'content' 0.01120.1345 863.6094523.8047
Script end 0.1457  1,387.4141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00342.3025200.0002
Check MTime0.00140.9732200.0001
Mysql Total
Database connection0.00080.576910.0008
Mysqli_queries0.102470.23861410.0007
Looping result0.00120.80801390.0000
Template Total0.134292.110.1342
Template load0.00110.765510.0011
Template processing0.133191.285110.1331
Override
Cache load0.00090.583610.0009
Sytem overhead
Fetch class attribute can translate value0.00080.526710.0008
XML
Image XML parsing0.00030.176910.0003
General
dbfile0.00392.6430200.0002
String conversion0.00000.004630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs