Multi Applications as Docker Containers in a Cluster, Ways to Handle MySQL -


most of articles online regarding setting docker containers seem written around idea of breaking application micro services , allocating them various containers , deploying them cluster.

i find out best way handle databases (e.g. mysql) multiple unrelated applications, written different clients, deployed same cluster.

say have 10 unrelated small applications (like wordpress), requiring access mysql database. could:

  1. deploy applications containers cluster, containing application code, , setting dedicated mysql server or google cloud sql instance , asking each of application containers connect database 3rd party services.

  2. deploy applications containers cluster. each applications, deploy separate database container cluster , linking two.

  3. deploy separate database container cluster , link container various application containers in cluster.

which of these solutions best in turns of application architecture design , of these best use of computer resources? have feeling while deploying multiple mysql containers (one each application) maybe best design might not resource efficient have bunch of mysql containers running.

containerising db each app seems "the docker way" , provide better isolation , portability

the docker way isn't db per app service per container. mysql service @ don't run in mysql container service (app/ssh/monitoring...) it's way go.

so decision between 1 db per app or 1 db you.

my personal choice third:

  1. deploy separate database container cluster , link container various application containers in cluster.

i'm using kubernetes postgres container used db server applications.

i prefer choice because it's easier op point of view backup/replicate/apply maintenance having 30 differents db servers + 30*slaves + 30*external pool + 30*monitoring tools etc... in case have better hw resources usage.

but conserve possibility move database dedicated db-server container in case application using resource or if many app using db.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -