Cross-cluster based configuration synchronization method, apparatus, device and medium
By deploying configuration synchronization and index deletion synchronization units in an active-active Elasticsearch architecture, configuration changes and index deletion events of the master cluster are monitored and synchronized, residual indexes of the slave cluster are cleaned up, and dynamic domain name routing is combined to solve the problem of low accuracy of configuration synchronization and improve the consistency and reliability of the master and slave clusters.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PING AN TECH (SHENZHEN) CO LTD
- Filing Date
- 2025-07-30
- Publication Date
- 2026-07-21
AI Technical Summary
In a dual-active architecture, Elasticsearch's cross-cluster replication plugin suffers from configuration synchronization issues. ILM policies, index templates, index settings, and account permissions cannot be automatically synchronized, leading to abnormal index status, structural errors, and permission confusion in the slave cluster. Index deletion operations cannot be synchronized, and deleted indexes may remain in the slave cluster, consuming resources and causing data inconsistency. The accuracy of configuration synchronization is also low.
In a dual-active architecture, a configuration synchronization unit and an index deletion synchronization unit are deployed to monitor configuration changes and index deletion events of the master cluster. The configuration synchronization unit updates the configuration of the slave cluster, and the index deletion synchronization unit cleans up residual indexes in the slave cluster. Combined with the domain name dynamic routing mechanism, the pointers are adjusted to ensure the consistency of the master and slave clusters.
It resolves the issue of missynchronization between configuration and deletion, optimizes domain name management, improves consistency between master and slave clusters, reduces manual operations, enhances security and resource utilization, and improves the reliability of the active-active architecture.
Smart Images

