A database synchronization method and system supporting virtual machine and container deployment
By using the Nomad scheduler and containerization technology, database synchronization tasks can be deployed efficiently and reliably in virtualized and containerized environments, solving the problems of cumbersome deployment methods and poor scalability, and improving the system's flexibility and security.
Patent Information
- Application Number
- CN202411049451.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2044-08-01
AI Technical Summary
Existing technologies make it difficult to efficiently deploy and manage database synchronization tools in virtualized and containerized environments, resulting in cumbersome deployment processes, poor scalability, and difficulty in adapting to rapidly changing business needs.
Nomad is adopted as the core scheduler. By defining Nomad task specifications, automated deployment and intelligent scheduling are achieved. Combined with containerization or virtualization technologies, Nomad's service discovery mechanism and monitoring and alarm mechanism are used to ensure the efficient and reliable execution of database synchronization tasks, and security is enhanced through network layer policies.
It enables efficient and reliable execution of database synchronization tasks in virtual machine and container environments, simplifies the deployment process, improves resource utilization and system reliability, enhances security, and adapts to rapidly changing business needs.
Smart Images

Figure CN119025593B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of database synchronization, in particular to a database synchronization method and system supporting virtual machine and container deployment. BACKGROUND
[0002] In today's rapid development of informatization, database synchronization, as an important means to ensure data consistency and reliability, is widely used in various business scenarios. However, the traditional deployment method of database synchronization tools usually depends on specific hardware environment or operating system, resulting in a cumbersome deployment process, poor scalability, and difficulty in adapting to rapidly changing business needs.
[0003] In recent years, with the rise of containerization and virtualization technologies, the deployment and management of database synchronization tools have undergone significant changes. Containerization technology packages applications and their dependencies into portable container images, allowing applications to be quickly deployed and run in any environment that supports container technology. Virtualization technology creates a virtual computing environment, providing higher levels of resource isolation and flexibility.
[0004] Nomad, as a distributed, highly available, and data center-aware scheduler, has excellent scheduling algorithms, service discovery mechanisms, and dynamic expansion capabilities, making it very suitable for building elastic and scalable distributed systems. However, there is currently no mature solution that can fully utilize the advantages of Nomad to achieve efficient deployment and management of database synchronization tools in virtual machine or container environments. SUMMARY
[0005] The purpose of the present application is to provide a database synchronization method and system supporting virtual machine and container deployment to solve the problems raised in the background.
[0006] To achieve the above purpose, the present application provides the following technical solution: a database synchronization method supporting virtual machine and container deployment, the method comprising the following steps:
[0007] Architecture design, using Nomad as the core scheduler, responsible for scheduling and managing database synchronization tasks;
[0008] Task definition and configuration, define Nomad task specifications to abstract database synchronization tasks into configurable service units;
[0009] Automatic deployment and intelligent scheduling, use Nomad's automatic deployment function to automatically create and start corresponding container or virtual machine instances according to task configuration;
[0010] Service discovery and load balancing, use Nomad's service discovery mechanism to automatically register and discover database synchronization service instances;
[0011] Monitoring and alerting, real-time monitoring of database synchronization task execution status, resource usage and cluster health status;
[0012] Security assurance, through isolation of container or virtual machine environment, reduce the security risk between different tasks; through network layer strategy to enhance the data isolation between different jobs.
[0013] Preferably, the specific operation of the architecture design comprises:
[0014] Using containerization or virtualization technology to encapsulate database synchronization tools and their dependent environment, form portable deployment unit, through the client and server architecture of Nomad, realize dynamic allocation of tasks and unified management of cluster resources;
[0015] Nomad supports multiple types of drivers, through these drivers to run and schedule tasks on different platforms, support running tasks in Docker containers, support running binary files or scripts directly on the host, support running Java applications, choose the most suitable deployment mode to realize the task, do not limit the implementation and deployment mode of application service;
[0016] Nomad cluster contains a server and one or more client hosts, and runs tasks according to the strategy in the whole cluster, and exits after completing the function.
[0017] Preferably, the specific operation of task definition and configuration comprises:
[0018] Task configuration includes synchronization strategy, data source information, target database information, required synchronization library table, task unique identification key parameter, this configuration record into syncmgr task, and the number of parallel reader / writer task instances is modified by syncmgr according to task progress; in addition to specific configuration parameters, all tasks also need to configure the driver type and resource limit of the task; after the configuration is determined, start Nomad job, and then schedule the running of each task.
[0019] Preferably, the specific operation of automatic deployment and intelligent scheduling comprises:
[0020] Through the scheduling algorithm of Nomad, virtual machine or container resources are intelligently allocated according to the resource usage and task demand of the cluster, ensuring efficient execution of synchronous tasks. Nomad also supports dynamic migration and fault recovery of tasks, ensuring the continuous availability of services. Nomad supports multiple scheduling strategies, including least used, best position, and random, helping tasks run on the best nodes of the cluster, thereby optimizing resource utilization and performance. The reader is deployed on a host close to the source database, the writer is deployed on a host close to the destination database, and multiple reader and writer task instances are started in the synchronization library table structure and full data stage to maximize resource utilization.
[0021] Preferably, the specific operations of service discovery and load balancing include:
[0022] When new tasks join or existing tasks exit, Nomad will automatically update the service list and distribute requests to appropriate service instances according to the load balancing strategy, achieving automatic scaling and failover of services. During different stages of task execution, the Reader / writer configuration is changed to one or multiple instances, and Nomad automatically expands or shrinks the actual running task instances.
[0023] A database synchronization system supporting virtual machine and container deployment, the system is composed of architecture design module, task configuration module, deployment module, service discovery module, monitoring module and security module;
[0024] The architecture design module uses Nomad as the core scheduler, responsible for the scheduling and management of database synchronization tasks;
[0025] The task configuration module is used for task definition and configuration, which abstracts the database synchronization task into a configurable service unit by defining the Nomad task specification;
[0026] The deployment module is used for automatic deployment and intelligent scheduling, which automatically creates and starts the corresponding container or virtual machine instance according to the task configuration using the automatic deployment function of Nomad;
[0027] The service discovery module is used for service discovery and load balancing, which automatically registers and discovers database synchronization service instances through the service discovery mechanism of Nomad;
[0028] The monitoring module is used for monitoring and alarming, which monitors the execution status, resource usage and health status of the database synchronization task in real time;
[0029] The security module is used for security protection, which reduces the security risk between different tasks by isolating the container or virtual machine environment, and enhances the data isolation between different jobs through network layer strategies.
[0030] Preferably, the architecture design module encapsulates the database synchronization tool and its dependent environment by containerization or virtualization technology to form a portable deployment unit, and realizes dynamic allocation of tasks and unified management of cluster resources through the client and server architecture of Nomad.
[0031] Nomad supports multiple types of drivers to run and schedule tasks on different platforms, supports running tasks in Docker containers, supports running binary files or scripts directly on the host, and supports running Java applications. The most suitable deployment method is selected to implement the task, and the implementation and deployment method of the application service is not limited;
[0032] The Nomad cluster includes one Server and one or more Client hosts, and runs tasks according to the strategy in the entire cluster and exits after completing the function.
[0033] Preferably, the task configuration module, the task configuration includes synchronization strategy, data source information, target database information, required synchronization library table, task unique identification key parameter, and the configuration record is entered into the syncmgr task. The syncmgr modifies the number of parallel reader / writer task instances according to the task progress; in addition to specific configuration parameters, all tasks also need to configure the Driver type and resource limit of the task; after the configuration is determined, start the Nomad job, and then schedule the running of each task.
[0034] Preferably, the deployment module intelligently allocates virtual machine or container resources according to the resource usage and task demand of the cluster through the scheduling algorithm of Nomad, ensures efficient execution of the synchronization task, and supports dynamic migration and fault recovery of the task to ensure continuous availability of the service; Nomad supports multiple scheduling strategies, including least used, best position and random, which helps the task to run on the best node of the cluster, thereby optimizing resource utilization and performance. Set the reader to be deployed on the host close to the source end database, set the writer to be deployed on the host close to the destination end database, start multiple reader and writer task instances in the synchronization library table structure and full data stage, use resources to the maximum extent with concurrent efficiency.
[0035] Preferably, the service discovery module, when a new task joins or an existing task exits, Nomad will automatically update the service list and distribute requests to appropriate service instances according to the load balancing strategy to realize automatic expansion and failover of the service; change the Reader / writer configuration to one or more instances in different stages of task running, and Nomad will automatically expand or shrink the actual running task instances.
[0036] Compared with the prior art, the present application has the beneficial effects that:
[0037] The database synchronization method and system supporting virtual machine and container deployment provided by the present application combine the advantages of Nomad distributed scheduling and containerization or virtualization technology, and realize efficient and reliable execution of database synchronization tasks through automatic deployment, intelligent scheduling and elastic expansion. This is the advantage of Nomad compared with k8s, not only supporting containerized applications, but also supporting other types of workloads, which makes it easier to use existing application systems instead of having to run after container modification; and the architecture of Nomad is relatively lightweight, suitable for small-scale deployment and simple scenarios. Compared with k8s, Nomad can realize more flexible deployment and higher customization. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 The method flowchart of the present application. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical scheme of the present application clear, complete and more clear and explicit, the embodiments of the present application are further described in detail below in combination with the drawings. It should be understood that the specific embodiments described herein are part of the embodiments of the present application, not all embodiments, and are only used to explain the embodiments of the present application, and do not limit the embodiments of the present application, and all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0040] Embodiment one
[0041] Please refer to Figure 1 The present application provides a technical scheme: a database synchronization method supporting virtual machine and container deployment, the method comprising the following steps:
[0042] I. Architecture design
[0043] The present application adopts Nomad as the core scheduler, responsible for the scheduling and management of database synchronization tasks. At the same time, the containerization or virtualization technology is used to encapsulate the database synchronization tool and its dependent environment to form a portable deployment unit. Through the client and server architecture of Nomad, dynamic allocation of tasks and unified management of cluster resources are realized.
[0044] Nomad supports multiple types of drivers, through which tasks can be run and scheduled on different platforms, including running tasks in Docker containers, running binary files or scripts directly on the host, and running Java applications. Therefore, the most suitable deployment method can be selected to implement the task, without limiting the implementation and deployment of application services.
[0045] A Nomad cluster includes a Server and one or more Client hosts, and tasks can be scheduled and run according to strategies within the entire cluster. Tasks can be long-running tasks such as databases, or short-term tasks such as starting to run and completing a specific function after the function is completed.
[0046] The overall framework design is as follows:
[0047] Registration service: as a registration and discovery server, other tasks run and register here.
[0048] Configuration library: records the running status of synchronization tasks, such as whether the library table structure is collected, whether it is stored, whether it is full collection, whether it is full storage, and the identification of other indicators.
[0049] Prometheus monitoring system: an open source monitoring and alerting tool, mainly used to collect, store and query various types of time series data. It can monitor the performance indicators of servers, applications and network services, so that administrators can discover problems in time and take appropriate measures.
[0050] MQ Cluster: message middleware cluster, which can create data topics, play a role in decoupling, asynchronous communication, traffic peak shaving, data penetration, and ensuring data reliability, and improve system maintainability, performance and stability.
[0051] Reader: provides database collection functions to the outside through API, and is scheduled by syncmgr to execute tasks to obtain data from the source database and send it to MQ Cluster.
[0052] Writer: provides database storage functions to the outside through API, and is scheduled by syncmgr to execute tasks to obtain data from MQ Cluster and write it to the destination database.
[0053] Syncmgr: responsible for scheduling specific synchronization task running, scheduling reader / writer to execute tasks according to task progress.
[0054] The reader, writer, and syncmgr tasks of the synchronization task are configured with a task unique identifier, and the task state is not saved. The task information is recorded in the configuration library, and the task can start one or more instances as needed. The task is registered to the configuration and discovery server after being started. The syncmgr calls the reader / writer API interface to perform the collection and warehousing task as needed. The reader implements a series of API of collection functions, such as sending the structure of a certain table to a certain topic of MQ; obtaining the data shard condition of a certain table; collecting the data of a certain shard of a certain table and sending it to a certain topic of MQ, etc. The writer implements a series of API of warehousing-related functions, such as pulling data from a certain topic and processing. The syncmgr provides a stateful upload API that can be called by the reader / writer to upload the task state, such as the completion of a certain data shard collection, the change of the increment point of the collection end, and the like for task state monitoring. The data volume, data packet, and the like of the collection and warehousing are sent to the monitoring system.
[0055] II. Task definition and configuration
[0056] The present application abstracts the database synchronization task into a configurable service unit by defining the Nomad task specification. The task configuration includes the synchronization strategy, data source information, target database information, required synchronized library table, task unique identifier, and the like key parameters. The configuration record is entered into the syncmgr task. The syncmgr modifies the number of parallel reader / writer task instances according to the task progress.
[0057] In addition to specific configuration parameters, all tasks also need to configure the Driver type of the task, resource limit (CPU, memory, disk, and the like set by the task), and the like.
[0058] After the configuration is determined, the Nomad job can be started, and then the running of each task is scheduled.
[0059] III. Automatic deployment and intelligent scheduling
[0060] The present application utilizes the automatic deployment function of Nomad to automatically create and start the corresponding container or virtual machine instance according to the task configuration. Through the scheduling algorithm of Nomad, the virtual machine or container resources are intelligently allocated according to the resource usage of the cluster and the task demand, to ensure the efficient execution of the synchronization task. At the same time, Nomad also supports the dynamic migration and fault recovery of the task, to ensure the continuous availability of the service.
[0061] Nomad supports multiple scheduling strategies, including least used, best position, and random, to help tasks run on the best nodes of the cluster, optimizing resource utilization and performance. Set the reader to deploy on the host close to the source database, and set the writer to deploy on the host close to the destination database. In the synchronization library table structure and full data stage, multiple reader and writer task instances can be started to use resources efficiently and maximally.
[0062] Four, service discovery and load balancing
[0063] The application automatically registers and discovers database synchronization service instances through the service discovery mechanism of Nomad. When a new task joins or an existing task exits, Nomad will automatically update the service list and distribute requests to appropriate service instances according to the load balancing strategy, realizing automatic expansion and failover of services.
[0064] Since the synchronization tasks of task syncmgr, reader, and writer have no state, they are registered to the service registration and discovery server after running, and the state of task running is saved in the configuration database. Reader / writer configuration can be changed to one or multiple instances in different stages of task running, and Nomad will automatically expand or shrink the actual running task instances.
[0065] Five, monitoring and alarm
[0066] The application provides a complete monitoring and alarm mechanism to monitor the execution state, resource usage, and health status of the database synchronization task in real time. When an exception or failure occurs, the system will automatically trigger an alarm notification and take corresponding processing measures to ensure stable operation of the service.
[0067] Nomad provides an API to obtain the running state of jobs and tasks, and can also send monitoring and alarm information to prometheus, etc. Syncmgr can obtain data from the monitoring system to generate job status, such as collection and warehousing progress, MQ Cluster cache data volume, collection or warehousing data volume, etc., and provide it externally in API mode.
[0068] Six, security guarantee
[0069] Nomad itself has taken multiple measures in terms of security, such as isolating containers or virtual machine environments to reduce security risks between different tasks, and enhancing data isolation between different jobs through network layer strategies.
[0070] In summary, the application provides an efficient, reliable and easily scalable database synchronization tool deployment solution by integrating the distributed scheduling of Nomad and containerization or virtualization technology. This solution not only simplifies the deployment process and improves resource utilization, but also enhances the reliability and security of the system, providing strong technical support for distributed database synchronization scenarios.
[0071] Embodiment two
[0072] On the basis of embodiment one, a database synchronization system supporting virtual machine and container deployment is proposed, which is composed of an architecture design module, a task configuration module, a deployment module, a service discovery module, a monitoring module and a security module.
[0073] The architecture design module uses Nomad as the core scheduler, responsible for the scheduling and management of database synchronization tasks. It encapsulates the database synchronization tool and its dependent environment using containerization or virtualization technology to form a portable deployment unit. Through the client and server architecture of Nomad, dynamic task allocation and unified management of cluster resources are achieved.
[0074] Nomad supports multiple types of drivers, which run and schedule tasks on different platforms. It supports running tasks in Docker containers, running binary files or scripts directly on the host, and running Java applications. The most suitable deployment method is chosen to implement the task, without limiting the implementation and deployment method of the application service.
[0075] The Nomad cluster includes one Server and one or more Client hosts. It schedules and runs tasks according to the strategy in the entire cluster and exits after completing the function.
[0076] The task configuration module is used for task definition and configuration. It abstracts the database synchronization task as a configurable service unit by defining the Nomad task specification. The task configuration includes synchronization strategy, data source information, target database information, required synchronized library table, task unique identification key parameter, and this configuration record is entered into the syncmgr task. The syncmgr modifies the number of parallel reader / writer task instances according to the task progress. In addition to specific configuration parameters, all tasks also need to configure the Driver type and resource limits of the task. After the configuration is determined, the Nomad job is started, and then the running of each task is scheduled.
[0077] A deployment module is configured to automate deployment and intelligent scheduling. The deployment module utilizes the automation deployment function of Nomad to automatically create and start corresponding container or virtual machine instances according to task configurations. Through the scheduling algorithm of Nomad, virtual machine or container resources are intelligently allocated according to the resource usage of the cluster and the task demand, to ensure efficient execution of synchronization tasks. Nomad also supports dynamic migration and fault recovery of tasks, to ensure continuous availability of services. Nomad supports multiple scheduling strategies, including least used, best position and random, to help tasks run on the best nodes of the cluster, thereby optimizing resource utilization and performance. The reader is deployed on a host close to the source database, and the writer is deployed on a host close to the destination database. Multiple reader and writer task instances are started in the synchronization library table structure and full data stage, to use resources to the maximum extent with concurrent efficiency.
[0078] A service discovery module is configured to service discovery and load balancing. The service discovery module utilizes the service discovery mechanism of Nomad to automatically register and discover database synchronization service instances. When a new task is added or an existing task is exited, Nomad will automatically update the service list and distribute requests to appropriate service instances according to the load balancing strategy, to realize automatic expansion and failover of services. The Reader / writer configuration is changed to one or multiple instances in different stages of task running, and Nomad automatically expands or shrinks the actual running task instances.
[0079] A monitoring module is configured to monitoring and alarming. The monitoring module monitors the execution status of the database synchronization task, the resource usage and the health status of the cluster in real time. When an exception or failure occurs, the system will automatically trigger an alarm notification and take corresponding processing measures to ensure stable operation of the service.
[0080] Nomad provides an API to obtain the running state of jobs and tasks, and can also send monitoring and alarm information to prometheus and the like. The Syncmgr can obtain data from the monitoring system to generate job states, such as the progress of collection and warehousing, the data volume of the MQ Cluster cache, the data volume of collection or warehousing, and the like. The Syncmgr provides the data to the outside in an API manner.
[0081] A security module is configured to security assurance. The security module reduces the security risk between different tasks by isolating the container or virtual machine environment, and enhances the data isolation between different jobs through network layer strategies.
[0082] Although the embodiments of the present application have been shown and described, it can be understood by those skilled in the art that various changes, modifications, replacements and variations can be made to the embodiments without departing from the principles and spirits of the present application, and the scope of the present application is defined by the appended claims and their equivalents.
Claims
1. A database synchronization method supporting virtual machine and container deployment, characterized in that: The method includes the following steps: The architecture design uses Nomad as the core scheduler, which is responsible for scheduling and managing database synchronization tasks. Task definition and configuration: By defining the Nomad task specification, database synchronization tasks are abstracted into configurable service units; Automated deployment and intelligent scheduling: Nomad's automated deployment capabilities automatically create and start the corresponding container or virtual machine instances based on task configurations. Service discovery and load balancing: Nomad's service discovery mechanism automatically registers and discovers database synchronization service instances; Monitoring and alerting: Real-time monitoring of the execution status of database synchronization tasks, resource usage, and cluster health. Security is ensured by isolating container or virtual machine environments to reduce security risks between different tasks; and by enhancing data isolation between different jobs through network layer policies. The specific operations for task definition and configuration include: The task configuration includes synchronization strategy, data source information, target database information, tables to be synchronized, and key parameters for unique task identification. This configuration is recorded in the syncmgr task, which modifies the number of parallel reader / writer task instances based on the task progress. In addition to the specific configuration parameters, all tasks also need to configure the task's driver type and resource limits. After the configuration is confirmed, the Nomad job is started, and then the execution of each task is scheduled.
2. The database synchronization method supporting virtual machine and container deployment according to claim 1, characterized in that: The specific operations of architecture design include: By using containerization or virtualization technology to encapsulate database synchronization tools and their dependent environments, a portable deployment unit is formed. Through Nomad's client and server architecture, dynamic task allocation and unified management of cluster resources are achieved. Nomad supports multiple types of drivers, which can be used to run and schedule tasks on different platforms. It supports running tasks in Docker containers, running binary files or scripts directly on the host, and running Java applications. It allows users to choose the most suitable deployment method to implement tasks and does not limit the implementation and deployment of application services. A Nomad cluster consists of a server and one or more client hosts. Tasks are scheduled and run within the cluster according to a policy, and the server exits after completing its function.
3. The database synchronization method supporting virtual machine and container deployment according to claim 1, characterized in that: The specific operations of automated deployment and intelligent scheduling include: Nomad's scheduling algorithm intelligently allocates virtual machine or container resources based on cluster resource usage and task requirements, ensuring efficient execution of synchronization tasks. Nomad also supports dynamic task migration and fault recovery, ensuring continuous service availability. Nomad supports multiple scheduling strategies, including least usage, optimal location, and random, helping tasks run on the best nodes in the cluster, thereby optimizing resource utilization and performance. It sets the reader to be deployed on the host closer to the source database and the writer to be deployed on the host closer to the destination database. During the synchronization of database table structure and full data, multiple reader and writer task instances are started to maximize resource utilization with high concurrency efficiency.
4. The database synchronization method supporting virtual machine and container deployment according to claim 1, characterized in that: The specific operations of service discovery and load balancing include: When a new task is added or an existing task is removed, Nomad will automatically update the service list and distribute requests to appropriate service instances according to the load balancing strategy, thereby achieving automatic service scaling and failover. If the Reader / writer configuration is changed to one or more instances at different stages of task execution, Nomad will automatically scale up or down the actual running task instances.
5. A database synchronization system supporting virtual machine and container deployment, based on the database synchronization method according to any one of claims 1-4, characterized in that: The system consists of an architecture design module, a task configuration module, a deployment module, a service discovery module, a monitoring module, and a security module. The architecture design module uses Nomad as the core scheduler, which is responsible for the scheduling and management of database synchronization tasks; The task configuration module is used for task definition and configuration. By defining the Nomad task specification, the database synchronization task is abstracted into a configurable service unit. The deployment module is used for automated deployment and intelligent scheduling. It utilizes Nomad's automated deployment capabilities to automatically create and start the corresponding container or virtual machine instances based on the task configuration. The service discovery module is used for service discovery and load balancing. Through Nomad's service discovery mechanism, it automatically registers and discovers database synchronization service instances. The monitoring module is used for monitoring and alerting, and for real-time monitoring of the execution status of database synchronization tasks, resource usage, and the health status of the cluster. The security module is used for security assurance. It reduces security risks between different tasks by isolating container or virtual machine environments and enhances data isolation between different jobs through network layer policies. The task configuration module includes synchronization strategy, data source information, target database information, required synchronized tables and databases, and key parameters for unique task identifiers. This configuration is recorded in the syncmgr task, which modifies the number of parallel reader / writer task instances based on the task progress. In addition to specific configuration parameters, all tasks also need to configure the task's driver type and resource limits. After the configuration is confirmed, the Nomad job is started, and then the execution of each task is scheduled.
6. A database synchronization system supporting virtual machine and container deployment according to claim 5, characterized in that: The architecture design module utilizes containerization or virtualization technology to encapsulate database synchronization tools and their dependent environments, forming a portable deployment unit. Through Nomad's client and server architecture, it achieves dynamic task allocation and unified management of cluster resources. Nomad supports multiple types of drivers, which can be used to run and schedule tasks on different platforms. It supports running tasks in Docker containers, running binary files or scripts directly on the host, and running Java applications. It allows users to choose the most suitable deployment method to implement tasks and does not limit the implementation and deployment of application services. A Nomad cluster consists of a server and one or more client hosts. Tasks are scheduled and run within the cluster according to a policy, and the server exits after completing its function.
7. A database synchronization system supporting virtual machine and container deployment according to claim 5, characterized in that: The deployment module, through Nomad's scheduling algorithm, intelligently allocates virtual machine or container resources based on cluster resource usage and task requirements, ensuring efficient execution of synchronization tasks. Nomad also supports dynamic task migration and fault recovery, ensuring continuous service availability. Nomad supports multiple scheduling strategies, including least usage, optimal location, and random, helping tasks run on the best nodes in the cluster, thereby optimizing resource utilization and performance. The reader is deployed on a host closer to the source database, and the writer is deployed on a host closer to the destination database. Multiple reader and writer task instances are started during the synchronization of database table structure and full data to maximize resource utilization with high concurrency efficiency.
8. A database synchronization system supporting virtual machine and container deployment according to claim 5, characterized in that: When a new task is added or an existing task is removed, Nomad will automatically update the service list and distribute requests to appropriate service instances according to the load balancing strategy, thereby achieving automatic service scaling and failover. When the Reader / writer configuration is changed to one or more instances at different stages of task execution, Nomad will automatically scale up or down the actual running task instances.
Citation Information
Patent Citations
Distributed cluster fault-tolerant recovery method and system used under virtualization platform
CN115202917A
Job flow state control method and device, electronic equipment and storage medium
CN117785399A