Cross-cluster-based configuration synchronization method and device, equipment and medium

By deploying configuration synchronization units and index deletion synchronization units in the active-active architecture of Elasticsearch, the problem of low configuration synchronization accuracy is solved, configuration consistency and resource optimization of the master-slave cluster are achieved, and the reliability and security of the system are improved.

CN120658761AActive Publication Date: 2025-09-16PING AN TECH (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511060473.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2025-09-16
Estimated Expiration
2045-07-30

AI Technical Summary

Technical Problem

Elasticsearch's cross-cluster replication plug-in has configuration synchronization issues in the active-active architecture. ILM policies, index templates, index settings, and account permissions cannot be automatically synchronized, resulting in abnormal index status, structural errors, and confusion in permissions in the slave cluster. Index deletion operations cannot be synchronized, and deleted indexes are likely to remain in the slave cluster, occupying resources and causing data inconsistency. Configuration synchronization accuracy is low.

Method used

Deploy configuration synchronization units and index deletion synchronization units in the active-active architecture to monitor configuration changes and index deletion events in the master cluster. The configuration synchronization unit updates the slave cluster configuration, and the index deletion synchronization unit cleans up residual indexes in the slave cluster. The dynamic domain name routing mechanism is used to adjust the direction to ensure consistency between the master and slave clusters.

Benefits of technology

It improves the configuration synchronization accuracy of master-slave clusters, optimizes domain name management, reduces manual operations, enhances security and resource utilization, and improves the reliability of the active-active architecture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120658761A_ABST
    Figure CN120658761A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of cloud computing, can be applied to business system platforms of financial science and technology, medical health and the like, and discloses a cross-cluster-based configuration synchronization method, device, equipment and medium, and the method comprises the following steps: deploying a configuration synchronization unit and an index deletion synchronization unit in an active-active architecture, and monitoring a configuration change event of a main cluster; determining configuration synchronization information according to the configuration change event, and updating the configuration item of the slave cluster according to the configuration synchronization information to obtain a configuration synchronization result; monitoring an index deletion event according to the index deletion synchronization unit, and identifying index identification information of the index deletion event; cleaning the slave index according to the index identification information to obtain an index cleaning result; identifying the running state of the cluster, and adjusting the domain name direction to obtain a domain name configuration result; and determining synchronous configuration information according to the configuration synchronization result, the index cleaning result and the domain name configuration result. According to the invention, the accuracy of configuration synchronization of the master and slave clusters in the active-active architecture can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing technology, and in particular to a cross-cluster configuration synchronization method, device, equipment and medium. Background Art

[0002] The Cross-Cluster Replication plugin for Elasticsearch (a system that supports cross-cluster data processing) is the current foundational solution for cross-cluster data replication. It uses a one-way master-slave model, where the master cluster handles write operations, while the slave clusters only support read operations. The plugin's core function is data synchronization, asynchronously replicating write operations from the master cluster's index to the slave clusters, thereby maintaining data consistency across clusters. It is a common technical solution for cross-cluster data replication in the Elasticsearch ecosystem.

[0003] In the healthcare field, a hospital uses Elasticsearch to store patient medical records. The master cluster updates the ILM (Index Lifecycle Management) policy to automatically archive medical records older than three years. However, the slave clusters, because they have not synchronized this policy, still retain expired data. The master cluster adds an index template to standardize medical record fields. Because the template is missing in the slave clusters, the new medical record index fields are disordered. The master cluster adds query permissions for nurses, but the slave clusters are not synchronized. After the switch, the nurses cannot access the permissions. At the same time, the slave clusters still remain after the index is deleted, resulting in low accuracy in master-slave cluster configuration synchronization in the active-active architecture.

[0004] In the fintech business, a fintech company uses Elasticsearch to store user transaction data. The master cluster updates its ILM policy and automatically migrates transaction records from three months ago to cold nodes. Because the slave clusters did not synchronize this policy, a large amount of old data still occupied hot node resources. The master cluster added an index template to standardize loan field mapping. Because the template was missing from the slave clusters, the index structure of the new loan data was disordered. The master cluster added account permissions for the risk control team, but the slave clusters were not synchronized. After the switch, risk control personnel could not query data. At the same time, the master cluster deleted the failed test index, but the slave clusters still remained, resulting in low accuracy in master-slave cluster configuration synchronization in the active-active architecture.

[0005] Elasticsearch's cross-cluster replication plug-in has obvious shortcomings in active-active scenarios, such as the lack of configuration synchronization. ILM policies, index templates, index settings, accounts, and permissions cannot be automatically synchronized, resulting in abnormal index status, structural errors, and confusion of permissions in the slave cluster. Index deletion operations cannot be synchronized, and deleted indexes are easily left in the slave cluster, occupying resources and causing data inconsistency. This leads to low accuracy in master-slave cluster configuration synchronization in the active-active architecture. Summary of the Invention

[0006] The present invention provides a cross-cluster configuration synchronization method, device, equipment and medium to solve the technical problem of low master-slave cluster configuration synchronization accuracy in an active-active architecture.

[0007] In a first aspect, a cross-cluster configuration synchronization method is provided, including: Deploy a preset configuration synchronization unit and an index deletion synchronization unit in the active-active architecture, and monitor configuration change events of the primary cluster in the active-active architecture through the configuration synchronization unit; Determining configuration synchronization information of a slave cluster in the active-active architecture according to the configuration change event, and updating configuration items of the slave cluster according to the configuration synchronization information to obtain a configuration synchronization result; Monitoring the index deletion event of the primary cluster by the index deletion synchronization unit, and identifying index identification information corresponding to the index deletion event; Performing a cleanup operation on the slave index in the slave cluster according to the index identification information to obtain an index cleanup result; Identify the operating status of the master cluster and the slave cluster, and dynamically adjust the domain name pointing of the master cluster and the slave cluster using a preset domain name dynamic routing mechanism and the operating status to obtain a domain name configuration result; The synchronization configuration information of the active-active architecture is determined according to the configuration synchronization result, the index cleaning result, and the domain name configuration result.

[0008] In a second aspect, a cross-cluster configuration synchronization device is provided, including: A configuration change event monitoring module is used to deploy a preset configuration synchronization unit and index deletion synchronization unit in the active-active architecture, and monitor configuration change events of the primary cluster in the active-active architecture through the configuration synchronization unit; a configuration synchronization result acquisition module, configured to determine configuration synchronization information of a slave cluster in the active-active architecture according to the configuration change event, and update configuration items of the slave cluster according to the configuration synchronization information to obtain a configuration synchronization result; An index identification information identification module, configured to monitor index deletion events of the primary cluster according to the index deletion synchronization unit, and identify index identification information corresponding to the index deletion event; An index cleaning result acquisition module is used to perform a cleaning operation on the slave index in the slave cluster according to the index identification information to obtain an index cleaning result; A domain name configuration result acquisition module is used to identify the operating status of the master cluster and the slave cluster, dynamically adjust the domain name pointing of the master cluster and the slave cluster using a preset domain name dynamic routing mechanism and the operating status, and obtain a domain name configuration result; A synchronization configuration information determination module is used to determine the synchronization configuration information of the active-active architecture according to the configuration synchronization result, the index cleaning result and the domain name configuration result.

[0009] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned cross-cluster configuration synchronization method are implemented.

[0010] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned cross-cluster configuration synchronization method are implemented.

[0011] In the above-mentioned scheme implemented by the cross-cluster configuration synchronization method, device, equipment and medium, a preset configuration synchronization unit and an index deletion synchronization unit can be deployed in the active-active architecture through the client, and the configuration change event of the main cluster in the active-active architecture is monitored by the configuration synchronization unit; the configuration synchronization information of the slave cluster in the active-active architecture is determined according to the configuration change event, and the configuration items of the slave cluster are updated according to the configuration synchronization information to obtain the configuration synchronization result; the index deletion event of the main cluster is monitored according to the index deletion synchronization unit, and the index identification information corresponding to the index deletion event is identified; the slave index in the slave cluster is cleaned up according to the index identification information to obtain the index cleaning result; the main cluster and the slave cluster are identified. According to the running status of the slave cluster, the domain name pointing of the master cluster and the slave cluster is dynamically adjusted by using the preset domain name dynamic routing mechanism and the running status to obtain the domain name configuration result; the synchronization configuration information of the active-active architecture is determined according to the configuration synchronization result, the index cleaning result and the domain name configuration result. In the present invention, the configuration of the master cluster is synchronized by the configuration synchronization unit, and the index deletion synchronization unit cleans up the residual index of the slave cluster. Combined with the domain name dynamic routing adjustment pointing, the problem of configuration and deletion being out of sync can be solved. At the same time, domain name management is optimized, the consistency of the master-slave cluster is improved, manual operations are reduced, security and resource utilization are enhanced, and the reliability of the active-active architecture is improved. The problem of low master-slave cluster configuration synchronization accuracy in the active-active architecture can be solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0013] Figure 1This is a schematic diagram of an application environment based on a cross-cluster configuration synchronization method according to an embodiment of the present invention; Figure 2 This is a flow chart of a configuration synchronization method based on a cross-cluster according to an embodiment of the present invention; Figure 3 yes Figure 2 A schematic flow chart of a specific implementation of step S2; Figure 4 yes Figure 2 A schematic flow chart of a specific implementation of step S3; Figure 5 This is a structural diagram of a cross-cluster configuration synchronization device according to an embodiment of the present invention; Figure 6 is a structural diagram of a computer device in one embodiment of the present invention; Figure 7 FIG. 2 is another structural diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0014] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0015] The cross-cluster configuration synchronization method provided by the embodiment of the present invention can be applied in the following situations: Figure 1In an application environment, the client communicates with the server through a network. The server can deploy a preset configuration synchronization unit and an index deletion synchronization unit in the active-active architecture through the client, and monitor the configuration change event of the master cluster in the active-active architecture through the configuration synchronization unit; determine the configuration synchronization information of the slave cluster in the active-active architecture according to the configuration change event, and update the configuration items of the slave cluster according to the configuration synchronization information to obtain a configuration synchronization result; monitor the index deletion event of the master cluster according to the index deletion synchronization unit, and identify the index identification information corresponding to the index deletion event; clean up the slave index in the slave cluster according to the index identification information, and obtain an index cleaning result; identify the master cluster and the slave cluster. From the running state of the cluster, the domain name pointing of the master cluster and the slave cluster is dynamically adjusted using the preset domain name dynamic routing mechanism and the running state to obtain the domain name configuration result; the synchronization configuration information of the active-active architecture is determined according to the configuration synchronization result, the index cleaning result and the domain name configuration result. In the present invention, the configuration of the master cluster is synchronized by the configuration synchronization unit, and the index deletion synchronization unit cleans up the residual index of the slave cluster. Combined with the domain name dynamic routing adjustment pointing, the problem of configuration and deletion being out of sync can be solved, and at the same time, domain name management can be optimized, the consistency of the master-slave cluster can be improved, manual operations can be reduced, security and resource utilization can be enhanced, and the reliability of the active-active architecture can be improved. Among them, the client can be but is not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The server can be implemented with an independent server or a server cluster composed of multiple servers. The present invention is described in detail below through specific embodiments.

