Docker, MySQL and Experience in Containers

By | June 8, 2017

Recently I posted a blog on my time attending a DevOps event in Toronto.  In that blog I had intended to focus on the conference and highlight some of the topics that stood out for me.  In this blog though, I wanted to share what others were doing with containers like Docker, and particularly and allow them to convey their own experiences in their words.

MySQL Containers

The MySQL team has been formally supporting MySQL Docker containers as part of our Release Engineering efforts since 2015.  The MySQL Docker images are found here: https://hub.docker.com/r/mysql/ .

In terms of MySQL Performance on Docker, the MySQL team confirms  that non-i/o bound workloads only have minor impacts to performance based on their evaluation and the conditions they tested on.

For those looking to use Docker Swarm mode, the blog from our Release Engineering team indicates that regular master-slave replication doesn’t quite work within their parameters.  But that doesn’t mean it doesn’t work for companies like Uber…maybe they’re not using swarm.  Keep reading to find out how the community is using MySQL.

Blogs on Software Containerization

What is really interesting is what other people are writing on this topic, and particularly their input on containerizing databases.  Putting a database with mutable content into an immutable architecture is itself a debatable topic.  I’ve been really interested in having a reason to blog on the DevOps culture and sharing on what “other people” have to say, and so I’m pulling some of these posts that I thought would be informative & controversial and put them below.

Mikes monster list of docker tips

Put your containers here?

Mike Simons blog on docker is a really fascinating perspective of his experience with docker “containers”.  Since containers seem to encompass the good and bad of everything DevOps, I thought I’d start with his blog.  His experience seems to hold a lot of weight, and he’s kind enough at the top of the blog to mention the sort of environment scale he had to work with, and nicely used Uber as a comparison of massive scale that his solution approaches might not be a fit.  His experience seems authentic…painstakingly so.  No pain no gain….and Mike has made lots of gains.

Dockerizing MySQL at Uber Engineering

So Uber braves massive scale and uses Docker for MySQL.  At DevOpsDays Toronto, during one of the Q&A’s at the end of a session, the question was raise, how about using Docker (containers) for things like databases (the answer was a clear “NO”)….next question.

So not surprising as databases rely on dataset files that are mutable and containers are really intended for immutable content.  So what’s up with that, poor Monster Mike to great lengths to save us from ourselves, but Uber breaks all these rules, and fantastically so.   Uber presents in 3 separate articles (part-1, part-2, part-3) on their full MySQL schema-less design.  It’s in part-2 that they describe their 3-member MySQL setup for their confirmed 2-phase-like commit processing.

The Uber Engineering team really starts to describe the scope of their usage of database in containers with their Dockerizing MySQL blog.  They begin by talking about their 16 clusters (3 MySQL per cluster = 48 instances/containers) that got them going.  By the time their blog was published (Nov 2016) they were over 1000 clusters and 4000 MySQL Servers.  So this is only their database count….imagine how many application containers they are probably managing and you can see the contrast of Monster Mike’s 50 docker image solution compared to Uber’s own admission that moving beyond 16 clusters required changes in their tooling to manage their environment.

Moby/Docker in Production: A History of Failure

Do you think you can tell where The HFT Guy’s blog is going. It might even be in contrast to both Uber Engineering and Monster Mike…however I think Mike and the HFT Guy should get out for a couple pints to wash away their sorrows (it could be healing, for all they’ve been through).  It’s interesting that it was written in the same timeframe as Uber Engineering’s blog on Dockerizing MySQL.  HFT Guys has lots of dramatic pauses in his blog….very effectively done in a written format, I might add.

Slides from my talk operations in ” at

First, to get you warmed up with this datacharmer has blogged on getting started with MySQL on Docker. How about a more precisely documented and sober way of understanding and using Docker. Giuseppe Maxia presents his experience and usage of Docker and provides his slides that he used at a conference.  His focus is on MySQL in Docker, but the slides take a more educational step-by-step for guiding people along.  He addresses the mutable requirements for a database in docker and also refers to the “Official Public MySQL Docker” containers.  He also shares his Github account where he has a collection of tool for MySQL Replication and Deployment setups.

MySQL Database in Docker

I would love to get feedback from all out there on Docker, DevOps and and what they’d like to see further supporting those initiatives to bring greater value to your applications and business’ activities.  It is the new world of IT where the community using the open source tools and their ability to give feedback on their wishes of what they’d like to see next is such a driving force for change.

One thought on “Docker, MySQL and Experience in Containers

  1. Pingback: DevOpsDays Toronto: Community, Collaboration and Supporting the change in IT – Select All From MySQL

Comments are closed.