Joomla Master-Slave Database

Discussion regarding Joomla! 3.x Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
a_nasri
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Nov 29, 2017 7:55 am

Joomla Master-Slave Database

Post by a_nasri » Wed Nov 29, 2017 8:05 am

Hello everybody

I have got a customer who has a huge traffic on their site specially on Database record, now I want to share the load to two different servers some sort of master and slave database, in this scenario DB update,insert,delete will be write on the master and other records which are constant and needn't be updated frequently read from the slave at the end master and salve will be sync.

Do you think it is possible to do it?

User avatar
andypooz
Joomla! Guru
Joomla! Guru
Posts: 704
Joined: Sat Dec 30, 2006 3:03 pm
Location: London, UK
Contact:

Re: Joomla Master-Slave Database

Post by andypooz » Thu Nov 30, 2017 6:40 pm

Sounds like the perfect way to make a small problem a lot bigger to me. You're better off looking at optimising your database or using load balancing solutions.
Everything is possible, but what you're suggesting sounds massively complicated, is prone to concurrency issues, and will probably end up making things slower
Andy Hickey
Bespoke Joomla Extension Developer
http://www.netamity.com

User avatar
andypooz
Joomla! Guru
Joomla! Guru
Posts: 704
Joined: Sat Dec 30, 2006 3:03 pm
Location: London, UK
Contact:

Re: Joomla Master-Slave Database

Post by andypooz » Thu Nov 30, 2017 6:41 pm

Are the tables receiving the hits the core joomla tables or part of an extension/custom dev? If the latter, you might want to look at query optimisation too.
Andy Hickey
Bespoke Joomla Extension Developer
http://www.netamity.com

RedEye
Joomla! Ace
Joomla! Ace
Posts: 1460
Joined: Sat Jan 21, 2006 8:42 pm

Re: Joomla Master-Slave Database

Post by RedEye » Thu Dec 28, 2017 1:49 am

andypooz wrote:Sounds like the perfect way to make a small problem a lot bigger to me. You're better off looking at optimising your database or using load balancing solutions.
Everything is possible, but what you're suggesting sounds massively complicated, is prone to concurrency issues, and will probably end up making things slower
First of all, just because it sounds complicated to you doesn't mean it is!
Secondly, don't say it is prone to concurrency issues when you don't know!!
And for third, No, it is not the perfect way to make a small problem a lot bigger... it is a perfect way to speed up a site!!!
Unlucky for us, however, is the fact that Joomla is not build with master/slave setup in mind, what in my eyes is a very big minus, but I am pretty sure there is a plugin for this even for Joomla.

fids
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Aug 23, 2018 1:37 pm

Re: Joomla Master-Slave Database

Post by fids » Thu Aug 23, 2018 2:02 pm

@a_nasri, did you solve this problem?
I also run a very large site on a dedicated server with decent specs (32GB RAM, 4 cores, 350 Ghz) but I noticed a long time ago that as my database grows (users, sessions and content), so does the server slow down, almost to an unusable speed.
I did some optimisation by hacking some core joomla files, but that only helped a little. In the end, I split my 800MB joomla database into multiple parts, and I load the right tables programatically. I had to hack joomla core files for that - was too lazy to write a plugin for the job.
As the site continues to grow, this set up has become harder to maintain, so I want to try database replication instead, where the "read" load would be shared between the master and two or three slaves. I can always add slaves as needed. I think this is what you were trying to achieve. Did it work?


Post Reply

Return to “Performance - Joomla! 3.x”