[0016] See also Figure 2 As shown, Figure 2 A schematic flow chart of a cross-cluster configuration synchronization method provided in an embodiment of the present invention includes the following steps: S1. Deploy a preset configuration synchronization unit and an index deletion synchronization unit in the active-active architecture, and monitor configuration change events of the primary cluster in the active-active architecture through the configuration synchronization unit.

[0017] In an embodiment of the present invention, the preset active-active architecture refers to a master-slave pairing architecture of a master cluster and a slave cluster in an Elasticsearch (a system that supports cross-cluster data processing) unidirectional master-slave active-active system based on a CCR (Cross-Cluster Replication) plug-in; the preset configuration synchronization unit refers to an independent configuration synchronization module that works in conjunction with the CCR plug-in to realize automatic synchronization of the ILM (Index Lifecycle Management) policy, index template, index settings and account permissions of the master cluster, and supports blacklist and whitelist settings (ILM policy, index template, account can be set to blacklist, index settings can be set to whitelist); the index deletion synchronization unit refers to a module that can monitor the master cluster index deletion change event, execute the slave cluster index deletion operation after verifying the legitimacy of the deletion operation (the index is a slave index and the master index has been deleted), and supports delayed deletion.

[0018] In detail, when deploying the configuration synchronization unit, first install it as an independent module in the server or container that hosts the active-active system, configure the network connection parameters of the module with the master cluster and slave cluster (including cluster address, communication port, authentication information), set the collaborative interaction rules with the CCR plug-in through the configuration file or management interface (such as event monitoring interface docking), complete the startup of the module service and verify its communication connectivity with the master-slave cluster and CCR plug-in; when deploying the index deletion synchronization unit, also install it as an independent module in the system, configure the network connection parameters with the master-slave cluster, preset the docking method with the master cluster deletion event monitor in the module, enter the judgment logic for the legitimacy verification of the deletion operation and the time parameters for delayed deletion, start the module service and confirm that it can normally receive the index deletion event of the master cluster and can send deletion instructions to the slave cluster.

