CN118041915A - Flow control method, device, equipment and storage medium - Google Patents

Flow control method, device, equipment and storage medium Download PDF

Info

Publication number
CN118041915A
CN118041915A CN202410037948.8A CN202410037948A CN118041915A CN 118041915 A CN118041915 A CN 118041915A CN 202410037948 A CN202410037948 A CN 202410037948A CN 118041915 A CN118041915 A CN 118041915A
Authority
CN
China
Prior art keywords
cluster
sub
main sub
current
main
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410037948.8A
Other languages
Chinese (zh)
Inventor
蔡明高
陈�光
刘加银
王振东
杨利利
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Faw Nanjing Technology Development Co ltd
FAW Group Corp
Original Assignee
Faw Nanjing Technology Development Co ltd
FAW Group Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Faw Nanjing Technology Development Co ltd, FAW Group Corp filed Critical Faw Nanjing Technology Development Co ltd
Priority to CN202410037948.8A priority Critical patent/CN118041915A/en
Publication of CN118041915A publication Critical patent/CN118041915A/en
Pending legal-status Critical Current

Links

Landscapes

  • Hardware Redundancy (AREA)

Abstract

The invention discloses a flow control method, a flow control device, flow control equipment and a storage medium, wherein the flow control method comprises the following steps: acquiring state information and priority information of a current time cluster; wherein the cluster comprises at least 2 sub-clusters; determining a main sub-cluster and a standby sub-cluster at the current moment based on the state information and the priority information; if the main sub-cluster at the current moment is different from the main sub-cluster at the last moment, updating the effective time of the main sub-cluster at the current moment; and controlling the flow to the updated main sub-clusters. The method is utilized: when a disaster occurs, the flow can be automatically switched to a healthy cluster without human intervention.

Description

