Run multi mysql services on same machine
I have linux machine ( ubuntu 14.04 32GB RAM 8 core …)
I want to run on this machine several Slaves ( currently 5 slave replications but I will need more )
I use master-slave mysql replication
From my point of view there are 2 options to do that
1. use mysqld_multi – set 5 instance ( done that in the past with 2 instance)
2. use Docker container – each one with mysql slave
what is the Best solution ?
which one will be more easy to maintain ( and add ) ?
Tnx for help
The issues I’m trying to solve are:
- I have problems with Performance and with the architecture that we use I’m unable to use cluster – so I want to use load balancing and split the read/write
- On one of my machines I need to split data from 1 master to different slaves by some column value – and i want all slaves will be on same machine
One Solution collect form web for “Run multi mysql services on same machine”
I would suggest reading the book High Perfromance MySQL.
If you’re having performance problems but your server has enough resources to add multiple slaves then you should tweak the configuration of your master MySql instance to better utilize those resources. If you’re attempting to split the writes to slaves those changes will never be propagated back to the master. If you want to utilize slaves to increase read performance then you can do that, but I would only suggest this if you’ve maxed out the box that the master instance is running on.
I would need more information on why you think you need to do this: ‘On one of my machines I need to split data from 1 master to different slaves by some column value’ to be able to comment about it. At the surface it feels like this is a bad idea, but there could be a reason for it.