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?
Joomla Master-Slave Database
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.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
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.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
-
- Joomla! Fledgling
- Posts: 4
- Joined: Wed Nov 29, 2017 7:55 am
- andypooz
- Joomla! Guru
- Posts: 728
- Joined: Sat Dec 30, 2006 3:03 pm
- Location: London, UK
- Contact:
Re: Joomla Master-Slave Database
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
Everything is possible, but what you're suggesting sounds massively complicated, is prone to concurrency issues, and will probably end up making things slower
- andypooz
- Joomla! Guru
- Posts: 728
- Joined: Sat Dec 30, 2006 3:03 pm
- Location: London, UK
- Contact:
Re: Joomla Master-Slave Database
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.
-
- Joomla! Ace
- Posts: 1460
- Joined: Sat Jan 21, 2006 8:42 pm
Re: Joomla Master-Slave Database
First of all, just because it sounds complicated to you doesn't mean it is!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
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.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Thu Aug 23, 2018 1:37 pm
Re: Joomla Master-Slave Database
@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?
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?
-
- Joomla! Fledgling
- Posts: 1
- Joined: Tue Apr 23, 2019 8:00 pm
Re: Joomla Master-Slave Database
A different reason for a master-slave concept than loadsharing/peformance is availability and support for disconnected operation. If the network is cut in pieces your operation may depend on a local copy of your website in each piece. To keep these copies updated, you need to push changes from your master to a set of slaves. This seems hard to accomplish using Joomla. Any ideas?