MariaDB replication using containers

In this blog we are going to demonstrate how to replicate a MariaDB database that runs in a Docker container (let’s call it primary) to one or more MariaDB servers that run in a Docker container (let’s call them replicas) using binary logging, a method that creates binary log files and an index that contains the record of all changes to the database (both data and structure). You can find an overview of how replication works here and you can find how to setup replication here. An example can be found in this GitHub script.

Create statefulset MariaDB application in K8s

In the previous blog we created a stateless application, deployed with K8s resource Deployment, which allows one to replicate the application, but where data is lost when Pods are restarted, meaning there were no data consistency. In the same blog we used PersistentVolumeClaim for dynamic provisioning of PersistentVolume, but we used Deployment, meant for stateless application, and this way is *not recommended* for statefulset application where each replica should have its own persistent volume. The proper way to achieve that is through the Statefulset resource and this post we will cover that.

In K8s one can create a stateful application, an application like a database, which needs to save data to persistent disk storage for use by the server/clients/other applications, to keep track of its state and to be able to replicate and be used in distributed systems.

MariaDB & K8s: Deploy MariaDB and WordPress using Persistent Volumes

In the previous blog, MariaDB & K8s: Create a Secret and use it in MariaDB deployment, we used the Secrets resource to hide confidential root user data, and in the blog before that in the series, MariaDB & K8s: Communication between containers/Deployments, we created 2 containers (namely MariaDB and phpmyadmin) in a Pod. That kind of deployment didn’t have any persistent volumes.

In this blog we are going to create separate Deployments for MariaDB and WordPress applications as well as a Service for both in order to connect them. Additionally we will create Volume in a Pods of a MariaDB Deployment.

New Sponsor: Schaffhausen Institute of Technology

Good news from and for MariaDB Foundation: in Schaffhausen Institute of Technology (SIT), we have a new Platinum Sponsor. With the additional funds and with the insights provided by Serguei Beloussov, who will work with the MariaDB Foundation on the board level, we expect to improve our ability to further the MariaDB Foundation mission related to our values of Openness, Adoption, and Continuity.

Introducing SIT

This event marks a first in our work with sponsors, given that our top-level sponsor list has so far contained only names fairly familiar to industry players: DBS Bank, Visma, IBM, Microsoft, Alibaba, Tencent, and Service Now, not to mention the eponymous MariaDB Corporation.

Challenges and Visions for MariaDB Server

At the MariaDB Foundation, we want MariaDB Server to be a model citizen in the Open Source world. For now, there is a sizeable gap between dreams and reality. But that doesn’t stop us from striving to improve. Let me here describe some of our challenges, and share some visions of where we want to be.

Continuous Integration

One pain point is the state of the development tree. A model citizen would ensure that the tree can always be built. Every day, all the features under development could be tested by the community, on all platforms.

Thank you, 2020

At MariaDB Foundation, we have many reasons to be thankful towards all of those who have helped us during 2020.

A few sample contributions

We have recently expressed our gratitude towards contributors in our ecosystem, in 2020. Daniel Black explicitly thanked Tencent for their contributions, and Vicentiu Ciorbaru for the ARM related contributions.

On the same note, Intel has given us access to hardware and software to enable builds using Intel compilers, but more on that once we can release these new builds.

Downloads – A fresh new look

It’s been close to four months since we announced our new project of renewing MariaDB Downloads. We are now ready to launch our first version. We have done a lot of work behind the scenes which will simplify further developments. A technical breakdown post is coming, but for now, let’s focus on the new features!

In with the new

User friendliness – one click to download

New downloads form

User friendliness is at the core of MariaDB (going all the way back to MySQL times). It should be really easy to download, install and run MariaDB.

Selecting the right database

How do you select a database in practice? How do you pretend to select it? And, if you want to be serious, how do you select it logically?

Those are the key questions I dug into, during my keynote last week at Percona Live Online.

For those who feel they don’t want to listen to the entire 30 minute video of the presentation, I have compiled a number of entry points for you below:

  • 0:23 Silly hat meme, “Teknologmössa”
  • 2:19 Agenda
  • 2:43 Choosing a database in practice
  • 3:59 Pretending to choose a database
  • 5:00 Triggers for making a fresh choice
  • 5:51 Monetary impulses
  • 7:53 Database lifecycle impulses
  • 10:07 MariaDB 5.5 on Github
  • 11:24 Framework for database choice: 1.