Flow control method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the field of system disaster recovery, in particular to a flow control method, a flow control device, flow control equipment and a storage medium.
Background
Based on development of cloud computing and k8s related technologies, applications of enterprises are gradually containerized, and the deployment of a single server is changed into cloud deployment. Some enterprises can directly use cloud services provided by large cloud service providers to deploy applications, while some enterprises purchase machines by themselves due to various concerns, and build local private clouds to deploy applications. Disaster tolerance in the current private cloud scene is basically divided into two types, one type is a multi-activity federal cluster, and services are deployed on a plurality of clusters simultaneously and simultaneously provided for the outside; the other scheme is single activity, the cluster roles are divided into a main cluster and a standby cluster, only one cluster provides service to the outside, the other cluster can synchronize data from the main cluster at regular time, and the standby cluster can be started once the main cluster crashes. In the scheme one, because the application is deployed across clusters, the requirements on the application and hardware are relatively high, the application is required to realize high availability of data among different copies, and the delay of network transmission among clusters is required to be extremely small. The hardware aspect of the scheme requires higher construction cost; in terms of software, most of the applications on the market, the open source version does not have a self high-availability scheme, and in order to use the high-availability capability, the commercial version needs to be purchased, so that the cost is high for enterprises. The scheme II mainly relies on the platform capability to realize the data synchronization among clusters, and has lower requirements on the application itself; the requirements on hardware such as network delay are also low. Of course, the requirements on the synchronization capability of the platform are relatively high, different component data are synchronized by using a unified scheme, the real-time performance is not good, and certain data loss exists. Meanwhile, when a disaster occurs, manual intervention is often needed, the north flow is manually switched, and the access flow of the user is guided to the corresponding cluster.
Disclosure of Invention
The embodiment of the invention provides a flow control method, a flow control device, flow control equipment and a storage medium, wherein when a disaster occurs, the flow can be automatically switched to a healthy cluster without human intervention.
In a first aspect, an embodiment of the present invention provides a flow control method, including:
acquiring state information and priority information of a current time cluster; wherein the cluster comprises at least 2 sub-clusters;
determining a main sub-cluster and a standby sub-cluster at the current moment based on the state information and the priority information;
If the main sub-cluster at the current moment is different from the main sub-cluster at the last moment, updating the effective time of the main sub-cluster at the current moment;
And controlling the flow to the updated main sub-clusters.
In a second aspect, an embodiment of the present invention further provides a flow control device, including:
The acquisition module is used for acquiring state information and priority information of the current time cluster; wherein the cluster comprises at least 2 sub-clusters;
The sub-cluster determining module is used for determining a main sub-cluster and a standby sub-cluster at the current moment based on the state information and the priority information;
The updating module is used for updating the effective time of the main sub-cluster at the current moment if the main sub-cluster at the current moment is different from the main sub-cluster at the last moment;
And the flow control module is used for controlling the flow direction of the flow to the updated main sub-cluster.
In a third aspect, embodiments of the present disclosure further provide an electronic device, including:
One or more processors;
Storage means for storing one or more programs,
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the flow control methods provided by embodiments of the present disclosure.
In a fourth aspect, the disclosed embodiments also provide a storage medium containing computer-executable instructions that, when executed by a computer processor, are used to perform a flow control method that implements the disclosed embodiments.
The invention discloses a flow control method, a flow control device, flow control equipment and a storage medium, wherein the flow control method comprises the following steps: acquiring state information and priority information of a current time cluster; wherein the cluster comprises at least 2 sub-clusters; determining a main sub-cluster and a standby sub-cluster at the current moment based on the state information and the priority information; if the main sub-cluster at the current moment is different from the main sub-cluster at the last moment, updating the effective time of the main sub-cluster at the current moment; and controlling the flow to the updated main sub-clusters. The method is utilized: when a disaster occurs, the flow can be automatically switched to a healthy cluster without human intervention.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a flow chart of a flow control method provided by an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of an overall architecture of a disaster recovery system according to an embodiment of the disclosure;
Fig. 3 is a schematic view of user access traffic provided in an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a control plane flow provided by an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a data plane flow provided in an embodiment of the disclosure;
FIG. 6 is a schematic diagram of a flow control device according to an embodiment of the disclosure;
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
It will be appreciated that prior to using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to the relevant legal regulations.
For example, in response to receiving an active request from a user, a prompt is sent to the user to explicitly prompt the user that the operation it is requesting to perform will require personal information to be obtained and used with the user. Thus, the user can autonomously select whether to provide personal information to software or hardware such as an electronic device, an application program, a server or a storage medium for executing the operation of the technical scheme of the present disclosure according to the prompt information.
As an alternative but non-limiting implementation, in response to receiving an active request from a user, the manner in which the prompt information is sent to the user may be, for example, a popup, in which the prompt information may be presented in a text manner. In addition, a selection control for the user to select to provide personal information to the electronic device in a 'consent' or 'disagreement' manner can be carried in the popup window.
It will be appreciated that the above-described notification and user authorization process is merely illustrative and not limiting of the implementations of the present disclosure, and that other ways of satisfying relevant legal regulations may be applied to the implementations of the present disclosure.
It will be appreciated that the data (including but not limited to the data itself, the acquisition or use of the data) involved in the present technical solution should comply with the corresponding legal regulations and the requirements of the relevant regulations.
Example 1
Fig. 1 is a flow chart of a flow control provided by an embodiment of the present disclosure, where the embodiment of the present disclosure is suitable for providing a solution to the problem that, once a disaster occurs, a manual intervention is often required to switch the northbound flow manually, and the access flow of a user is led to a corresponding cluster.
As shown in fig. 1, a flow control method provided in an embodiment of the present disclosure may specifically include the following steps:
S110, acquiring state information and priority information of the current time cluster.
Wherein the cluster comprises at least 2 sub-clusters.
In this embodiment, fig. 2 is a schematic diagram of an overall architecture of a disaster recovery system according to an embodiment of the disclosure. As shown in fig. 2, the system is divided into a cluster management layer, a service cluster layer and a public service layer from top to bottom. The cluster management layer is used for mainly deploying istio services related to the disaster recovery master control plane. The business cluster layer comprises all active and standby clusters which actually provide services. The public service layer is used for public services on the network.
In this embodiment, the cluster includes at least two sub-clusters, and a plurality of sub-clusters may be deployed to provide services according to actual needs. The status information may be a service status of the cluster, including information about whether the cluster is faulty, whether the cluster can be connected normally, and the like. The priority information refers to priorities that are arranged for the subsets in advance according to the setting position of the control center.
Specifically, state information and priority information of the current time cluster are obtained.
S120, determining a main sub-cluster and a standby sub-cluster at the current moment based on the state information and the priority information.
The main sub-cluster may be a cluster for providing external service, and the standby sub-cluster may be a cluster for waiting for providing external service.
Specifically, on the basis of the above embodiment, the acquiring terminal device information may be specifically: and if the state information of the clusters is the same, determining a main sub-cluster and a standby sub-cluster according to the priority ordering.
In this embodiment, if the status information of the clusters is the same, the primary sub-cluster and the standby sub-cluster are determined according to the priority ranking. If the state information of the clusters is different, calculating according to a set weight algorithm to determine a main sub-cluster and a standby sub-cluster at the current moment.
And S130, if the main sub-cluster at the current moment is different from the main sub-cluster at the last moment, updating the effective time of the main sub-cluster at the current moment.
On the basis of the above embodiment, the method further comprises: if the main sub-cluster at the current moment is the same as the main sub-cluster at the last moment, controlling the normal flow of the flow to the main sub-cluster at the last moment;
in this embodiment, fig. 4 is a schematic view of a control plane flow provided in an embodiment of the disclosure; as shown in fig. 4, compared with the previous state, if the main sub-cluster at the current moment is the same as the main sub-cluster at the previous moment, normal access of the entry traffic is ensured, and the next detection is waited. If the main sub-cluster at the current moment is different from the main sub-cluster at the previous moment, firstly guiding the inlet flow to a help page, prompting the user to issue the latest configuration to the main/standby clusters in the switching process, wherein if the main cluster is the main cluster, the effective time of the main sub-cluster at the current moment can be additionally updated.
Specifically, if the main sub-cluster at the current moment is different from the main sub-cluster at the previous moment, the effective time of the main sub-cluster at the current moment is updated. The active time may be the time when the current sub-cluster may provide external services.
On the basis of the above embodiment, if the main sub-cluster at the current time is different from the main sub-cluster at the previous time, the method further includes:
a2 A sub-cluster is reconfigured.
B2 When the configuration fails, marking the sub-cluster with the configuration failure, and returning to execute the operation of acquiring the state information and the priority information of the cluster at the current moment.
C2 When the configuration is in progress, prompting the user to wait and returning to execute the operation of acquiring the state information and the priority information of the current time cluster.
In this embodiment, the configuration information of the current cluster is checked, if the current cluster is a standby node, the service control plug-in is ensured to be switched to the standby in turn, the configuration is correctly issued, and the cluster state is marked. Then detecting whether the state of the sub-cluster is switched, if the state of the sub-cluster is switched failure, marking the cluster with failed switching, marking the state of a control surface as error, prompting a user, then waiting for the next detection, if the state of the sub-cluster is switched, marking the state of the control surface as pending, prompting the user, and then waiting for the next detection
Based on the above embodiment, in the embodiment of the present invention, when the cluster is reconfigured, the effective time of updating the main sub-cluster at the current time is specifically the following steps:
a3 Acquiring a current cluster role; wherein the cluster roles are primary and backup sub-clusters.
B3 If the current cluster role is the main sub-cluster, determining that the effective time is greater than the set time, switching the plug-in of the current cluster into the main sub-cluster configuration, and issuing the main sub-cluster configuration to the plug-in.
C3 If the effective time is equal to the set time when the current cluster role is the main sub-cluster, the main sub-cluster is reduced to the standby sub-cluster and the operation of acquiring the current cluster role is returned to be executed
D3 If the role of the current cluster is the standby sub-cluster, switching the plug-in of the current cluster into the standby sub-cluster configuration, and issuing the standby sub-cluster configuration to the plug-in
On the basis of the above embodiment, after the plug-in of the current cluster is switched to the main sub-cluster configuration and the main sub-cluster configuration is issued to the plug-in, the method further includes:
Subtracting the set time length from the effective time, and returning to execute the current cluster role at regular time, and updating the state information of the cluster.
In this embodiment, fig. 5 is a schematic flow diagram of a data plane according to an embodiment of the disclosure. As shown in fig. 5, looking at configuration information of a current cluster, acquiring a current cluster role, if the current cluster role is a standby node, sequentially ensuring that a service control plug-in is switched to standby and correctly transmits configuration, marking a cluster state, waiting for the next flow, if the next flow is a master node, firstly checking whether the effective time is 0, if the effective time is 0, reducing the current cluster to standby, and retriggering the flow, if the effective time is greater than 0, sequentially ensuring that the service control plug-in is switched to master and correctly transmits configuration, then reducing the effective time by 1, marking the cluster state, and waiting for the next flow. In this embodiment, the set duration may be 1 and the set time may be 0. The above may be set according to actual conditions, and is not particularly limited in this embodiment.
S140, controlling the flow direction of the updated main sub-clusters.
On the basis of the above embodiment, the method further comprises: if the main sub-cluster at the current moment is different from the main sub-cluster at the last moment, prompting the user to wait until the effective time of the main sub-cluster at the current moment is updated, and controlling the flow direction of the flow to the updated main sub-cluster.
In this embodiment, if the sub-cluster switching is successful, after the normal access of the ingress traffic is resumed first, the control istio directs the traffic to the new main cluster. If the main sub-cluster at the current moment is different from the main sub-cluster at the last moment, prompting the user to wait until the effective time of the main sub-cluster at the current moment is updated, namely, switching is successful, and controlling the flow direction of the flow to the updated main sub-cluster.
Fig. 3 is a schematic view of user access traffic provided in an embodiment of the present disclosure. As shown in fig. 3, when the primary and secondary sub-group switching occurs, the access traffic of the user flows to the graph.
The invention discloses a flow control method, a flow control device, flow control equipment and a storage medium, wherein the flow control method comprises the following steps: acquiring state information and priority information of a current time cluster; wherein the cluster comprises at least 2 sub-clusters; determining a main sub-cluster and a standby sub-cluster at the current moment based on the state information and the priority information; if the main sub-cluster at the current moment is different from the main sub-cluster at the last moment, updating the effective time of the main sub-cluster at the current moment; and controlling the flow to the updated main sub-cluster. The method is utilized: when a disaster occurs, the flow can be automatically switched to a healthy cluster without human intervention. Meanwhile, a multi-layer control plane design mode is adopted, and the TTL concept of the network is used for solving the problem of network isolation possibly generated due to the network and other reasons in the main process of selection. The plug-in oriented disaster recovery frames are designed, the data synchronous plug-in access system can be customized for specific application data with high real-time requirements, and other applications can adopt a unified open source scheme, so that the cost is reduced, and special applications can be processed.
Example two
Fig. 6 is a schematic structural diagram of a flow control device according to an embodiment of the present invention, where, as shown in fig. 6, the device includes: an acquisition module 210, a subset group determination module 220, an update module 230, and a flow control module 240.
An obtaining module 210, configured to obtain status information and priority information of the current time cluster; wherein the cluster comprises at least 2 sub-clusters;
A sub-cluster determining module 220, configured to determine a main sub-cluster and a standby sub-cluster at the current moment based on the status information and the priority information;
An updating module 230, configured to update the valid time of the current main sub-cluster if the current main sub-cluster is different from the last main sub-cluster;
And the flow control module 240 is configured to control the flow direction of the flow to the updated main sub-cluster.
The technical scheme provided by the embodiment of the disclosure is that the method is utilized: when a disaster occurs, the flow can be automatically switched to a healthy cluster without human intervention.
Further, the device is also used for:
if the main sub-cluster at the current moment is the same as the main sub-cluster at the last moment, controlling the flow to normally flow to the main sub-cluster at the last moment;
and if the main sub-cluster at the current moment is different from the main sub-cluster at the previous moment, prompting a user to wait until the effective time of the main sub-cluster at the current moment is updated, and controlling the flow direction of the flow to the updated main sub-cluster.
Further, the device is also used for:
Reconfiguring the subset group;
When the configuration fails, marking the sub-cluster with the failed configuration, and returning to execute the operation of acquiring the state information and the priority information of the cluster at the current moment;
when the configuration is in progress, the user is prompted to wait, and the operation of acquiring the state information and the priority information of the current time cluster is returned to be executed.
Further, the apparatus may be for:
acquiring a current cluster role; the cluster roles are a main sub-cluster and a standby sub-cluster;
when the role of the current cluster is a main sub-cluster, determining that the effective time is greater than the set time, switching the plug-in of the current cluster into the main sub-cluster configuration, and issuing the main sub-cluster configuration to the plug-in;
When the effective time is equal to the set time when the current cluster role is a main sub-cluster, the main sub-cluster is reduced to a standby sub-cluster, and the operation of acquiring the current cluster role is carried out in a return mode;
when the role of the current cluster is the standby sub-cluster, the plug-in of the current cluster is switched to the standby sub-cluster configuration, and the standby sub-cluster configuration is issued to the plug-in.
Further, the subset group determination module 220 may be configured to:
and if the state information of the clusters is the same, determining a main sub-cluster and a standby sub-cluster according to the priority ordering.
The device can execute the method provided by all the embodiments of the invention, and has the corresponding functional modules and beneficial effects of executing the method. Technical details not described in detail in this embodiment can be found in the methods provided in all the foregoing embodiments of the invention.
Example III
Fig. 7 presents a schematic view of the structure of an electronic device 10 that may be used to implement an embodiment of the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 7, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as flow control methods.
In some embodiments, the flow control method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the flow control method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the flow control method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A flow control method, comprising:
acquiring state information and priority information of a current time cluster; wherein the cluster comprises at least 2 sub-clusters;
determining a main sub-cluster and a standby sub-cluster at the current moment based on the state information and the priority information;
If the main sub-cluster at the current moment is different from the main sub-cluster at the last moment, updating the effective time of the main sub-cluster at the current moment;
And controlling the flow to the updated main sub-clusters.
2. The method as recited in claim 1, further comprising:
if the main sub-cluster at the current moment is the same as the main sub-cluster at the last moment, controlling the flow to normally flow to the main sub-cluster at the last moment;
and if the main sub-cluster at the current moment is different from the main sub-cluster at the previous moment, prompting a user to wait until the effective time of the main sub-cluster at the current moment is updated, and controlling the flow direction of the flow to the updated main sub-cluster.
3. The method of claim 2, further comprising, if the current time primary sub-cluster is different from the last time primary sub-cluster:
Reconfiguring the subset group;
When the configuration fails, marking the sub-cluster with the failed configuration, and returning to execute the operation of acquiring the state information and the priority information of the cluster at the current moment;
when the configuration is in progress, the user is prompted to wait, and the operation of acquiring the state information and the priority information of the current time cluster is returned to be executed.
4. The method of claim 3, wherein the configuration comprises a primary sub-cluster configuration and a backup sub-cluster configuration; reconfiguring the cluster, and updating the effective time of the main sub-cluster at the current moment, wherein the method comprises the following steps:
acquiring a current cluster role; the cluster roles are a main sub-cluster and a standby sub-cluster;
when the role of the current cluster is a main sub-cluster, determining that the effective time is greater than the set time, switching the plug-in of the current cluster into the main sub-cluster configuration, and issuing the main sub-cluster configuration to the plug-in;
When the effective time is equal to the set time when the current cluster role is a main sub-cluster, the main sub-cluster is reduced to a standby sub-cluster, and the operation of acquiring the current cluster role is carried out in a return mode;
when the role of the current cluster is the standby sub-cluster, the plug-in of the current cluster is switched to the standby sub-cluster configuration, and the standby sub-cluster configuration is issued to the plug-in.
5. The method according to claim 4, comprising: the plug-in of the current cluster is switched to the main sub-cluster configuration, and after the main sub-cluster configuration is issued to the plug-in, the method further comprises:
subtracting the set time from the effective time, and periodically returning to execute the acquisition of the current cluster role, and updating the state information of the cluster.
6. The method of claim 3, wherein determining a primary sub-cluster and a backup sub-cluster based on the status information and priority information comprises:
and if the state information of the clusters is the same, determining a main sub-cluster and a standby sub-cluster according to the priority ordering.
7. A flow control device, comprising:
The acquisition module is used for acquiring state information and priority information of the current time cluster; wherein the cluster comprises at least 2 sub-clusters;
The sub-cluster determining module is used for determining a main sub-cluster and a standby sub-cluster at the current moment based on the state information and the priority information;
The updating module is used for updating the effective time of the main sub-cluster at the current moment if the main sub-cluster at the current moment is different from the main sub-cluster at the last moment;
And the flow control module is used for controlling the flow direction of the flow to the updated main sub-cluster.
8. The apparatus of claim 7, wherein the subset group determination module is further configured to:
and if the state information of the clusters is the same, determining a main sub-cluster and a standby sub-cluster according to the priority ordering.
9. An electronic device, the electronic device comprising:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the flow control method of any one of claims 1-6.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the flow control method of any one of claims 1-6 when executed.
CN202410037948.8A 2024-01-10 2024-01-10 Flow control method, device, equipment and storage medium Pending CN118041915A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410037948.8A CN118041915A (en) 2024-01-10 2024-01-10 Flow control method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410037948.8A CN118041915A (en) 2024-01-10 2024-01-10 Flow control method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118041915A true CN118041915A (en) 2024-05-14