Figure CN120658761B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud computing technology, and in particular to a cross-cluster configuration synchronization method, apparatus, device, and medium. Background Technology
[0002] The Cross-Cluster Replication plugin for Elasticsearch (a system that supports cross-cluster data processing) is the fundamental solution for cross-cluster data replication. It employs a unidirectional master-slave model, where the master cluster handles write operations, and the slave cluster only supports read operations. The core function of this plugin is data synchronization, which asynchronously replicates write operations from the master cluster's indexes to the slave cluster, thereby maintaining data consistency across clusters. It is a standard 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 its ILM (Index Lifecycle Management) policy to automatically archive medical records older than 3 years. However, the slave cluster retains expired data because it has not synchronized with this policy. The master cluster adds an index template to standardize medical record fields, but the slave cluster has incorrect index fields due to missing templates. The master cluster adds query permissions for nurses, but the slave cluster does not synchronize, so nurses cannot access the data after a switchover. In addition, the slave cluster retains the deleted indexes, resulting in low accuracy of master-slave cluster configuration synchronization in the dual-active architecture.
[0004] In the fintech business, a fintech company uses Elasticsearch to store user transaction data. When the master cluster updates its ILM strategy, it automatically migrates transaction records older than three months to cold nodes. However, because the slave cluster does not synchronize with this strategy, a large amount of old data still occupies the resources of hot nodes. The master cluster adds an index template to standardize the mapping of lending and borrowing fields. However, because the template is missing, the index structure of the new lending and borrowing data in the slave cluster is disordered. The master cluster adds account permissions for the risk control team, but the slave cluster does not synchronize. After the switch, the risk control personnel cannot query the data. At the same time, the master cluster deletes invalid test indexes, but these remain in the slave cluster. This results in low accuracy of master-slave cluster configuration synchronization in a dual-active architecture.
[0005] Elasticsearch's cross-cluster replication plugin has significant shortcomings in active-active scenarios. For example, configuration synchronization is missing, and ILM strategies, index templates, index settings, accounts, and permissions cannot be automatically synchronized, resulting in abnormal index status, structural errors, and permission confusion in the slave cluster. Index deletion operations cannot be synchronized, and deleted indexes are prone to remain in the slave cluster, consuming resources and causing data inconsistency, resulting in low accuracy of master-slave cluster configuration synchronization in active-active architectures. Summary of the Invention
[0006] This invention provides a cross-cluster configuration synchronization method, apparatus, device, and medium to solve the technical problem of low accuracy in master-slave cluster configuration synchronization in a dual-active architecture.
[0007] Firstly, a cross-cluster configuration synchronization method is provided, including: In a dual-active architecture, a preset configuration synchronization unit and an index deletion synchronization unit are deployed, and the configuration synchronization unit is used to listen for configuration change events of the primary cluster in the dual-active architecture. Based on the configuration change event, determine the configuration synchronization information of the slave cluster in the dual-active architecture, update the configuration items of the slave cluster according to the configuration synchronization information, and obtain the configuration synchronization result; The index deletion synchronization unit listens for index deletion events in the main cluster and identifies the index identification information corresponding to the index deletion event. Based on the index identification information, a cleanup operation is performed on the slave index in the slave cluster to obtain the index cleanup result; Identify the operating status of the master cluster and the slave cluster, and dynamically adjust the domain name pointers of the master cluster and the slave cluster using a preset dynamic domain name routing mechanism and the operating status to obtain the domain name configuration result; The synchronization configuration information of the active-active architecture is determined based on the configuration synchronization result, the index cleanup result, and the domain name configuration result.
[0008] Secondly, a cross-cluster configuration synchronization device is provided, including: The configuration change event listening module is used to deploy a preset configuration synchronization unit and index deletion synchronization unit in a dual-active architecture, and to listen for configuration change events of the main cluster in the dual-active architecture through the configuration synchronization unit. The configuration synchronization result acquisition module is used to determine the configuration synchronization information of the slave cluster in the dual-active architecture based on the configuration change event, update the configuration items of the slave cluster according to the configuration synchronization information, and obtain the configuration synchronization result. The index identification information recognition module is used to identify the index identification information corresponding to the index deletion event by listening to the index deletion event of the main cluster according to the index deletion synchronization unit. The index cleanup result acquisition module is used to perform cleanup operations on the slave indexes in the slave cluster according to the index identification information, and obtain the index cleanup result; The domain name configuration result acquisition module is used to identify the running 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 running status to obtain the domain name configuration result; The synchronization configuration information determination module is used to determine the synchronization configuration information of the dual-active architecture based on the configuration synchronization result, the index cleanup result, and the domain name configuration result.
[0009] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described cross-cluster-based configuration synchronization method.
[0010] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described cross-cluster-based configuration synchronization method.
[0011] In the above-described scheme based on cross-cluster configuration synchronization methods, devices, equipment, and media, a pre-defined configuration synchronization unit and index deletion synchronization unit can be deployed in a dual-active architecture via a client. The configuration synchronization unit listens for configuration change events of the primary cluster in the dual-active architecture; determines the configuration synchronization information of the secondary cluster in the dual-active architecture based on the configuration change events; updates the configuration items of the secondary cluster according to the configuration synchronization information to obtain a configuration synchronization result; the index deletion synchronization unit listens for index deletion events of the primary cluster and identifies the index identification information corresponding to the index deletion event; performs a cleanup operation on the secondary indexes in the secondary cluster according to the index identification information to obtain an index cleanup result; and identifies the primary cluster and the secondary cluster. The invention describes the operating status of the slave cluster and uses a preset dynamic domain name routing mechanism and the operating status to dynamically adjust the domain name pointers of the master cluster and the slave cluster to obtain domain name configuration results. Based on the configuration synchronization results, the index cleanup results, and the domain name configuration results, the synchronization configuration information of the active-active architecture is determined. In this invention, the master cluster configuration is synchronized by the configuration synchronization unit, and the slave cluster residual index is cleaned by the index deletion synchronization unit. Combined with the dynamic domain name routing adjustment, the problem of configuration and deletion not being synchronized can be solved. At the same time, domain name management is optimized, the consistency between master and slave clusters is improved, manual operation is reduced, security and resource utilization are enhanced, and the reliability of the active-active architecture is improved. This can solve the problem of low accuracy of master and slave cluster configuration synchronization in active-active architecture. Attached Figure Description
[0012] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1This is a schematic diagram of an application environment for a cross-cluster configuration synchronization method according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating a cross-cluster configuration synchronization method according to an embodiment of the present invention; Figure 3 yes Figure 2 A flowchart illustrating a specific implementation method of step S2; Figure 4 yes Figure 2 A flowchart illustrating a specific implementation method of step S3; Figure 5 This is a schematic diagram of a cross-cluster configuration synchronization device according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 7 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0014] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0015] The cross-cluster configuration synchronization method provided in this invention can be applied to applications such as... Figure 1In this application environment, the client communicates with the server via a network. The server can deploy pre-defined configuration synchronization units and index deletion synchronization units in a dual-active architecture through the client. The configuration synchronization unit listens for configuration change events of the master cluster in the dual-active architecture; determines the configuration synchronization information of the slave cluster based on the configuration change events; updates the configuration items of the slave cluster according to the configuration synchronization information to obtain a configuration synchronization result; the index deletion synchronization unit listens for index deletion events of the master cluster, identifies the index identifier information corresponding to the index deletion event; performs a cleanup operation on the slave indexes in the slave cluster according to the index identifier information to obtain an index cleanup result; and identifies the relationship between the master cluster and the slave cluster. Based on the cluster's operational status, a preset dynamic domain name routing mechanism and the operational status are used to dynamically adjust the domain name pointers of the master and slave clusters to obtain domain name configuration results. The synchronization configuration information of the active-active architecture is determined based on the configuration synchronization result, the index cleanup result, and the domain name configuration result. In this invention, the master cluster configuration is synchronized by a configuration synchronization unit, and residual indexes in the slave cluster are cleaned by an index deletion synchronization unit. Combined with dynamic domain name routing adjustment, the problem of configuration and deletion asynchrony can be solved. Simultaneously, domain name management is optimized, master-slave cluster consistency is improved, manual operations are reduced, security and resource utilization are enhanced, and the reliability of the active-active architecture is improved. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster composed of multiple servers. The invention will be described in detail below through specific embodiments.
[0016] Please see Figure 2 As shown, Figure 2 A flowchart illustrating 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 index deletion synchronization unit in the dual-active architecture, and listen for configuration change events of the main cluster in the dual-active architecture through the configuration synchronization unit.
[0017] In this embodiment of the invention, the preset active-active architecture refers to a master-slave pairing architecture of one master cluster and one slave cluster in an Elasticsearch (a system supporting cross-cluster data processing) unidirectional master-slave active-active system based on the CCR (Cross-Cluster Replication) plugin; the preset configuration synchronization unit refers to an independent configuration synchronization module that works in conjunction with the CCR plugin to automatically synchronize the master cluster's ILM (Index Lifecycle Management) policies, index templates, index settings, and account permissions, and supports blacklist and whitelist settings (ILM policies, index templates, and accounts can be blacklisted, and index settings can be whitelisted); the index deletion synchronization unit refers to a module that can listen for master cluster index deletion change events, and execute slave cluster index deletion operations after verifying the legality 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 and configuring the synchronization unit, it is first installed as an independent module in the server or container hosting the dual-active system. The network connection parameters (including cluster address, communication port, and authentication information) between the module and the master and slave clusters are configured. The collaborative interaction rules with the CCR plugin (such as event listening interface interface) are set through the configuration file or management interface. The module service is started and its communication connectivity with the master and slave clusters and the CCR plugin is verified. When deploying the index deletion synchronization unit, it is also installed as an independent module in the system. The network connection parameters with the master and slave clusters are configured. The interface method with the master cluster deletion event listener is preset in the module. The judgment logic for the legality verification of the deletion operation and the time parameter for delayed deletion are entered. The module service is started and it is confirmed that it can receive the index deletion event from the master cluster and send deletion commands 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 a dual-active system. It configures the internal network IP, encrypted port, and digital certificates of medical staff for the master and slave clusters. Through the management interface, it sets the event listening rules with the CCR plugin. After startup, it verifies that it can synchronize the electronic medical record index template (including diagnostic field mapping) and the medical record archiving ILM policy. The index deletion synchronization unit is installed in the container of the same system, configured with the same network parameters, presets the docking method for listening to the deletion events of expired medical records 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, it confirms that it can receive deletion events and send cleanup commands to the slave cluster.
[0020] For example, in a financial scenario, a bank deploys an Elasticsearch master-slave dual-active cluster to store transaction data. A synchronization unit is configured as an independent module installed on the core server. The transaction node addresses, encrypted communication ports, and operation and maintenance keys of the master and slave clusters are configured. Collaboration rules with the CCR plugin are set through configuration files to synchronize transaction index templates (including transaction history field mappings) and risk control ILM policies (such as 1-year archiving). After startup, it verifies that customer account permissions are synchronized normally. The index deletion synchronization unit is installed on the same system, configured with the same network parameters, and presets the connection method for listening to expired transaction deletion events on the master cluster. Verification logic for "the slave index exists and the master index has been deleted" and a 30-day delayed deletion parameter are entered. After startup, it confirms that deletion events can be received and sends cleanup commands to the slave cluster.
[0021] In this embodiment of the invention, the primary cluster refers to the cluster in a dual-active architecture that undertakes the main business processing and serves as the main source of data read and write; the configuration change event refers to the modification operation involving system configuration that occurs in the primary cluster, such as parameter adjustment, node addition or removal, permission setting change, and other events that affect the cluster configuration.
[0022] In this embodiment of the invention, the step of monitoring configuration change events of the primary cluster in the dual-active architecture through the configuration synchronization unit includes: The configuration items to be monitored in the primary cluster of the dual-active architecture are determined according to the preset synchronization configuration range in the configuration synchronization unit. The real-time and historical status information of the configuration item to be monitored is extracted using the status caching component in the configuration synchronization unit. The real-time status information is compared with the historical status information to obtain configuration difference information; The configuration change event of the primary cluster in the dual-active architecture is determined based on the configuration difference information.
[0023] In detail, the preset synchronization configuration scope refers to the blacklists and whitelists 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 needs to be synchronized). The configuration items to be monitored are ILM policies, index templates, accounts, and permissions that have changed in the main cluster but are not on the blacklist, as well as index settings that have changed but are on the whitelist. The configuration synchronization unit uses the preset blacklists and whitelists to determine the above-mentioned configuration items that need to be synchronized as the configuration items to be monitored, and then listens for change events of these configuration items.
[0024] Specifically, the state cache component is a component in the configuration synchronization unit used to store and manage state information; real-time state information is the latest state data of the configuration item to be monitored at the current moment; historical state information is the state data of the configuration item to be monitored at different points in the past. The state cache component in the configuration synchronization unit, leveraging its function of storing and managing state information, extracts the real-time and historical state information of the configuration item to be monitored from its stored data.
[0025] Furthermore, configuration difference information refers to the differences between the real-time status information and the historical status information of the configuration item to be monitored. The real-time and historical status information of the configuration item to be monitored are compared to identify the differences; these differences constitute the configuration difference information.
[0026] Furthermore, by identifying the specific configuration items corresponding to these different contents and their change details, the configuration change events of the primary cluster in a dual-active architecture can be determined.
[0027] For example, in a medical scenario, a hospital uses an Elasticsearch master cluster to store patient medical record indexes. The synchronization unit is configured with the following preset synchronization scope: ILM policy (managing the lifecycle of the medical record index), index template (unifying the medical record index structure), blacklisting of medical staff account permissions (items not requiring synchronization), and whitelisting of index settings (such as the number of replicas) (items requiring synchronization). Based on this, the configuration items to be monitored are the non-blacklisted ILM policy, index template, account permissions, and whitelisted index settings. The state caching component extracts the real-time status (such as the current medical record index's ILM policy and template structure) 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 has changed from 3 years to 5 years, the configuration difference information is obtained. Based on this difference, the ILM policy change event of the master cluster is determined.
[0028] For example, in a financial scenario, a bank uses an Elasticsearch master cluster to store transaction record indexes. The synchronization unit is configured with the following preset synchronization scope: ILM policy (managing the lifecycle of transaction record indexes), index template (unifying the transaction index structure), blacklisting of teller account permissions (items not requiring synchronization), and whitelisting of index settings (such as the number of shards) (items requiring synchronization). Based on this, the configuration items to be monitored are the non-blacklisted ILM policies, index templates, account permissions, and index settings in the whitelist. The state caching component extracts the real-time status (such as the current transaction index's ILM policy and template fields) and historical status (such as previous ILM policies and template fields) of these items to be monitored. The two are compared, and if a "cross-border identifier" item is found to have been added to the transaction fields in the index template, the configuration difference information is obtained. The index template change event of the master cluster is determined based on this difference.
[0029] S2. Determine the configuration synchronization information of the slave cluster in the dual-active architecture based on the configuration change event, update the configuration items of the slave cluster based on the configuration synchronization information, and obtain the configuration synchronization result.
[0030] In this embodiment of the invention, the slave cluster is a cluster paired with the master cluster. The master cluster is responsible for writing, while the slave cluster originally only supports reading. Through configuration synchronization and other modules, it works with the master cluster to maintain configuration consistency. The configuration synchronization information refers to the ILM policy, index template, 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 this embodiment of the invention, reference is made to Figure 3 As shown, determining the configuration synchronization information of the slave cluster in the active-active architecture based on the configuration change event includes: S31. According to the preset blacklist and whitelist rules, the configuration items corresponding to the configuration change event are filtered for compliance to obtain the target configuration item; S32. Integrate the changes to the target configuration items to obtain a configuration synchronization dataset; S33. Determine the configuration synchronization information of the slave cluster in the dual-active architecture based on the configuration synchronization dataset.
[0032] In detail, the preset blacklist and whitelist rules refer to the ability to set blacklists for ILM policies, index templates, and accounts (data in the blacklist does not need to be synchronized), and to set whitelists for index settings (only data in the whitelist needs to be synchronized). The target configuration items are ILM policies, index templates, accounts, and permissions that have changed in the primary cluster but are not on the blacklist, and index settings that have changed but are on the whitelist. The system monitors ILM policy, index template, index settings, and account and permission change events in the primary cluster, and filters the corresponding configuration items according to the preset blacklist and whitelist rules to obtain the target configuration items that need to be synchronized to the slave cluster.
[0033] Specifically, the configuration synchronization dataset is a collection obtained by integrating the changes to the target configuration items. The configuration synchronization module monitors change events in the master cluster's ILM policy, index templates, index settings, and account permissions. It filters these changes according to blacklist and whitelist rules to obtain the target configuration items, and then aggregates the changes to these target configuration items to form the configuration synchronization dataset.
[0034] Furthermore, determining the configuration synchronization information of the slave cluster in the active-active architecture based on the configuration synchronization dataset involves 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.). The changes in the target configuration items integrated in the configuration synchronization dataset are parsed, and the information that the slave cluster can recognize is extracted and adapted, including the specific content of the changed configuration items, the scope of effect, 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, after configuration change events such as updates to treatment templates and adjustments to doctor permissions are triggered, the system filters according to preset blacklists and whitelists. Patient privacy templates are not included in the blacklist, while treatment process templates and regular permission settings are included in the whitelist and become target configuration items. These changes are integrated to form a configuration synchronization dataset, based on which the updated treatment process templates and corresponding doctor permission configuration information that the branch hospital needs to synchronize from the cluster are determined.
[0036] For example, in a financial scenario, in the transaction system of a bank's main cluster, after configuration change events such as credit approval template updates and customer account permission adjustments are triggered, the system filters according to preset blacklists and whitelists. Core risk control algorithm parameters are not included in the blacklist, while credit approval templates and regular customer permission settings become target configuration items in the whitelist. These changes are integrated to form a configuration synchronization dataset, based on which the updated credit approval templates and corresponding customer account permission configuration information that the branch needs to synchronize from the cluster are determined.
[0037] In this embodiment of the invention, the configuration synchronization result refers to the REST API response status (such as HTTP status code) returned by the slave cluster after the configuration items changed by the master cluster (including ILM policy, index template, index settings in the whitelist, accounts and permissions) are successfully or unsuccessfully updated to the slave cluster through the configuration synchronization module.
[0038] In this embodiment of the invention, updating the configuration items of the slave cluster according to the configuration synchronization information to obtain the configuration synchronization result includes: The structured data of configuration synchronization information is parsed to obtain configuration change data, and the identifiers of configuration items to be updated are extracted from the configuration change data. The configuration item to be updated is extracted from the configuration items in the cluster based on the identifier of the configuration item to be updated; Obtain the configuration change content corresponding to the configuration item to be updated from the configuration change data; The configuration items to be updated are updated according to the configuration changes to obtain the configuration synchronization result of the slave cluster.
[0039] In detail, configuration change data refers to specific information about changes to ILM policies, index templates, index settings, and account permissions in the primary cluster; the identifiers of configuration items to be updated refer to the identifiers in the configuration change data that indicate specific ILM policies, index templates, index settings, and account permissions that need to be updated in the secondary cluster. The configuration synchronization information generated by the primary cluster is structured to obtain the specific configuration change data, and then the identifiers of the specific configuration items that need to be updated in the secondary cluster are extracted from this data.
[0040] Specifically, the configuration item to be updated is the specific configuration content in the cluster that corresponds to the configuration item that has changed in the main cluster and needs to be updated. Based on the identifier of the configuration item to be updated, the specific configuration content that needs to be updated corresponding to that identifier is found and extracted from all configuration items in the cluster.
[0041] Furthermore, the configuration change content refers to the specific information regarding changes to the ILM policy, index template, index settings, and account permissions in the primary cluster. After obtaining the configuration change data from the primary cluster, the configuration synchronization module filters out and extracts the specific changes corresponding to the configuration items to be updated, so that they can be pushed to the secondary clusters for subsequent updates.
[0042] Furthermore, the configuration synchronization module pushes configuration changes that meet the conditions (non-blacklisted ILM policies, index templates, account permissions, and whitelisted index settings) from the master cluster to the slave cluster. The slave cluster updates the extracted configuration items to be updated based on these changes, ensuring that the corresponding configurations of the slave cluster are consistent with those of the master cluster, thus forming a configuration synchronization result.
[0043] S3. The index deletion synchronization unit listens for index deletion events in the main cluster and identifies the index identification information corresponding to the index deletion event.
[0044] In this embodiment of the invention, the index deletion event refers to a change event in the primary cluster in which an index is deleted.
[0045] In this embodiment of the invention, reference is made to Figure 4 As shown, the step of listening to the index deletion event of the main cluster according to the index deletion synchronization unit includes: S41. Determine the index deletion range of the main cluster according to the preset monitoring rules in the index deletion synchronization unit; S42. Construct a real-time index list based on all index items within the index deletion range; S43. Extract the list of historical indexes within the index deletion range from the preset local snapshot database 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 the index difference items; S45. Determine the index deletion event of the main cluster based on the index difference item.
[0046] In detail, the preset monitoring rules refer to the rules in the index deletion synchronization module used to verify the legality of deletion operations (that the index is a secondary index and the primary index has been deleted) and to support delayed deletion (such as automatic cleanup after retaining for 24 hours); the index deletion range refers to the range of indexes in the primary cluster that have been deleted and determined by the monitoring rules to need to be deleted synchronously.
[0047] Specifically, the real-time index list refers to a continuously updated list consisting of all index entries 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 entries within that range to construct the real-time index list.
[0048] Furthermore, the preset local snapshot database is a database pre-configured within the index deletion synchronization unit to store historical snapshot information of the indexes; the historical index list refers to the list of indexes that existed in the past within the scope of index deletion. The index deletion synchronization unit extracts the list of previously existing indexes within the scope of index deletion from its own pre-configured local snapshot database that stores historical snapshot information of the indexes.
[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 main cluster. The index deletion synchronization module obtains the real-time index list after the main cluster index deletion event and the historical index list before the event. By comparing these two lists, it identifies 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 item, we analyze the index items that originally existed in the main cluster but are not currently in the real-time index list. The events corresponding to these index items are the index deletion events of the main cluster determined by the difference item.
[0051] S4. Perform a cleanup operation on the slave indexes in the slave cluster according to the index identification information to obtain the index cleanup result.
[0052] In this embodiment of the invention, the index cleanup result refers to the successful deletion of the slave index in the slave cluster corresponding to the deleted master index in the master cluster after the deletion operation is verified by the index deletion synchronization module. This achieves synchronous cleanup of the deleted index in the master cluster from the slave cluster, avoiding data residue.
[0053] In this embodiment of the invention, the step of cleaning up the slave indexes in the slave cluster according to the index identification information to obtain the index cleaning result includes: Based on the index identification information, the slave indexes in the slave cluster are queried and located to obtain the indexes to be cleaned; The indexes to be cleaned are deleted according to the preset index cleanup rules to obtain preliminary cleanup results; The validity of the preliminary cleanup results is verified to obtain the index cleanup results from the cluster.
[0054] In detail, the index to be cleaned up is a secondary index in the secondary cluster that corresponds to the primary index that has been deleted in the primary cluster. The index deletion synchronization module listens for index deletion change events in the primary cluster to obtain index identification information. Based on this identification information, it queries and locates the secondary index in the secondary cluster. The secondary index that corresponds to the primary index that has been deleted in the primary cluster is the index to be cleaned up.
[0055] Specifically, the preset index cleanup rules refer to the rules set in the index deletion synchronization module for verifying the legality of deletion operations and supporting delayed deletion; the preliminary cleanup result refers to the result of the deletion operation performed 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 secondary index and whether the corresponding primary index has been deleted, according to the preset index cleanup rules. If it meets the rules, the deletion operation is performed, and the preliminary cleanup result of the index to be cleaned being deleted is obtained.
[0056] Furthermore, the preliminary cleanup results are validated for legality. Specifically, it is checked whether the index to be cleaned is a secondary index and whether the corresponding primary index in the primary cluster has been deleted. If the conditions are met, the preliminary cleanup results are confirmed to be valid, and the index cleanup results of the secondary cluster are obtained.
[0057] S5. Identify the operating status of the master cluster and the slave cluster, and dynamically adjust the domain name pointers of the master cluster and the slave cluster using a preset dynamic domain name routing mechanism and the operating status to obtain the domain name configuration result.
[0058] In this embodiment of the invention, the running status refers to whether the master cluster and the slave cluster are running normally or whether a fault has occurred. This status directly affects the dual-domain dynamic routing and master-slave switching logic.
[0059] In detail, the identification of the operating status is achieved by the system monitoring the operation of the master cluster and the slave cluster. When a failure is detected in the master cluster, a master-slave switch will be triggered based on this status.
[0060] In this embodiment of the invention, the preset dynamic domain name routing mechanism exposes read-write domain names and read-only domain names to users, and designs intelligent routing strategies (read-only domain names support load balancing strategies such as proportional mode, intelligent scheduling, master-slave mode, and round-robin mode, and are adjusted according to the cluster status during master-slave switching), and dynamically adjusts the domain name pointing mechanism according to the cluster status; the domain name pointing refers to the specific cluster that the read-write domain name and the read-only domain name point to; the domain name configuration result is the final pointing state of the read-write domain name and the read-only domain name after dynamic adjustment.
[0061] In this embodiment of the invention, the step of dynamically adjusting the domain name pointers of the master cluster and the slave cluster using a preset dynamic domain name routing mechanism and the running status to obtain the domain name configuration result includes: According to the preset dynamic domain name routing mechanism, the preset read-write domain names are pointed to the main cluster, and the preset read-only domain names are allocated to the main cluster and the slave cluster according to the preset weight ratio. When a failure is detected in the primary cluster, the pointer of the read-write domain name is switched from the primary cluster to the secondary cluster, and the pointer of the read-only domain name is switched from pointing to both the primary cluster and the secondary cluster to pointing only to the secondary 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 based on the pointer switching result.
[0062] In detail, the preset read / write domains are those exposed to users, which by default point to the primary cluster and only allow write and read operations; the preset weight ratio is the ratio of read requests allocated to the primary cluster and secondary clusters in the proportional load balancing strategy for read-only domains (e.g., 70% primary cluster, 30% secondary cluster); the preset read-only domains are those exposed to users, which by default point to both the primary and secondary clusters and allocate read requests through the load balancing strategy. Based on the preset dynamic domain routing mechanism, the preset read / write domains are pointed to the primary cluster, while the preset read-only domains are allocated to the primary and secondary clusters according to the preset weight ratio, achieving separate routing for read / write traffic and read-only traffic.
[0063] Specifically, when a failure is detected in the primary cluster, the metadata synchronization capability of the CCR plugin ensures that the secondary cluster has write capability. During the switchover, the ILM policy, index template, account permissions, and index cleanup synchronization are triggered again to enable the secondary cluster to have write capability. Then, the read and write domain names are switched from pointing to the primary cluster to the secondary cluster. At the same time, the reading-only domain names are switched from pointing to both the primary and secondary clusters to pointing only to the secondary cluster. Read requests to the primary cluster are also suspended to avoid reading unsynchronized data.
[0064] Furthermore, the target switching result refers to the final cluster state that the read-write domain name and the read-only domain name point to after the target switching is completed, that is, the cluster state that the read-write domain name points to after the switch and the cluster state that the read-only domain name points to after the switch. After the target switching operation of the read-write domain name and the read-only domain name is completed, the final target state of these two domain names after the switch is recorded separately, thus completing the recording of the target switching result.
[0065] Furthermore, based on the switching results, that is, based on the specific switching of read-write domain names and read-only domain names recorded therein, the final domain name switching configurations corresponding to the master cluster and slave cluster are determined, and the correspondence between the domain names and clusters reflected in the switching results is determined as the domain name configuration results of the master and slave clusters.
[0066] S6. Determine the synchronization configuration information of the dual-active architecture based on the configuration synchronization result, the index cleanup result, and the domain name configuration result.
[0067] In this embodiment of the invention, the synchronization configuration information is the overall configuration information related to master-slave cluster synchronization in a dual-active architecture, determined by comprehensively considering the configuration synchronization results (such as ILM policy, index template, account permissions, and other synchronization status), 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 execution of the configuration synchronization module, the index cleanup result obtained after the execution of the index deletion synchronization module, and the domain name configuration result obtained after dynamic adjustment of the domain name are used as the basis. By integrating the information from these three sources, the overall configuration information related to synchronization in the dual-active architecture is determined, that is, the synchronization configuration information of the dual-active architecture is determined based on these three sources.
[0069] Specifically, the configuration synchronization module ensures that the ILM policies, index templates, account permissions, and whitelist index settings of the master and slave clusters are consistent; the index deletion synchronization module confirms that the slave cluster has cleaned up the legitimate indexes deleted by the master cluster; and the domain name configuration results clearly state that read and write domain names point to a valid master cluster, and read-only domain names are allocated read traffic according to the load balancing strategy. Only when all three reach the expected state (metadata synchronization is complete, indexes are free of remnants, and domain names point to the correct domain names) will the system determine that the synchronization configuration information is complete and valid.
[0070] As can be seen, in the above solution, by configuring the synchronization unit to synchronize the configuration of the master cluster, cleaning up the residual indexes of the slave cluster by the index deletion synchronization unit, and adjusting the pointers of the domain name dynamic routing, the problem of configuration and deletion being out of sync can be solved. At the same time, domain name management is optimized, the consistency between the master and slave clusters is improved, manual operation is reduced, security and resource utilization are enhanced, and the reliability of the active-active architecture is improved.
[0071] It should be understood that the sequence number of each step in the above embodiments does not imply 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-based configuration synchronization device is provided, which corresponds one-to-one with the cross-cluster-based configuration synchronization method in the above embodiments. For example... 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 recognition module 103, an index cleanup result acquisition module 104, a domain name configuration result acquisition module 105, and a synchronization configuration information determination module 106. Detailed descriptions of each functional module are as follows: The configuration change event listening module 101 is used to deploy a preset configuration synchronization unit and index deletion synchronization unit in the dual-active architecture, and to listen for configuration change events of the main cluster in the dual-active architecture through the configuration synchronization unit. The configuration synchronization result acquisition module 102 is used to determine the configuration synchronization information of the slave cluster in the dual-active architecture based on the configuration change event, update the configuration items of the slave cluster based on the configuration synchronization information, and obtain the configuration synchronization result. The index identification information identification module 103 is used to identify the index identification information corresponding to the index deletion event by listening to the index deletion event of the main cluster according to the index deletion synchronization unit. The index cleanup result acquisition module 104 is used to perform cleanup operations on the slave indexes in the slave cluster according to the index identification information, and obtain the index cleanup result; The domain name configuration result acquisition module 105 is used to identify the running 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 running status to obtain the domain name configuration result. The synchronization configuration information determination module 106 is used to determine the synchronization configuration information of the dual-active architecture based on the configuration synchronization result, the index cleanup result, and the domain name configuration result.
[0073] In one embodiment, the configuration change event listening module 101, when listening for configuration change events of the primary cluster in the dual-active architecture through the configuration synchronization unit, is used to: The configuration items to be monitored in the primary cluster of the dual-active architecture are determined according to the preset synchronization configuration range in the configuration synchronization unit. The real-time and historical status information of the configuration item to be monitored is extracted using the status caching component in the configuration synchronization unit. The real-time status information is compared with the historical status information to obtain configuration difference information; The configuration change event of the primary cluster in the dual-active architecture is determined based on 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 dual-active architecture based on the configuration change event, is used to: The configuration items corresponding to the configuration change event are filtered for compliance based on preset blacklist and whitelist rules to obtain the target configuration item; The changes to the target configuration items are integrated to obtain a configuration synchronization dataset; The configuration synchronization information of the slave cluster in the dual-active architecture is determined based on the configuration synchronization dataset.
[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: The structured data of configuration synchronization information is parsed to obtain configuration change data, and the identifiers of configuration items to be updated are extracted from the configuration change data. The configuration item to be updated is extracted from the configuration items in the cluster based on the identifier of the configuration item to be updated; Obtain the configuration change content corresponding to the configuration item to be updated from the configuration change data; The configuration items to be updated are updated according to the configuration changes to obtain the configuration synchronization result of the slave cluster.
[0076] In one embodiment, the index identification information recognition module 103, when executing the index deletion synchronization unit to listen for index deletion events in the main cluster, is used to: The index deletion range of the main cluster is determined according to the preset monitoring rules in the index deletion synchronization unit; A real-time index list is constructed based on all index items within the specified index deletion range; Extract the list of historical indexes within the scope of the index deletion from the preset local snapshot database in the index deletion synchronization unit; The index items in the real-time index list are compared with the index items in the historical index list to obtain the index difference items; The index deletion event of the primary cluster is determined based on the index difference item.
[0077] In one embodiment, the index cleanup result acquisition module 104, when performing a cleanup operation on the slave indexes in the slave cluster based on the index identification information to obtain the index cleanup result, is used to: Based on the index identification information, the slave indexes in the slave cluster are queried and located to obtain the indexes to be cleaned; The indexes to be cleaned are deleted according to the preset index cleanup rules to obtain preliminary cleanup results; The validity of the preliminary cleanup results is verified to obtain the index cleanup results from the cluster.
[0078] In one embodiment, the domain name configuration result acquisition module 105, when performing dynamic adjustment of the domain name pointers of the master cluster and the slave cluster using a preset domain name dynamic routing mechanism and the running status to obtain the domain name configuration result, is used for: According to the preset dynamic domain name routing mechanism, the preset read-write domain names are pointed to the main cluster, and the preset read-only domain names are allocated to the main cluster and the slave cluster according to the preset weight ratio. When a failure is detected in the primary cluster, the pointer of the read-write domain name is switched from the primary cluster to the secondary cluster, and the pointer of the read-only domain name is switched from pointing to both the primary cluster and the secondary cluster to pointing only to the secondary 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 based on the pointer switching result.
[0079] This invention provides a cross-cluster configuration synchronization device. By synchronizing the configuration of the master cluster through the configuration synchronization unit and cleaning up residual indexes in the slave cluster through the index deletion synchronization unit, combined with dynamic domain name routing to adjust the pointers, the problem of configuration and deletion being out of sync can be solved. At the same time, domain name management is optimized, the consistency between master and slave clusters is improved, manual operation is reduced, security and resource utilization are enhanced, and the reliability of the active-active architecture is improved.
[0080] For specific limitations regarding the cross-cluster-based configuration synchronization device, please refer to the limitations of the cross-cluster-based configuration synchronization method above, which will not be repeated here. Each module in the aforementioned cross-cluster-based configuration synchronization device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0081] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements server-side functions or steps based on a cross-cluster configuration synchronization method.
[0082] In one embodiment, a computer device is provided, which 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 devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements client-side functions or steps based on 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, wherein the processor executes the computer program to perform the following steps: In a dual-active architecture, a preset configuration synchronization unit and an index deletion synchronization unit are deployed, and the configuration synchronization unit is used to listen for configuration change events of the primary cluster in the dual-active architecture. Based on the configuration change event, determine the configuration synchronization information of the slave cluster in the dual-active architecture, update the configuration items of the slave cluster according to the configuration synchronization information, and obtain the configuration synchronization result; The index deletion synchronization unit listens for index deletion events in the main cluster and identifies the index identification information corresponding to the index deletion event. Based on the index identification information, a cleanup operation is performed on the slave index in the slave cluster to obtain the index cleanup result; Identify the operating status of the master cluster and the slave cluster, and dynamically adjust the domain name pointers of the master cluster and the slave cluster using a preset dynamic domain name routing mechanism and the operating status to obtain the domain name configuration result; The synchronization configuration information of the active-active architecture is determined based on the configuration synchronization result, the index cleanup result, and the domain name configuration result.
[0084] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: In a dual-active architecture, a preset configuration synchronization unit and an index deletion synchronization unit are deployed, and the configuration synchronization unit is used to listen for configuration change events of the primary cluster in the dual-active architecture. Based on the configuration change event, determine the configuration synchronization information of the slave cluster in the dual-active architecture, update the configuration items of the slave cluster according to the configuration synchronization information, and obtain the configuration synchronization result; The index deletion synchronization unit listens for index deletion events in the main cluster and identifies the index identification information corresponding to the index deletion event. Based on the index identification information, a cleanup operation is performed on the slave index in the slave cluster to obtain the index cleanup result; Identify the operating status of the master cluster and the slave cluster, and dynamically adjust the domain name pointers of the master cluster and the slave cluster using a preset dynamic domain name routing mechanism and the operating status to obtain the domain name configuration result; The synchronization configuration information of the active-active architecture is determined based on the configuration synchronization result, the index cleanup result, and the domain name configuration result.
[0085] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. 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 methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can 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 a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual 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, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to 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 any software tools or components not belonging to our company appear in the embodiments of this application, they are merely for illustrative purposes and do not represent actual use.
[0089] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A cross-cluster configuration synchronization method, characterized in that, include: In a dual-active architecture, a preset configuration synchronization unit and an index deletion synchronization unit are deployed, and the configuration synchronization unit is used to listen for configuration change events of the primary cluster in the dual-active architecture. Based on the configuration change event, determine the configuration synchronization information of the slave cluster in the dual-active architecture, update the configuration items of the slave cluster according to the configuration synchronization information, and obtain the configuration synchronization result; The index deletion synchronization unit listens for index deletion events in the main cluster and identifies the index identification information corresponding to the index deletion event. Based on the index identification information, a cleanup operation is performed on the slave index in the slave cluster to obtain the index cleanup result; Identify the operating status of the master cluster and the slave cluster, and dynamically adjust the domain name pointers of the master cluster and the slave cluster using a preset dynamic domain name routing mechanism and the operating status to obtain the domain name configuration result; The synchronization configuration information of the active-active architecture is determined based on the configuration synchronization result, the index cleanup result, and the domain name configuration result. The step of dynamically adjusting the domain name pointers of the master cluster and the slave cluster using a preset dynamic domain name routing mechanism and the running status to obtain the domain name configuration result includes: pointing preset read-write domain names to the master cluster according to the preset dynamic domain name routing mechanism, and allocating preset read-only domain names to the master cluster and the slave cluster according to a preset weight ratio; when a failure is detected in the master cluster, switching the pointer of the read-write domain names from the master cluster to the slave cluster, and switching the pointer of the read-only domain names from pointing to both the master cluster and the slave cluster to pointing only to the slave cluster; recording the pointer switching results after the switching of the read-write domain names and the read-only domain names; and determining the domain name configuration result of the master cluster and the slave cluster based on the pointer switching results.
2. The configuration synchronization method based on cross-cluster configuration as described in claim 1, characterized in that, The step of monitoring configuration change events of the primary cluster in the dual-active architecture through the configuration synchronization unit includes: The configuration items to be monitored in the primary cluster of the dual-active architecture are determined according to the preset synchronization configuration range in the configuration synchronization unit. The real-time and historical status information of the configuration item to be monitored is extracted using the status caching component in the configuration synchronization unit. The real-time status information is compared with the historical status information to obtain configuration difference information; The configuration change event of the primary cluster in the dual-active architecture is determined based on the configuration difference information.
3. The configuration synchronization method based on cross-cluster configuration as described in claim 1, characterized in that, Determining the configuration synchronization information of the slave cluster in the active-active architecture based on the configuration change event includes: The configuration items corresponding to the configuration change event are filtered for compliance based on preset blacklist and whitelist rules to obtain the target configuration item; The changes to the target configuration items are integrated to obtain a configuration synchronization dataset; The configuration synchronization information of the slave cluster in the dual-active architecture is determined based on the configuration synchronization dataset.
4. The configuration synchronization method based on cross-cluster configuration as described in claim 1, characterized in that, The step of updating the configuration items of the slave cluster according to the configuration synchronization information to obtain the configuration synchronization result includes: The structured data of configuration synchronization information is parsed to obtain configuration change data, and the identifiers of configuration items to be updated are extracted from the configuration change data. The configuration item to be updated is extracted from the configuration items in the cluster based on the identifier of the configuration item to be updated; Obtain the configuration change content corresponding to the configuration item to be updated from the configuration change data; The configuration items to be updated are updated according to the configuration changes to obtain the configuration synchronization result of the slave cluster.
5. The configuration synchronization method based on cross-cluster configuration as described in claim 1, characterized in that, The step of listening to the index deletion event of the main cluster according to the index deletion synchronization unit includes: The index deletion range of the main cluster is determined according to the preset monitoring rules in the index deletion synchronization unit; A real-time index list is constructed based on all index items within the specified index deletion range; Extract the list of historical indexes within the scope of the index deletion from the preset local snapshot database in the index deletion synchronization unit; The index items in the real-time index list are compared with the index items in the historical index list to obtain the index difference items; The index deletion event of the primary cluster is determined based on the index difference item.
6. The configuration synchronization method based on cross-cluster configuration as described in claim 1, characterized in that, The step of cleaning up the slave indexes in the slave cluster based on the index identification information to obtain the index cleaning result includes: Based on the index identification information, the slave indexes in the slave cluster are queried and located to obtain the indexes to be cleaned; The indexes to be cleaned are deleted according to the preset index cleanup rules to obtain preliminary cleanup results; The validity of the preliminary cleanup results is verified to obtain the index cleanup results from the cluster.
7. A cross-cluster-based configuration synchronization device, used to implement the cross-cluster-based configuration synchronization method as described in any one of claims 1 to 6, characterized in that, include: The configuration change event listening module is used to deploy a preset configuration synchronization unit and index deletion synchronization unit in a dual-active architecture, and to listen for configuration change events of the main cluster in the dual-active architecture through the configuration synchronization unit. The configuration synchronization result acquisition module is used to determine the configuration synchronization information of the slave cluster in the dual-active architecture based on the configuration change event, update the configuration items of the slave cluster according to the configuration synchronization information, and obtain the configuration synchronization result. The index identification information recognition module is used to identify the index identification information corresponding to the index deletion event by listening to the index deletion event of the main cluster according to the index deletion synchronization unit. The index cleanup result acquisition module is used to perform cleanup operations on the slave indexes in the slave cluster according to the index identification information, and obtain the index cleanup result; The domain name configuration result acquisition module is used to identify the running 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 running status to obtain the domain name configuration result; The synchronization configuration information determination module is used to determine the synchronization configuration information of the dual-active architecture based on the configuration synchronization result, the index cleanup result, and the domain name configuration result.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the cross-cluster-based configuration synchronization method as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the cross-cluster-based configuration synchronization method as described in any one of claims 1 to 6.