[0019] For example, in a medical scenario, when a hospital deploys a configuration synchronization unit, it installs the configuration synchronization unit as an independent module on the local server of the active-active system, configures the intranet IP, encryption port and digital certificate of the master-slave cluster, sets the event monitoring rules with the CCR plug-in through the management interface, and verifies after startup that it can synchronize the electronic medical record index template (including diagnosis field mapping) and the medical record archiving ILM policy; the index deletion synchronization unit is installed in the same system container, configured with the same network parameters, and presets the docking method for monitoring expired medical record deletion events in the master cluster, enters the verification logic of "the slave index exists and the master index has been deleted" and the 30-day delayed deletion parameter, and after startup, confirms that it can receive deletion events and sends cleanup instructions to the slave cluster.

[0020] For example, in a financial scenario, a bank deploys an Elasticsearch master-slave active-active cluster to store transaction data. It configures the synchronization unit as a standalone module and installs it on the core server. It also configures the transaction node addresses, encrypted communication ports, and operation and maintenance keys for the master and slave clusters. It sets coordination rules with the CCR plug-in through configuration files, synchronizes transaction index templates (including transaction field mappings) and risk control ILM policies (such as one-year archiving), and verifies that customer account permissions are synchronized normally after startup. The index deletion synchronization unit is installed on the same system, configured with the same network parameters, and presets a docking method for monitoring expired transaction deletion events in the master cluster. It also enters verification logic for "slave index exists and master index has been deleted" and a 30-day delayed deletion parameter. After startup, it confirms that it can receive deletion events and sends cleanup instructions to the slave cluster.

[0021] In an embodiment of the present invention, the primary cluster refers to the cluster in the active-active architecture that is responsible for primary business processing and serves as the primary source of data reading and writing; the configuration change event refers to a modification operation involving system configuration that occurs in the primary cluster, such as parameter adjustment, node addition and deletion, permission setting change, and other events that affect the cluster configuration.

[0022] In the embodiment of the present invention, monitoring the configuration change event of the active cluster in the active-active architecture by the configuration synchronization unit includes: Determining the configuration items to be monitored of the primary cluster in the active-active architecture according to the synchronization configuration range preset in the configuration synchronization unit; Utilizing the state cache component in the configuration synchronization unit to extract the real-time state information and historical state information of the configuration item to be monitored; Comparing the real-time status information with the historical status information to obtain configuration difference information; A configuration change event of the active cluster in the active-active architecture is determined according to the configuration difference information.

[0023] Specifically, the preset synchronization configuration scope refers to the blacklist and whitelist set in the configuration synchronization module. ILM policies (index lifecycle management), index templates, and accounts can be blacklisted (data that does not need to be synchronized), while index settings can be whitelisted (data that does need to be synchronized). The monitored configuration items are ILM policies, index templates, accounts, and permissions that have changed in the primary cluster and are not on the blacklist, as well as index settings that have changed and are on the whitelist. The configuration synchronization unit uses the preset blacklist and whitelist to identify these configuration items as the monitored configuration items and then monitors change events for these configuration items.

[0024] Specifically, the state cache component is a component within the configuration synchronization unit that stores and manages state information. Real-time state information is the current, up-to-date state data for the monitored configuration item; historical state information is the state data of the monitored configuration item at different points in the past. By leveraging its ability to store and manage state information, the state cache component within the configuration synchronization unit extracts both real-time and historical state information for the monitored configuration item from its stored data.

[0025] Furthermore, configuration difference information refers to the difference between the real-time status information and the historical status information of the configuration item to be monitored. The real-time status information and the historical status information of the configuration item to be monitored are compared to find the differences between the two, and these differences are the obtained configuration difference information.

[0026] Furthermore, by identifying the specific configuration items corresponding to these different contents and their change details, the configuration change event of the active cluster in the active-active architecture can be determined.

[0027] For example, in a medical scenario, a hospital uses the Elasticsearch main cluster to store patient medical record indexes, and configures the synchronization unit to preset the synchronization scope as follows: ILM policy (managing the medical record index life cycle), index template (unified medical record index structure), and medical staff account permissions with a blacklist (items that do not require synchronization), and index settings (such as the number of copies) with a whitelist (items that require synchronization). Based on this, the configuration items to be monitored are determined to be non-blacklisted ILM policies, index templates, account permissions, and index settings in the whitelist; the state cache component extracts the real-time status (such as the ILM policy and template structure of the current medical record index) and historical status (such as the previous ILM policy and template structure) of these items to be monitored; the two are compared, and if it is found that the medical record retention period in the ILM policy is changed from 3 years to 5 years, configuration difference information is obtained; based on the difference, the ILM policy change event of the main cluster is determined.

[0028] For example, in a financial scenario, a bank uses the Elasticsearch main cluster to store transaction record indexes, and configures the synchronization unit to preset the synchronization scope as follows: ILM policy (managing the transaction record index life cycle), index template (unified transaction index structure), teller account permissions set blacklist (items that do not need to be synchronized), index settings (such as the number of shards) set whitelist (items that need to be synchronized), and thus determines that the configuration items to be monitored are ILM policies, index templates, account permissions and index settings in the whitelist that are not blacklisted; the state cache component extracts the real-time status (such as the ILM policy and template fields of the current transaction index) and historical status (such as the previous ILM policy and template fields) of these items to be monitored; compares the two, and if it is found that a "cross-border identification" item is newly added to the transaction field in the index template, configuration difference information is obtained; based on the difference, the index template change event of the main cluster is determined.