Family

ID=90986714

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410037948.8A Pending CN118041915A (en) 2024-01-10 2024-01-10 Flow control method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118041915A (en)

Similar Documents

Publication Publication Date Title
US10983880B2 (en) Role designation in a high availability node
CN107526659B (en) Method and apparatus for failover
JP6325001B2 (en) Method and system using recursive event listeners in nodes of hierarchical data structures
US10826812B2 (en) Multiple quorum witness
CN109245926B (en) Intelligent network card, intelligent network card system and control method
CN105471622A (en) High-availability method and system for main/standby control node switching based on Galera
US10503415B2 (en) Snapshot processing method and related device
EP3312723A1 (en) Command processing method and server
CN113656147A (en) Cluster deployment method, device, equipment and storage medium
US10721335B2 (en) Remote procedure call using quorum state store
CN111181765A (en) Task processing method and device
CN115580645A (en) Service switching method and device, electronic equipment and storage medium
CN115964153A (en) Asynchronous task processing method, device, equipment and storage medium
CN113608765A (en) Data processing method, device, equipment and storage medium
US8621260B1 (en) Site-level sub-cluster dependencies
CN118041915A (en) Flow control method, device, equipment and storage medium
CN113641688B (en) Node updating method, related device and computer program product
CN113420275B (en) Data connection processing method, related device and computer program product
CN112799879B (en) Fault processing method, device, equipment and storage medium of node
US20210240698A1 (en) Asynchronous remote calls with undo data structures
CN114567540B (en) Master-slave node switching method, device, equipment, medium and program product
CN116016545A (en) High-availability deployment method, device and equipment for Redis cluster and storage medium
US10542127B2 (en) Fault tolerant communication in a distributed system
CN115757635A (en) Database cluster flow distribution method, device, equipment and storage medium
CN115904701A (en) Parameter refreshing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination