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

  • Docker Stack Swarm - Service Replicas are not spread for Mutli Service Stack
  • link_to strips port from site hosted in container
  • Building an application stack using Docker
  • How to run multiple Docker Containers in different terminals using Docker compose or with Shell?
  • SpringBoot with Tomcat uses around 190mb of memory. What processes are running within Springboot?
  • Docker MEAN.JS can't set to run in 'PRODUCTION' mode
  • 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:

    1. 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
    2. 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

  • Why does docker list two separate images (one of which doesn't exist) for my container?
  • Different home directory during Docker build in Docker hub
  • run docker on overlay network failed
  • Docker: how to update changes in php.ini inside of container
  • Failed to connect to port 443: Connection refused, Failed to Bootstrap, Discourse Docker
  • Run copied file in container
  • One Solution collect form web for “Run multi mysql services on same machine”

    I would suggest reading the book High Perfromance MySQL.

    1. 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.

    2. 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.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.