[0029] S2. Determine configuration synchronization information of a slave cluster in the active-active architecture according to the configuration change event, and update configuration items of the slave cluster according to the configuration synchronization information to obtain a configuration synchronization result.

[0030] In an embodiment of the present invention, the slave cluster is a cluster paired with the master cluster. The master cluster is responsible for writing, and the slave cluster originally only supports reading. It works with the master cluster through modules such as configuration synchronization to maintain consistency in configuration, etc.; the configuration synchronization information refers to the ILM policies, index templates, account permissions (not in the blacklist), and index settings (in the whitelist) that have changed in the master cluster. This information will be automatically synchronized to the slave cluster through the configuration synchronization module.

[0031] In the embodiment of the present invention, referring to Figure 3 As shown, determining the configuration synchronization information of the slave cluster in the active-active architecture according to the configuration change event includes: S31. Compliance filtering is performed on the configuration items corresponding to the configuration change event according to preset blacklist and whitelist rules to obtain target configuration items; S32: Integrate the changed content of the target configuration item to obtain a configuration synchronization data set; S33: Determine configuration synchronization information of a slave cluster in the active-active architecture according to the configuration synchronization data set.

[0032] Specifically, the preset blacklist and whitelist rules define blacklists for ILM policies, index templates, and accounts (data on the blacklist does not need to be synchronized), and whitelists for index settings (only data on the whitelist needs to be synchronized). Target configuration items are ILM policies, index templates, accounts, and permissions that have changed in the master cluster and are not on the blacklist, as well as index settings that have changed and are on the whitelist. Change events for ILM policies, index templates, index settings, accounts, and permissions on the master cluster are monitored, and the configuration items corresponding to these change events are filtered according to the preset blacklist and whitelist rules to determine the target configuration items to be synchronized to the slave cluster.

[0033] Specifically, the configuration synchronization dataset aggregates changes to target configuration items. The configuration synchronization module monitors changes to the master cluster's ILM policies, index templates, index settings, and account permissions. It then filters target configuration items based on blacklist and whitelist rules, and aggregates these changes into a configuration synchronization dataset.

[0034] Furthermore, the configuration synchronization information of the slave cluster in the active-active architecture is determined based on the configuration synchronization data set. This is done by combining the role of the slave cluster in the active-active architecture and the configuration synchronization rules (such as the configuration correspondence with the master cluster, data format requirements, etc.), parsing the target configuration item changes integrated in the configuration synchronization data set, extracting and adapting information that can be identified by the slave cluster, including the specific content of the changed configuration items, the scope of effectiveness, the execution method, etc., to form specific information that the slave cluster can use to complete configuration synchronization.

[0035] For example, in a medical scenario, in the electronic medical record system of a hospital's main cluster, when configuration change events such as diagnosis and treatment template updates and doctor authority adjustments are triggered, they are filtered according to the preset black and white lists. Patient privacy templates are not included in the blacklist, and diagnosis and treatment process templates and general authority settings become target configuration items in the whitelist. These changes are integrated to form a configuration synchronization data set, based on which the updated diagnosis and treatment process templates and corresponding doctor authority configuration information that need to be synchronized from the cluster of the branch hospital are determined.

[0036] For example, in a financial scenario, in the transaction system of a bank's main cluster, when configuration change events such as credit approval template updates and customer account permission adjustments are triggered, they are filtered according to the preset blacklist and whitelist. The core risk control algorithm parameters are not included in the blacklist, and the credit approval template and regular customer permission settings become target configuration items in the whitelist. These changes are integrated to form a configuration synchronization data set, based on which the branch determines the updated credit approval template and corresponding customer account permission configuration information that need to be synchronized from the cluster.

[0037] In an embodiment of the present invention, the configuration synchronization result refers to the REST API response status (such as HTTP status code) returned from the cluster after the configuration items (including ILM policies, index templates, index settings in the whitelist, accounts and permissions) of the master cluster are successfully or unsuccessfully updated to the slave cluster through the configuration synchronization module.

[0038] In the embodiment of the present invention, updating the configuration items of the slave cluster according to the configuration synchronization information to obtain a configuration synchronization result includes: Parsing the structured data of the configuration synchronization information to obtain configuration change data, and extracting the identifier of the configuration item to be updated in the configuration change data; Extracting the configuration item to be updated from the configuration items of the slave cluster according to the identifier of the configuration item to be updated; Obtaining configuration change content corresponding to the configuration item to be updated in the configuration change data; The configuration item to be updated is updated according to the configuration change content to obtain the configuration synchronization result of the slave cluster.

[0039] Specifically, configuration change data contains information about changes to ILM policies, index templates, index settings, and account permissions in the master cluster. Identifiers of configuration items to be updated refer to the identifiers of specific ILM policies, index templates, index settings, and account permissions identified in the configuration change data that need to be updated in the slave cluster. The configuration synchronization information generated by the master cluster is structured to generate the specific configuration change data. The identifiers of the specific configuration items that need to be updated in the slave cluster are then extracted from this data.

[0040] Specifically, the configuration item to be updated is the specific configuration content in the slave cluster that corresponds to the configuration item changed in the master cluster and needs to be updated. According to the identifier of the configuration item to be updated, the specific configuration content that needs to be updated corresponding to the identifier is found and extracted from all configuration items in the slave cluster.

[0041] Furthermore, configuration changes refer to the specific information about the updated configuration items in the master cluster, such as ILM policies, index templates, index settings, and account permissions. After receiving the configuration change data from the master cluster, the configuration synchronization module filters out the specific changes corresponding to the updated configuration items and extracts them for subsequent push to the slave clusters for updating.

