Wofun technology is the only way for you to check containerized database

 Wofun technology is the only way for you to check containerized database

Generally, DBA operation and maintenance personnel have relatively weak R & D ability and no engineering project experience. Of course, automated operation and maintenance, shell or Python script auxiliary tools are enough for the operation and maintenance management of small-scale RDS clusters (10-20). However, with the expansion of the companys scale and the enrichment of application scenarios, enterprises usually do not have only one database instance, which may coexist with MySQL, Oracle, SQL server, PostgreSQL, etc.

Then the enterprise employer requires DBAs to master the characteristics and capabilities of various databases, or recruit employees for each type of DBA. In fact, there are commonalities in the horizontal usage scenarios of relational databases, such as high availability, scalable RDS cluster scale, changeable computing / storage, backup recovery, monitoring alarm, etc.

Dont let the quality of RDS service become the last short board

There are indeed barriers between R & D and operation and maintenance. We often see that after R & D personnel release software applications online, they need to provide hardware and network environment for deployment. Generally, operation and maintenance personnel do not care about the good or bad or fast of your software operation, but only care about monitoring indicators such as physical services and network.

In addition to these indicators, DBA operation and maintenance personnel also need to care about the good and fast of the database software itself. For example, whether the application table has created a reasonable index, the storage space size of the physical machine, whether the SQL statement is illegal, such as the use of select * fromtable1, table2... And so on, resulting in the storage mediums IO being full, etc. When enterprises start the construction of microservices and Devops, the requirements for service agility and rapid delivery capability are put forward. Relational database is a special application scenario. Some large-scale enterprises set up DBA department to be responsible for the operation and maintenance and development of database instances. With the rapid development of products and rapid adaptation to the market, the speed and ability of database instance delivery has gradually become a bottleneck.

Containerization is the only way

On the value of container database

By using the characteristics of the container graphdriver, when DBA runs multiple instances on a single machine, the database files that the same version of database instance needs to run share the baseimage, which greatly saves the storage space of the physical machine.

To run a relational database container, we need to persist the data through another interface, not through the graphdriver. The container itself provides the ability to persist data. For example, run the containerized MySQL instance, mount the OS directory / opt to the containers / var / lib / MySQL directory, and write the data generated by the MySQL instance in the container to the / opt directory of the host.

We can check the running spec information of the container database through the docker inspect docker ID command. Intercept some key information.

We can see that docker maps the OS directory to the container for binding by using the type of volume. We can guarantee the data security of the container database through OS file systems such as ext4 and XFS, or using distributed storage volumes.

Kubernetes is the best practice of container database cluster

The above is a very superficial discussion on the query of container database by operation and maintenance DBAs. Of course, if you want to deploy container database cluster on a large scale, you cant do without good architecture design.

Kubernetesising the containerworld is no exaggeration. Cloud native, microservices, PAAS, IOT, Devops, etc. almost all architectures with container as technology stack take k8s as the first choice. The product Im responsible for also uses k8s as a container database choreography framework to provide multiple types of RDS services. At present, the maximum RDS size of a single cluster is up to 1000 +. Kubernets architecture allows enterprises to deploy containerized databases by extending their own custom resource types. Of course, they also need to solve the data persistence problem of container databases, scheduling strategies of container databases, network solutions and service exposure modes according to their own business scenarios.

When an enterprise takes k8s as an IT architecture to container the database, the benefits to the operation and maintenance DBA will be fully matched with the needs of rapid business development and the requirements of RDS service quality. However, it also brings new challenges to the operation and maintenance DBA. The operation and maintenance DBA needs to fully understand the k8s architecture design system and be able to manage resource tasks through its own cli components or custom yaml.

Source: editor in charge of mass news: Chen Tiqiang_ NB6485