Method for realizing high availability of database based on docker environment

An implementation method and database technology, applied in the field of databases, can solve the problems that data consistency cannot be guaranteed, cannot completely solve data consistency, and is expensive, so as to solve data consistency problems, low cost, and relieve I/O pressure Effect

CN108763370AInactive Publication Date: 2018-11-06HANGZHOU ANHENG INFORMATION TECH CO LTD
4 Cites 4 Cited by

Patent Information

Authority / Receiving Office
CN · China
Current Assignee / Owner
Publication Date
2018-11-06
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure 1
    Figure 1
Patent Text Reader

Abstract

The present invention relates to the database technology and aims at providing a method for realizing high availability of a database based on a docker environment. The method for realizing high availability of the database based on the docker environment comprises the following steps: creating docker containers at a server; configuring database applications in the docker containers; mounting thedata storage directory of the database in the docker container to the same directory of the server and testing the same; deploying multiple docker containers on the server; forming a LAN by multiple docker containers, configuring a virtual IP and setting to be keeplived for master-slave switching to provide services for the outside world. The database application data storage directory in each docker container in the invention is mounted on a directory of a server, so the invention solves the problem of data consistency completely with low cost and high efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to the technical field of databases, in particular to a method for realizing high availability of databases based on a docker environment. Background technique

[0002] Database technology is an important part of modern information science and technology, and the core of computer data processing and information management systems.

[0003] In the database system, it is necessary to reduce data storage redundancy, realize data sharing, ensure data security, and efficiently retrieve and process data. Therefore, the database system architecture must be highly available: 1) If data failures such as downtime or unexpected interruption occur, It can restore data availability as soon as possible, reduce downtime as much as possible, and ensure that the business will not be interrupted due to database failure; 2) The data of the non-primary node used for backup, read-only copy and other functions should be kept in real time with the data ...

Examples

Embodiment Construction

[0025] Below in conjunction with accompanying drawing and specific embodiment the present invention is described in further detail:

[0026] Such as figure 1 A high-availability implementation method for databases based on the docker environment is shown, and the specific implementation method is as follows:

[0027] Step A: Create a docker container D1 on the server.

[0028] Docker is an open source engine that can create a lightweight, portable, self-sufficient container for any application.

[0029] Step B: Configure the database application mysql and other applications in the docker container. The other applications here are any other applications that you want to install, and are not related to the functions and purposes of this patent.

[0030] Step C: Mount the data storage directory of the database in the docker container to the same directory / data / mysql of the server.

[0031] Step D: For the docker container configured in step C, test whether the data storage d...