[0042] Furthermore, the configuration synchronization module pushes the configuration changes that meet the conditions (non-blacklisted ILM policies, index templates, account permissions, and index settings in the whitelist) in the master cluster to the slave cluster. The slave cluster updates the extracted configuration items to be updated based on these contents, so that the corresponding configuration of the slave cluster is consistent with the master cluster, forming a configuration synchronization result.

[0043] S3. Monitor the index deletion event of the primary cluster according to the index deletion synchronization unit, and identify index identification information corresponding to the index deletion event.

[0044] In the embodiment of the present invention, the index deletion event refers to a change event in which an index is deleted in the primary cluster.

[0045] In the embodiment of the present invention, referring to Figure 4 As shown, the index deletion synchronization unit monitors the index deletion event of the main cluster, including: S41. Determine the index deletion range of the primary cluster according to a monitoring rule preset in the index deletion synchronization unit; S42: Build a real-time index list based on all index items within the index deletion range; S43: extracting a list of historical indexes within the index deletion range from a local snapshot database preset in the index deletion synchronization unit; S44: Compare the index items in the real-time index list with the index items in the historical index list to obtain index difference items; S45. Determine an index deletion event of the primary cluster according to the index difference item.

[0046] Specifically, the preset monitoring rules refer to the rules in the index deletion synchronization module used to verify the legitimacy of the deletion operation (the index is a slave index and the master index has been deleted) and support delayed deletion (such as automatic cleanup after 24 hours of retention); the index deletion range refers to the index range in the master cluster where deletion occurs and is determined by the monitoring rules to require synchronous deletion.

[0047] Specifically, the real-time index list is a real-time updated list consisting of all index items within the index deletion range that need to be deleted from the cluster. After determining the index deletion range of the primary cluster, the index deletion synchronization unit aggregates all index items within the range to construct the real-time index list.

[0048] Furthermore, the preset local snapshot database is a database pre-set in the index deletion synchronization unit for storing historical index snapshot information; the historical index list is a list of past indexes within the index deletion range. The index deletion synchronization unit extracts the list of past indexes within the index deletion range from its own pre-set local snapshot database for storing historical index snapshot information.

[0049] Furthermore, index difference items refer to index items that exist in the historical index list but not in the real-time index list, that is, index items deleted by the primary cluster. The index deletion synchronization module obtains the real-time index list after the primary cluster index deletion event and the historical index list before the event. By comparing these two lists, it finds index items that exist only in the historical index list but not in the real-time index list. These index items are the obtained index difference items.

[0050] In addition, based on the index difference items, the index items that originally existed in the main cluster but do not exist in the current real-time index list are analyzed, and the events corresponding to these index items are the index deletion events of the main cluster determined by the difference items.

[0051] S4. Perform a cleaning operation on the slave index in the slave cluster according to the index identification information to obtain an index cleaning result.

[0052] In an embodiment of the present invention, the index cleaning result refers to the slave index in the slave cluster corresponding to the master index that has been deleted from the main cluster, which is successfully deleted after the index deletion synchronization module verifies the legitimacy of the deletion operation, thereby realizing the synchronous cleaning of the slave cluster to the main cluster deleted index, avoiding the result of data residue.

[0053] In the embodiment of the present invention, performing a cleanup operation on the slave index in the slave cluster according to the index identification information to obtain an index cleanup result includes: Query and locate the slave index in the slave cluster according to the index identification information to obtain the index to be cleaned; Deleting the index to be cleaned according to the preset index cleaning rules to obtain a preliminary cleaning result; The preliminary cleaning result is subjected to a validity check to obtain the index cleaning result of the slave cluster.

[0054] Specifically, the index to be cleaned is a slave index in the slave cluster that corresponds to a master index that has been deleted from the master cluster. The index deletion synchronization module listens for index deletion change events from the master cluster to obtain index identification information. Based on this identification information, it searches and locates the slave index in the slave cluster. The slave index corresponding to the master index that has been deleted from the master cluster is the index to be cleaned.

[0055] Specifically, the preset index cleanup rules refer to the rules set in the index deletion synchronization module to verify the legitimacy of the deletion operation and support delayed deletion; the preliminary cleanup result refers to the result of executing the deletion operation on the index to be cleaned after it meets the preset index cleanup rules. After determining the index to be cleaned, the index deletion synchronization module verifies whether the index to be cleaned is a slave index and the corresponding master index has been deleted according to the preset index cleanup rules. If it meets the rules, the deletion operation is executed, and the preliminary cleanup result is obtained that the index to be cleaned has been deleted.

[0056] Furthermore, the preliminary cleaning result is checked for validity, that is, whether the index to be cleaned is a slave index and the corresponding master index in the master cluster has been deleted. If so, the preliminary cleaning result is confirmed to be valid, and the index cleaning result of the slave cluster is obtained.

[0057] S5. Identify the operating status of the master cluster and the slave cluster, and dynamically adjust the domain name pointing of the master cluster and the slave cluster using a preset domain name dynamic routing mechanism and the operating status to obtain a domain name configuration result.

[0058] In the embodiment of the present invention, the operating status refers to whether the master cluster and the slave cluster are operating normally or whether a fault occurs. This status directly affects the dual-domain dynamic routing and master-slave switching logic.

[0059] In detail, the operating status is identified by the system monitoring the operating conditions of the master cluster and the slave cluster. When a failure of the master cluster is detected, a master-slave switch is triggered based on the status.

[0060] In an embodiment of the present invention, the preset domain name dynamic routing mechanism refers to exposing read-write domain names and read-only domain names to users, and designing an intelligent routing strategy (the read-only domain name supports load balancing strategies in proportional mode, intelligent scheduling, master-slave mode, and polling mode, and is adjusted according to the cluster status during master-slave switching), and a mechanism for dynamically adjusting the domain name pointing according to the cluster status; the domain name pointing refers to the cluster to which the read-write domain name and read-only domain name specifically point; the domain name configuration result is the final pointing status of the read-write domain name and read-only domain name after dynamic adjustment.

[0061] In an embodiment of the present invention, dynamically adjusting the domain name pointing of the master cluster and the slave cluster using a preset domain name dynamic routing mechanism and the operating status to obtain a domain name configuration result includes: According to the preset domain name dynamic routing mechanism, the preset read-write domain name is pointed to the master cluster, and the preset read-only domain name is allocated to the master cluster and the slave cluster according to the preset weight ratio; When a failure of the master cluster is detected, the read-write domain name is switched from pointing to the master cluster to the slave cluster, and the read-only domain name is switched from pointing to both the master cluster and the slave cluster to pointing only to the slave cluster; Record the switching results of the read-write domain name and the read-only domain name respectively; The domain name configuration results of the master cluster and the slave cluster are determined according to the pointing switching result.

[0062] Specifically, the preset read-write domain name is exposed to users, points to the master cluster by default, and only allows write and read operations. The preset weight ratio is the ratio set for allocating read requests between the master and slave clusters in the proportional load balancing policy for read-only domain names (e.g., 70% master, 30% slave). The preset read-only domain name is exposed to users, points to the master and slave clusters by default, and read requests are allocated through the load balancing policy. Based on the preset dynamic domain name routing mechanism, the preset read-write domain name is directed to the master cluster, while the preset read-only domain name is allocated to the master and slave clusters according to the preset weight ratio, achieving separate routing for read-write and read-only traffic.

[0063] Specifically, when a failure in the primary cluster is detected, the metadata synchronization capability of the CCR plug-in is used to ensure that the slave cluster has writing capabilities, and when switching, the ILM policy, index template, account permissions, and index cleanup synchronization are triggered again to enable the slave cluster to have writing capabilities. After that, the reading and writing domain name is switched from pointing to the primary cluster to the slave cluster, and the reading-only domain name is switched from pointing to both the primary cluster and the slave cluster to pointing only to the slave cluster, and the read requests of the primary cluster are suspended to avoid reading unsynchronized data.

[0064] Furthermore, the switching result refers to the final cluster state of the read-write domain name and the read-only domain name after the switching. Specifically, the cluster the read-write domain name points to after the switching, and the cluster the read-only domain name points to after the switching, are recorded. After the switching operation is complete for both the read-write domain name and the read-only domain name, the final state of each domain name after the switching is recorded. Separately, the switching result is recorded for each domain name.

[0065] Furthermore, based on the pointing switching result, that is, based on the specific pointing situation of the read-write domain name and the read-only domain name recorded therein after the switching, the domain name pointing configuration corresponding to the master cluster and the slave cluster is clarified, and the corresponding relationship between the domain name and the cluster reflected in the pointing switching result is determined as the domain name configuration result of the master and slave clusters.

[0066] S6. Determine synchronization configuration information of the active-active architecture according to the configuration synchronization result, the index cleaning result, and the domain name configuration result.

[0067] In an embodiment of the present invention, the synchronization configuration information is the overall configuration information related to the master-slave cluster synchronization in the active-active architecture determined by comprehensively considering the configuration synchronization results (such as the synchronization status of ILM policies, index templates, account permissions, etc.), the index cleanup results (the execution status of index cleanup), and the domain name configuration results (the domain name pointing configuration of the master-slave cluster).

[0068] In detail, the configuration synchronization result obtained after the configuration synchronization module is executed, the index cleaning result obtained after the index deletion synchronization module is executed, and the domain name configuration result obtained after the domain name is dynamically adjusted are used as the basis. The information of these three is combined to integrate and determine the overall configuration information related to synchronization in the active-active architecture, that is, the synchronization configuration information of the active-active architecture is determined based on these three.

[0069] Specifically, the configuration synchronization module ensures consistency in ILM policies, index templates, account permissions, and whitelist index settings between the master and slave clusters. The index deletion synchronization module confirms that the slave cluster has cleared valid indexes deleted from the master cluster. Domain name configuration ensures that read-write domain names point to a valid master cluster and that read-only domain names distribute read traffic based on load policies. Only when all three elements are in the expected state (metadata synchronization complete, no index residue, and domain name pointing correctly) does the system determine that the synchronized configuration information is complete and valid.

[0070] It can be seen that in the above solution, by configuring the synchronization unit to synchronize the configuration of the main cluster, the index deletion synchronization unit to clean up the residual index of the slave cluster, and combining the domain name dynamic routing to adjust the direction, the problem of configuration and deletion asynchrony can be solved. At the same time, domain name management can be optimized, the consistency of the master and slave clusters can be improved, manual operations can be reduced, security and resource utilization can be enhanced, and the reliability of the active-active architecture can be improved.

[0071] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0072] In one embodiment, a cross-cluster configuration synchronization device is provided, which corresponds one-to-one to the cross-cluster configuration synchronization method in the above embodiment. Figure 5 As shown, the cross-cluster configuration synchronization device 100 includes a configuration change event monitoring module 101, a configuration synchronization result acquisition module 102, an index identification information identification module 103, an index cleaning result acquisition module 104, a domain name configuration result acquisition module 105, and a synchronization configuration information determination module 106. The functional modules are described in detail as follows: The configuration change event monitoring module 101 is used to deploy a preset configuration synchronization unit and an index deletion synchronization unit in the active-active architecture, and monitor the configuration change events of the active cluster in the active-active architecture through the configuration synchronization unit; The configuration synchronization result acquisition module 102 is configured to determine the configuration synchronization information of the slave cluster in the active-active architecture according to the configuration change event, and update the configuration items of the slave cluster according to the configuration synchronization information to obtain a configuration synchronization result; An index identification information identification module 103 is configured to monitor index deletion events of the primary cluster according to the index deletion synchronization unit and identify index identification information corresponding to the index deletion event; An index cleaning result acquisition module 104 is configured to perform a cleaning operation on the slave index in the slave cluster according to the index identification information to obtain an index cleaning result; The domain name configuration result acquisition module 105 is used to identify the operating status of the master cluster and the slave cluster, and dynamically adjust the domain name pointing of the master cluster and the slave cluster using a preset domain name dynamic routing mechanism and the operating status to obtain a domain name configuration result; The synchronization configuration information determination module 106 is configured to determine the synchronization configuration information of the active-active architecture according to the configuration synchronization result, the index cleaning result, and the domain name configuration result.

[0073] In one embodiment, the configuration change event monitoring module 101, when monitoring the configuration change event of the active cluster in the active-active architecture through the configuration synchronization unit, is configured to: Determining the configuration items to be monitored of the primary cluster in the active-active architecture according to the synchronization configuration range preset in the configuration synchronization unit; Utilizing the state cache component in the configuration synchronization unit to extract the real-time state information and historical state information of the configuration item to be monitored; Comparing the real-time status information with the historical status information to obtain configuration difference information; A configuration change event of the active cluster in the active-active architecture is determined according to the configuration difference information.

[0074] In one embodiment, the configuration synchronization result acquisition module 102, when determining the configuration synchronization information of the slave cluster in the active-active architecture according to the configuration change event, is configured to: Compliance filtering is performed on the configuration items corresponding to the configuration change event according to preset blacklist and whitelist rules to obtain the target configuration items; Integrate the changes to the target configuration items to obtain a configuration synchronization data set; Configuration synchronization information of a slave cluster in the active-active architecture is determined according to the configuration synchronization data set.

[0075] In one embodiment, the configuration synchronization result acquisition module 102, when updating the configuration items of the slave cluster according to the configuration synchronization information to obtain the configuration synchronization result, is further configured to: Parsing the structured data of the configuration synchronization information to obtain configuration change data, and extracting the identifier of the configuration item to be updated in the configuration change data; Extracting the configuration item to be updated from the configuration items of the slave cluster according to the identifier of the configuration item to be updated; Obtaining configuration change content corresponding to the configuration item to be updated in the configuration change data; The configuration item to be updated is updated according to the configuration change content to obtain the configuration synchronization result of the slave cluster.

[0076] In one embodiment, the index identification information recognition module 103, when monitoring the index deletion event of the primary cluster according to the index deletion synchronization unit, is configured to: Determining the index deletion range of the main cluster according to the monitoring rules preset in the index deletion synchronization unit; Build a real-time index list based on all index items within the index deletion range; Extracting a list of historical indexes within the index deletion range from a local snapshot database preset in the index deletion synchronization unit; Comparing the index items in the real-time index list with the index items in the historical index list to obtain index difference items; An index deletion event of the primary cluster is determined according to the index difference item.

[0077] In one embodiment, the index cleaning result acquisition module 104, when performing a cleaning operation on the slave index in the slave cluster according to the index identification information and obtaining the index cleaning result, is configured to: Query and locate the slave index in the slave cluster according to the index identification information to obtain the index to be cleaned; Deleting the index to be cleaned according to the preset index cleaning rules to obtain a preliminary cleaning result; The preliminary cleaning result is subjected to a validity check to obtain the index cleaning result of the slave cluster.

[0078] In one embodiment, the domain name configuration result acquisition module 105, when dynamically adjusting the domain name pointing of the master cluster and the slave cluster using a preset domain name dynamic routing mechanism and the operating status to obtain the domain name configuration result, is configured to: According to the preset domain name dynamic routing mechanism, the preset read-write domain name is pointed to the master cluster, and the preset read-only domain name is allocated to the master cluster and the slave cluster according to the preset weight ratio; When a failure of the master cluster is detected, the read-write domain name is switched from pointing to the master cluster to the slave cluster, and the read-only domain name is switched from pointing to both the master cluster and the slave cluster to pointing only to the slave cluster; Record the switching results of the read-write domain name and the read-only domain name respectively; The domain name configuration results of the master cluster and the slave cluster are determined according to the pointing switching result.

[0079] The present invention provides a cross-cluster configuration synchronization device, which synchronizes the master cluster configuration through a configuration synchronization unit, cleans up the residual index of the slave cluster through an index deletion synchronization unit, and combines the domain name dynamic routing to adjust the direction, thereby solving the problem of configuration and deletion being out of sync. At the same time, it optimizes domain name management, improves the consistency of the master-slave cluster, reduces manual operations, enhances security and resource utilization, and improves the reliability of the active-active architecture.

[0080] For the specific definition of the cross-cluster configuration synchronization device, please refer to the definition of the cross-cluster configuration synchronization method above, which will not be repeated here. The various modules in the above-mentioned cross-cluster configuration synchronization device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0081] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it implements a function or step on the server side of a configuration synchronization method based on a cross-cluster.

[0082] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, memory, network interface, display screen and input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps on the client side of a cross-cluster configuration synchronization method.

[0083] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are performed: Deploy a preset configuration synchronization unit and an index deletion synchronization unit in the active-active architecture, and monitor configuration change events of the primary cluster in the active-active architecture through the configuration synchronization unit; Determining configuration synchronization information of a slave cluster in the active-active architecture according to the configuration change event, and updating configuration items of the slave cluster according to the configuration synchronization information to obtain a configuration synchronization result; Monitoring the index deletion event of the primary cluster by the index deletion synchronization unit, and identifying index identification information corresponding to the index deletion event; Performing a cleanup operation on the slave index in the slave cluster according to the index identification information to obtain an index cleanup result; Identify the operating status of the master cluster and the slave cluster, and dynamically adjust the domain name pointing of the master cluster and the slave cluster using a preset domain name dynamic routing mechanism and the operating status to obtain a domain name configuration result; The synchronization configuration information of the active-active architecture is determined according to the configuration synchronization result, the index cleaning result, and the domain name configuration result.

[0084] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: Deploy a preset configuration synchronization unit and an index deletion synchronization unit in the active-active architecture, and monitor configuration change events of the primary cluster in the active-active architecture through the configuration synchronization unit; Determining configuration synchronization information of a slave cluster in the active-active architecture according to the configuration change event, and updating configuration items of the slave cluster according to the configuration synchronization information to obtain a configuration synchronization result; Monitoring the index deletion event of the primary cluster by the index deletion synchronization unit, and identifying index identification information corresponding to the index deletion event; Performing a cleanup operation on the slave index in the slave cluster according to the index identification information to obtain an index cleanup result; Identify the operating status of the master cluster and the slave cluster, and dynamically adjust the domain name pointing of the master cluster and the slave cluster using a preset domain name dynamic routing mechanism and the operating status to obtain a domain name configuration result; The synchronization configuration information of the active-active architecture is determined according to the configuration synchronization result, the index cleaning result, and the domain name configuration result.

[0085] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can be found in the relevant descriptions of the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

[0086] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0087] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0088] It should be noted that if software tools or components other than those of our company appear in the embodiments of this application, they are only used for illustration and do not represent actual use.

[0089] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. A cross-cluster configuration synchronization method, characterized in that: include: Deploy a preset configuration synchronization unit and an index deletion synchronization unit in the active-active architecture, and monitor configuration change events of the primary cluster in the active-active architecture through the configuration synchronization unit; Determining configuration synchronization information of a slave cluster in the active-active architecture according to the configuration change event, and updating configuration items of the slave cluster according to the configuration synchronization information to obtain a configuration synchronization result; Monitoring the index deletion event of the primary cluster by the index deletion synchronization unit, and identifying index identification information corresponding to the index deletion event; Performing a cleanup operation on the slave index in the slave cluster according to the index identification information to obtain an index cleanup result; Identify the operating status of the master cluster and the slave cluster, and dynamically adjust the domain name pointing of the master cluster and the slave cluster using a preset domain name dynamic routing mechanism and the operating status to obtain a domain name configuration result; The synchronization configuration information of the active-active architecture is determined according to the configuration synchronization result, the index cleaning result, and the domain name configuration result.

2. The cross-cluster configuration synchronization method according to claim 1, wherein: The monitoring of the configuration change event of the primary cluster in the active-active architecture by the configuration synchronization unit includes: Determining the configuration items to be monitored of the primary cluster in the active-active architecture according to the synchronization configuration range preset in the configuration synchronization unit; Utilizing the state cache component in the configuration synchronization unit to extract the real-time state information and historical state information of the configuration item to be monitored; Comparing the real-time status information with the historical status information to obtain configuration difference information; A configuration change event of the active cluster in the active-active architecture is determined according to the configuration difference information.

3. The cross-cluster configuration synchronization method according to claim 1, wherein: The determining, according to the configuration change event, configuration synchronization information of a slave cluster in the active-active architecture includes: Compliance filtering is performed on the configuration items corresponding to the configuration change event according to preset blacklist and whitelist rules to obtain the target configuration items; Integrate the changes to the target configuration items to obtain a configuration synchronization data set; Configuration synchronization information of a slave cluster in the active-active architecture is determined according to the configuration synchronization data set.

4. The cross-cluster configuration synchronization method according to claim 1, wherein: The updating of the configuration items of the slave cluster according to the configuration synchronization information to obtain a configuration synchronization result includes: Parsing the structured data of the configuration synchronization information to obtain configuration change data, and extracting the identifier of the configuration item to be updated in the configuration change data; Extracting the configuration item to be updated from the configuration items of the slave cluster according to the identifier of the configuration item to be updated; Obtaining configuration change content corresponding to the configuration item to be updated in the configuration change data; The configuration item to be updated is updated according to the configuration change content to obtain the configuration synchronization result of the slave cluster.

5. The cross-cluster configuration synchronization method according to claim 1, wherein: The monitoring of the index deletion event of the primary cluster according to the index deletion synchronization unit includes: Determining the index deletion range of the main cluster according to the monitoring rules preset in the index deletion synchronization unit; Build a real-time index list based on all index items within the index deletion range; Extracting a list of historical indexes within the index deletion range from a local snapshot database preset in the index deletion synchronization unit; Comparing the index items in the real-time index list with the index items in the historical index list to obtain index difference items; An index deletion event of the primary cluster is determined according to the index difference item.

6. The cross-cluster configuration synchronization method according to claim 1, wherein: The performing a cleaning operation on the slave index in the slave cluster according to the index identification information to obtain an index cleaning result includes: Query and locate the slave index in the slave cluster according to the index identification information to obtain the index to be cleaned; Deleting the index to be cleaned according to the preset index cleaning rules to obtain a preliminary cleaning result; The preliminary cleaning result is subjected to a validity check to obtain the index cleaning result of the slave cluster.

7. The cross-cluster configuration synchronization method according to claim 1, wherein: The dynamically adjusting the domain name pointing of the master cluster and the slave cluster by using the preset domain name dynamic routing mechanism and the operating status to obtain the domain name configuration result includes: According to the preset domain name dynamic routing mechanism, the preset read-write domain name is pointed to the master cluster, and the preset read-only domain name is allocated to the master cluster and the slave cluster according to the preset weight ratio; When a failure of the master cluster is detected, the read-write domain name is switched from pointing to the master cluster to the slave cluster, and the read-only domain name is switched from pointing to both the master cluster and the slave cluster to pointing only to the slave cluster; Record the switching results of the read-write domain name and the read-only domain name respectively; The domain name configuration results of the master cluster and the slave cluster are determined according to the pointing switching result.

8. A cross-cluster configuration synchronization device, characterized in that: include: A configuration change event monitoring module is used to deploy a preset configuration synchronization unit and index deletion synchronization unit in the active-active architecture, and monitor configuration change events of the primary cluster in the active-active architecture through the configuration synchronization unit; a configuration synchronization result acquisition module, configured to determine configuration synchronization information of a slave cluster in the active-active architecture according to the configuration change event, and update configuration items of the slave cluster according to the configuration synchronization information to obtain a configuration synchronization result; An index identification information identification module, configured to monitor index deletion events of the primary cluster according to the index deletion synchronization unit, and identify index identification information corresponding to the index deletion event; An index cleaning result acquisition module is used to perform a cleaning operation on the slave index in the slave cluster according to the index identification information to obtain an index cleaning result; A domain name configuration result acquisition module is used to identify the operating status of the master cluster and the slave cluster, dynamically adjust the domain name pointing of the master cluster and the slave cluster using a preset domain name dynamic routing mechanism and the operating status, and obtain a domain name configuration result; A synchronization configuration information determination module is used to determine the synchronization configuration information of the active-active architecture according to the configuration synchronization result, the index cleaning result and the domain name configuration result.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the cross-cluster configuration synchronization method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the cross-cluster configuration synchronization method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Configuration item synchronization method, device, system and equipment

    CN115550382A

  • Data synchronization method and electronic equipment

    CN118520051A

  • Network equipment configuration method and device, storage medium and program product

    CN119676073A

  • Systems and methods for indexing source code in a search engine

    US20180150487A1