CN113079192B - Information processing method, device, equipment and readable storage medium - Google Patents

Information processing method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN113079192B
CN113079192B CN202110172303.1A CN202110172303A CN113079192B CN 113079192 B CN113079192 B CN 113079192B CN 202110172303 A CN202110172303 A CN 202110172303A CN 113079192 B CN113079192 B CN 113079192B
Authority
CN
China
Prior art keywords
cluster
attribute information
redis
redis cluster
sdk
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.)
Active
Application number
CN202110172303.1A
Other languages
Chinese (zh)
Other versions
CN113079192A (en
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.)
Mashang Xiaofei Finance Co Ltd
Original Assignee
Mashang Xiaofei Finance Co Ltd
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 Mashang Xiaofei Finance Co Ltd filed Critical Mashang Xiaofei Finance Co Ltd
Priority to CN202110172303.1A priority Critical patent/CN113079192B/en
Publication of CN113079192A publication Critical patent/CN113079192A/en
Application granted granted Critical
Publication of CN113079192B publication Critical patent/CN113079192B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses an information processing method, an information processing device, information processing equipment and a readable storage medium, and relates to the technical field of computers to shorten service recovery time. The method comprises the following steps: receiving a service subscription request of a client; acquiring first attribute information of a first Redis cluster from service management equipment according to the service subscription request; establishing connection between the client and the first Redis cluster according to the first attribute information, and monitoring the first Redis cluster; and when the first Redis cluster is monitored to be changed, updating the connection between the client and the first Redis cluster. The embodiment of the invention can shorten the service recovery time.

Description

Information processing method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an information processing method, apparatus, device, and readable storage medium.
Background
In order to improve the fast loading of each application system to the hot spot data, most applications will introduce a Remote Dictionary service (Redis) storage system.
Redis is a high performance key-value storage system. When each application uses Redis, the Redis cluster can be used only by configuring complete information such as IP and the like. With the rapid development of traffic, the dependence on Redis is getting heavier and heavier, and the accompanying system problems are also beginning to increase. In the application mode at the present stage, in the fault recovery of the Redis, more manual intervention procedures are needed. In the fault recovery requiring cluster switching, each application is also required to manually update the relevant configuration and restart the application. In this way, it will take more service recovery time.
Disclosure of Invention
The embodiment of the invention provides an information processing method, an information processing device, information processing equipment and a readable storage medium, which are used for shortening service recovery time.
In a first aspect, an embodiment of the present invention provides an information processing method applied to an SDK (Software Development Kit), including:
receiving a service subscription request of a client;
acquiring first attribute information of a first Redis cluster from service management equipment according to the service subscription request;
establishing connection between the client and the first Redis cluster according to the first attribute information, and monitoring the first Redis cluster;
and when the first Redis cluster is monitored to be changed, updating the connection between the client and the first Redis cluster.
In a second aspect, an embodiment of the present invention further provides an information processing method, including:
responding to triggering of an SDK, sending first attribute information of a first Redis cluster in a cluster to the SDK, wherein the first attribute information is used for enabling the SDK to establish connection between the SDK and the first Redis cluster for a client, and the first Redis cluster is a cluster registered in a service mode;
when the first Redis cluster changes, sending second attribute information of the first Redis cluster to the SDK, wherein the second attribute information is used for enabling the SDK to update the connection between the client and the first Redis cluster.
In a third aspect, an embodiment of the present invention provides an information processing apparatus, including:
the first receiving module is used for receiving a service subscription request of a client;
a first obtaining module, configured to obtain, according to the service subscription request, first attribute information of a first Redis cluster from a service management device;
the first processing module is used for establishing connection between the client and the first Redis cluster according to the first attribute information and monitoring the first Redis cluster;
and the first updating module is used for updating the connection between the client and the first Redis cluster when the change of the first Redis cluster is monitored.
In a fourth aspect, an embodiment of the present invention further provides an electronic device, including: the information processing method comprises the following steps of a memory, a processor and a program which is stored on the memory and can run on the processor, wherein the processor executes the program to realize the steps in the information processing method.
In a fifth aspect, the embodiment of the present invention further provides a readable storage medium, where a program is stored on the readable storage medium, and when the program is executed by a processor, the program implements the steps in the information processing method described above.
In the embodiment of the invention, after the connection between the first Redis cluster and the client is established according to the service subscription request of the client, if the change of the first Redis cluster is monitored, the connection between the client and the first Redis cluster is updated. It can be seen from the above description that the SDK can monitor the change of the first Redis cluster in time and update the connection in response to the change, and no manual participation is needed in this process, so that the recovery time of the service can be shortened by using the scheme of the embodiment of the present invention.
Drawings
FIG. 1 is a flow chart of an information processing method provided by an embodiment of the invention;
FIG. 2 is a second flowchart of an information processing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an information handling system provided by an embodiment of the present invention;
FIG. 4 is a third flowchart of an information processing method according to an embodiment of the present invention;
fig. 5 is one of the structural diagrams of the information processing apparatus provided in the embodiment of the present invention.
Detailed Description
The term "and/or" in the embodiments of the present invention describes an association relationship of associated objects, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
In the embodiments of the present application, the term "plurality" means two or more, and other terms are similar thereto.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a flowchart of an information processing method according to an embodiment of the present invention, which is executed by an SDK, as shown in fig. 1, and includes the following steps:
step 101, receiving a service subscription request of a client.
In practical application, a client sends a service subscription request to an SDK by specifying a mode of subscribing to a certain service. The service subscription request may include information of a service to which the client desires to subscribe, and the like, and the SDK may be set in the client.
And step 102, acquiring first attribute information of the first Redis cluster from the service management device according to the service subscription request.
In this embodiment of the present invention, the service management device may be, for example, Consul. Specifically, the SDK may determine the first Redis cluster from the candidate clusters according to the service subscription request, for example, the SDK may arbitrarily select one cluster from the selectable clusters as the first Redis cluster, or determine the first Redis cluster corresponding to the service subscription request according to the service subscription request of the client. And then, the SDK sends the information of the first Redis cluster to the service management equipment, and acquires the first attribute information of the first Redis cluster from the service management equipment. Since each cluster needs to register with the service management device before providing the service, so as to write its own information, such as a name, an IP address, and the like, into the service management device, the service management device may determine the first Redis cluster from the registered clusters according to the information (such as a name, an identifier, and the like) of the first Redis cluster sent by the SDK, and acquire the attribute information thereof.
In general, a Redis cluster may include at least a primary cluster and a backup cluster, where the primary cluster refers to a currently designated cluster providing a service and the backup cluster refers to a cluster acting as a backup. As to which cluster is used as the primary cluster and which cluster is used as the standby cluster, the designation can be made according to actual needs.
Wherein the first attribute information includes: and the identification of the current main cluster, the IP address of the current main cluster, the identification of the current standby cluster and the IP address of the current standby cluster in the first Redis cluster. The meaning of "current master cluster" refers to a cluster designated as a master cluster in the first Redis cluster when the SDK requests to acquire information of the first Redis cluster, and similarly, the meaning of "current standby cluster" refers to a standby cluster in the first Redis cluster when the SDK requests to acquire information of the first Redis cluster.
Step 103, establishing a connection between the client and the first Redis cluster according to the first attribute information, and monitoring the first Redis cluster.
In the process of establishing connection, the SDK configures an IP address and a connection port according to the acquired IP addresses of the master and the slave clusters, and the like, so as to establish connection between the client and the first Redis cluster. The listening of the first Redis cluster may be initiated after the connection is established, or during the connection establishment, or also after a service subscription request of the client is received. Specifically, a listener may be set in the SDK, and is used to implement listening to the first Redis cluster.
Specifically, the SDK may send a first request to the service management device, where the first request is used to request the service management device for the second attribute information of the first Redis cluster. Then, the SDK receives a first response sent by the service management device, where the first response includes second attribute information of the first Redis cluster, where the second attribute information includes: and the identification of the current main cluster, the IP address of the current main cluster, the identification of the current standby cluster and the IP address of the current standby cluster in the first Redis cluster.
And step 104, updating the connection between the client and the first Redis cluster when the first Redis cluster is monitored to be changed.
Specifically, when the first attribute information is different from the second attribute information, the connection between the client and the first Redis cluster is updated. In practical applications, a first Redis cluster may have a change in information (e.g., an IP address change) due to a failure of a certain cluster in the cluster, or may also have a change in information due to a capacity expansion/reduction operation performed by a device, for example, an IP increase/decrease — that is, a change of the IP of a main cluster indicates that the first Redis cluster performs a capacity expansion/reduction operation; or when the IP of the main cluster is changed, the change of the main cluster of the first Redis cluster is indicated; then, at this time, the second attribute information returned by the service management apparatus may be different from the first attribute information.
Therefore, when the second attribute information indicates that the first Redis cluster is subjected to scaling, or the second attribute information indicates that a primary cluster and/or a standby cluster in the first Redis cluster are changed, that is, the first attribute information is different from the second attribute information, the connection between the client and the first Redis cluster may be updated according to the second attribute information. Specifically, in the updating process, the connection port, the IP address, and the like of the existing connection may be updated according to the identifier of the current master cluster, the IP address of the current master cluster, the identifier of the current standby cluster, the IP address of the current standby cluster, and the like in the second attribute information.
In the embodiment of the invention, after the connection between the first Redis cluster and the client is established according to the service subscription request of the client, if the change of the first Redis cluster is monitored, the connection between the client and the first Redis cluster is updated. It can be seen from the above description that the SDK can monitor the change of the first Redis cluster in time and update the connection in response to the change, and no manual participation is needed in this process, so that the scheme of the embodiment of the present invention can shorten the recovery time of the service, and can achieve the effect of unaware switching.
Referring to fig. 2, fig. 2 is a flowchart of an information processing method provided by an embodiment of the present invention, which is executed by a service management device, and as shown in fig. 2, includes the following steps:
step 201, responding to a trigger of an SDK, sending first attribute information of a first Redis cluster in a cluster to the SDK, where the first attribute information is used to enable the SDK to establish a connection with the first Redis cluster for a client, where the first Redis cluster is a cluster registered in a service manner.
In the embodiment of the present invention, the service management device includes Consul. Through the interface provided by Consul, a cluster that has been successfully deployed may be registered in the Consul in a service manner, including registering information such as an IP address and an identifier of the cluster in the Consul. And the cluster registration is used for completing the realization of cluster service.
Specifically, in this step, the service management device receives information of the first Redis cluster sent by the SDK, and sends, to the SDK, first attribute information of a first Redis cluster in the clusters according to the information of the first Redis cluster, where the first Redis cluster is a cluster registered in a service manner, and the first attribute information includes: and the identification of the current main cluster, the IP address of the current main cluster, the identification of the current standby cluster and the IP address of the current standby cluster in the first Redis cluster.
Step 202, when the first Redis cluster changes, sending second attribute information of the first Redis cluster to the SDK, where the second attribute information is used to enable the SDK to update the connection between the client and the first Redis cluster.
Specifically, in this step, the service management device receives a first request sent by the SDK, where the first request is used to request second attribute information of the first Redis cluster. When the first Redis cluster is scaled or a primary cluster and/or a standby cluster in the first Redis cluster are changed, the service management device sends a first response to the SDK, where the first response includes second attribute information of the first Redis cluster, where the second attribute information includes: and the identification of the current main cluster, the IP address of the current main cluster, the identification of the current standby cluster and the IP address of the current standby cluster in the first Redis cluster.
In the embodiment of the invention, after the connection between the first Redis cluster and the client is established according to the service subscription request of the client, if the change of the first Redis cluster is monitored, the connection between the client and the first Redis cluster is updated. It can be seen from the above description that the SDK can monitor the change of the first Redis cluster in time and update the connection in response to the change, and no manual participation is needed in this process, so that the recovery time of the service can be shortened by using the scheme of the embodiment of the present invention.
Referring to fig. 3, fig. 3 is a schematic diagram of an information processing system of an embodiment of the present invention. The system may include: client (client)301, SDK302, service management device Consul303, Redis logical cluster 304. In fig. 3, two Redis logical clusters Redis _ server1 and Redis _ server2 are shown, and each Redis logical cluster is composed of two physical Redis clusters, where one physical Redis cluster is a master cluster and the other is a backup cluster. As shown in fig. 3, redis _ server1 includes clusters phycluster1, phycluster 2; redis _ server2 includes clusters phycluster3, phycluster 4. Wherein, one of phycyluster 1 and phycyluster 2 can be designated as a main cluster, and the other is designated as a standby cluster; one of phycyluster 3 and phycyluster 4 may be designated as the primary cluster and the other as the backup cluster.
Referring to fig. 4, fig. 4 is a flowchart of an information processing method according to an embodiment of the present invention, and as shown in fig. 4, the method includes the following steps:
step 401, cluster registration. Building a Redis logical cluster by using the Redis cluster finished by deployment (virtual machine, container), and registering the Redis logical cluster into Consul.
The registered information includes an IP address, cluster master/slave role information (whether a cluster is a master cluster or a slave cluster), and the like. And registering the deployed logic cluster to Consul, namely completing the service realization of the cluster.
Step 402, the SDK receives a service subscription request from the client and starts an application.
For example, a client may subscribe to the services of the redis _ server1 cluster using the SDK by specifying a manner of subscribing to the redis _ server1 service.
Step 403, the SDK specifies a service cluster, that is, a specific service alias corresponding to the Consul, according to the service subscription request.
Assuming that the client specifies subscription to the redis _ server1 service, the SDK may accordingly specify the service alias as redis _ server1 to Consul. Or, according to the service subscribed by the client, the SDK may also establish a connection with the client with a server cluster corresponding to another subscribed service, and specify a required alias of the corresponding service from each cluster.
Step 404, Consul returns the information of the service cluster designated by the SDK, such as the IP address and the role information of the active/standby cluster, to the SDK.
And 405, establishing connection for the client by the SDK according to Consul, so as to realize access to the cluster.
Step 406, the SDK starts a listener for listening to changes in the cluster currently providing the service.
For example, the SDK may send a request to Consul to request information for redis _ server 1.
Step 407, Consul sends the updated information of the cluster to the SDK.
If the current service-providing cluster needs to be expanded due to the fact that the current service-providing cluster cannot support the current application service requirement, or when the cluster fails and some nodes are unavailable, information of the current service-providing Redis cluster may change.
For example, the roles of the master and slave clusters change, such as the master cluster is reduced to the slave cluster, the slave cluster is increased to the master cluster, and the like, and the IP address changes.
And step 408, if the cluster which provides the service currently changes, the SDK updates the connection, so that the cluster is switched to a new Redis cluster.
By comparison, if the information received by the SDK for redis _ server1 is different, then the SDK updates the connection. Alternatively, in step 407, the Consul may send the information of redis _ server1 to the SDK only when it is determined that the information of redis _ server1 changes, so that the SDK is not required to perform the determination, and the service recovery time may be further shortened. The SDK may store the updated connection in a management container.
Specifically, after the watch has monitored the second attribute information, first, we determine whether there is a change according to the existing metadata information (first attribute information) and the second attribute information, and if the change is detected, then: firstly, updating metadata information (first attribute information) maintained in the SDK, wherein the metadata information (first attribute information) comprises related information such as an IP address, interface information (port) and an authorization code (password) of a main/standby cluster, then, taking out connection objects (at least comprising the main cluster and the standby cluster) of a redis cluster (first cluster) created in a current application (client), recreating a group of new redis connection objects by using the latest metadata information of one object, and finally, replacing the old connection objects with the new redis connection objects. In this way, a non-inductive service cluster switching operation is completed, the process is completely carried out in the SDK, for each application using the SDK, the series of operations which are carried out by the application are not known or need not be known, and the application only needs the concerned SDK to provide an available connection object.
As can be seen from the above description, in the embodiment of the present invention, the Redis cluster is serviced, so as to provide the capability of the Redis to its user in a service manner. After the application is served, disaster recovery and backup switching of the Redis cluster can be performed under the condition of no sense, and meanwhile, the dependence of the application on the relevant configuration of the Redis is reduced. In this mode, if a Redis cluster fails or a cluster needs to be switched due to capacity expansion/reduction operation, the role of the cluster group in the logical cluster is changed, the cluster capable of normally providing capacity is set as a main cluster, and the failed cluster is set as a standby cluster, so that the change of the service cluster is triggered, and the SDK can monitor and respond to the change in time to update the connection.
In the above process, the monitoring mechanism of the SDK is used to implement the change of the connection, so that the client does not feel any operation, and the purpose of switching the clusters without sensing can be achieved. Because the SDK can update the connection in response to the change of the cluster, the scheme of the embodiment of the invention reduces the manual participation, thereby shortening the time of fault recovery and improving the application stability. In addition, in the embodiment of the invention, the access to the cluster can be completed only by specifying the used service name by the client, and the client does not need to perform complicated configuration of relevant information such as the cluster IP, relevant connection parameters and the like, thereby simplifying the complexity of the access configuration of the client.
The embodiment of the invention also provides an information processing device which is applied to the SDK. Referring to fig. 5, fig. 5 is a block diagram of an information processing apparatus according to an embodiment of the present invention. Because the principle of solving the problem of the information processing device is similar to the information processing method in the embodiment of the invention, the implementation of the information processing device can refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 5, the information processing apparatus 500 includes:
a first receiving module 501, configured to receive a service subscription request of a client; a first obtaining module 502, configured to obtain, according to the service subscription request, first attribute information of a first Redis cluster from a service management device; a first processing module 503, configured to establish a connection between the client and the first Redis cluster according to the first attribute information, and monitor the first Redis cluster; a first updating module 504, configured to update a connection between the client and the first Redis cluster when it is monitored that the first Redis cluster changes.
Optionally, the first obtaining module 502 includes:
a determining submodule, configured to determine the first Redis cluster according to the service subscription request;
a sending submodule, configured to send information of the first Redis cluster to the service management device, and obtain first attribute information of the first Redis cluster from the service management device, where the first attribute information includes: and the identification of the current main cluster, the IP address of the current main cluster, the identification of the current standby cluster and the IP address of the current standby cluster in the first Redis cluster.
Optionally, the first processing module 503 is configured to send a first request to the service management device when monitoring the first Redis cluster, where the first request is used to request the service management device for second attribute information of the first Redis cluster; receiving a first response sent by the service management device, where the first response includes second attribute information of the first Redis cluster, where the second attribute information includes: and the identification of the current main cluster, the IP address of the current main cluster, the identification of the current standby cluster and the IP address of the current standby cluster in the first Redis cluster.
Optionally, the first updating module 504 is configured to, when the second attribute information indicates that the first Redis cluster is scaled or that a primary cluster and/or a standby cluster in the first Redis cluster are changed, update the connection between the client and the first Redis cluster according to the second attribute information.
The apparatus provided in the embodiment of the present invention may implement the method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
The apparatus provided in the embodiment of the present invention may implement the method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation. In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented as a software functional unit and sold or used as a stand-alone product, may be stored in a processor readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
An embodiment of the present invention further provides an electronic device, including: a memory, a processor, and a program stored on the memory and executable on the processor; the processor is used for reading the program implementation in the memory to realize the steps of the information processing method.
The embodiment of the present invention further provides a readable storage medium, where a program is stored on the readable storage medium, and when the program is executed by a processor, the program implements each process of the above-mentioned information processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, the detailed description is omitted here. The readable storage medium may be any available medium or data storage device that can be accessed by a processor, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical memory (e.g., CD, DVD, BD, HVD, etc.), and semiconductor memory (e.g., ROM, EPROM, EEPROM, nonvolatile memory (NAND FLASH), Solid State Disk (SSD)), etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. With such an understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the methods according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (9)

1. An information processing method applied to an SDK, comprising:
receiving a service subscription request of a client;
acquiring first attribute information of a first Redis cluster from service management equipment according to the service subscription request;
establishing connection between the client and the first Redis cluster according to the first attribute information, and monitoring the first Redis cluster;
when the first Redis cluster is monitored to be changed, updating the connection between the client and the first Redis cluster, wherein the updating comprises:
when second attribute information of the first Redis cluster acquired from the service management device is different from the first attribute information, updating the connection between the client and the first Redis cluster according to the second attribute information.
2. The method according to claim 1, wherein the obtaining, according to the service subscription request, first attribute information of a first Redis cluster from a service management device includes:
determining the first Redis cluster according to the service subscription request;
sending information of the first Redis cluster to the service management device, and acquiring first attribute information of the first Redis cluster from the service management device, where the first attribute information includes: and the identification of the current main cluster, the IP address of the current main cluster, the identification of the current standby cluster and the IP address of the current standby cluster in the first Redis cluster.
3. The method of claim 1, wherein the listening to the first Redis cluster comprises:
sending a first request to the service management device, wherein the first request is used for requesting second attribute information of the first Redis cluster from the service management device;
receiving a first response sent by the service management device, where the first response includes second attribute information of the first Redis cluster, where the second attribute information includes: and the identification of the current main cluster, the IP address of the current main cluster, the identification of the current standby cluster and the IP address of the current standby cluster in the first Redis cluster.
4. An information processing method characterized by comprising:
responding to triggering of an SDK, and sending first attribute information of a first Redis cluster in the cluster to the SDK, wherein the first attribute information is used for enabling the SDK to establish connection between the SDK and the first Redis cluster for a client;
when the first Redis cluster changes, sending second attribute information of the first Redis cluster to the SDK, wherein the second attribute information is used for enabling the SDK to update the connection between the client and the first Redis cluster;
wherein, when the second attribute information is different from the first attribute information, the SDK updates the connection between the client and the first Redis cluster according to the second attribute information.
5. The method of claim 4, wherein the sending first attribute information of a first Redis cluster of the clusters to the SDK in response to a trigger of the SDK comprises:
receiving the information of the first Redis cluster sent by the SDK;
according to the information of the first Redis cluster, sending first attribute information of the first Redis cluster in the cluster to the SDK, wherein the first attribute information comprises: and the identification of the current main cluster, the IP address of the current main cluster, the identification of the current standby cluster and the IP address of the current standby cluster in the first Redis cluster.
6. The method according to claim 4, wherein the sending second attribute information of the first Redis cluster to the SDK when the first Redis cluster changes comprises:
receiving a first request sent by the SDK, wherein the first request is used for requesting second attribute information of the first Redis cluster;
when the first Redis cluster is scaled or a primary cluster and/or a standby cluster in the first Redis cluster are changed, sending a first response to the SDK, wherein the first response comprises second attribute information of the first Redis cluster, and the second attribute information comprises: and the identification of the current main cluster, the IP address of the current main cluster, the identification of the current standby cluster and the IP address of the current standby cluster in the first Redis cluster.
7. An information processing apparatus characterized by comprising:
the first receiving module is used for receiving a service subscription request of a client;
a first obtaining module, configured to obtain, according to the service subscription request, first attribute information of a first Redis cluster from a service management device;
the first processing module is used for establishing connection between the client and the first Redis cluster according to the first attribute information and monitoring the first Redis cluster;
a first updating module, configured to update a connection between the client and the first Redis cluster when it is monitored that the first Redis cluster changes;
wherein, when second attribute information of the first Redis cluster acquired from the service management device is different from the first attribute information, updating a connection between the client and the first Redis cluster according to the second attribute information.
8. An electronic device, comprising: a memory, a processor, and a program stored on the memory and executable on the processor; characterized in that the processor, for reading the program implementation in the memory, comprises the steps in the information processing method according to any one of claims 1 to 6.
9. A readable storage medium storing a program, wherein the program realizes, when executed by a processor, a step included in the information processing method according to any one of claims 1 to 6.
CN202110172303.1A 2021-02-08 2021-02-08 Information processing method, device, equipment and readable storage medium Active CN113079192B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110172303.1A CN113079192B (en) 2021-02-08 2021-02-08 Information processing method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110172303.1A CN113079192B (en) 2021-02-08 2021-02-08 Information processing method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN113079192A CN113079192A (en) 2021-07-06
CN113079192B true CN113079192B (en) 2021-12-31

Family

ID=76609937

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110172303.1A Active CN113079192B (en) 2021-02-08 2021-02-08 Information processing method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113079192B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115794769B (en) * 2022-10-09 2024-03-19 云和恩墨(北京)信息技术有限公司 Method for managing high-availability database, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018081242A1 (en) * 2016-10-27 2018-05-03 Machine Zone, Inc. Systems and methods for managing a cluster of cache servers
CN110224871A (en) * 2019-06-21 2019-09-10 深圳前海微众银行股份有限公司 A kind of high availability method and device of Redis cluster
CN113051110A (en) * 2019-12-27 2021-06-29 中国移动通信集团湖南有限公司 Cluster switching method, device and equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10623486B2 (en) * 2015-06-15 2020-04-14 Redis Labs Ltd. Methods, systems, and media for providing distributed database access during a network split
CN111026379A (en) * 2019-12-06 2020-04-17 南京联创信息科技有限公司 High-availability method for Redis master-slave fragment cluster
CN111901395B (en) * 2020-07-07 2024-03-22 青岛海尔科技有限公司 Multi-cluster switching method and device
CN111917846A (en) * 2020-07-19 2020-11-10 中信银行股份有限公司 Kafka cluster switching method, device and system, electronic equipment and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018081242A1 (en) * 2016-10-27 2018-05-03 Machine Zone, Inc. Systems and methods for managing a cluster of cache servers
CN110224871A (en) * 2019-06-21 2019-09-10 深圳前海微众银行股份有限公司 A kind of high availability method and device of Redis cluster
CN113051110A (en) * 2019-12-27 2021-06-29 中国移动通信集团湖南有限公司 Cluster switching method, device and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于Redis盾构远程监控系统设计;赵炯等;《隧道建设(中英文)》;20180205(第01期);130-135 *

Also Published As

Publication number Publication date
CN113079192A (en) 2021-07-06

Similar Documents

Publication Publication Date Title
CN108322533B (en) Configuration and synchronization method between distributed type assemblies node based on operation log
EP3018593B1 (en) Data storage method and device for distributed database
CN106059825A (en) Distributed system and configuration method
CN107817950B (en) Data processing method and device
CN109561151B (en) Data storage method, device, server and storage medium
CN112218342A (en) Method, device and system for realizing core network sub-slice disaster tolerance
CN113079192B (en) Information processing method, device, equipment and readable storage medium
CN112600693A (en) Service request processing method, system, electronic equipment and computer storage medium
WO2023071999A1 (en) User matching method and apparatus, and device and storage medium
US20240078106A1 (en) Method and device for updating software version of distributed system
JP2024520781A (en) Terminal UE registration method and apparatus, electronic device, and storage medium
US11153173B1 (en) Dynamically updating compute node location information in a distributed computing environment
CN111274205B (en) Data block access method and device and storage medium
CN107025257B (en) Transaction processing method and device
CN111342986B (en) Distributed node management method and device, distributed system and storage medium
CN112199176B (en) Service processing method, device and related equipment
CN113190619A (en) Data read-write method, system, equipment and medium for distributed KV database
WO2023197669A1 (en) Automatic dial-up networking method, and host, wireless module and terminal device
CN111488163A (en) Firmware updating method and device, electronic equipment and storage medium
CN112492030B (en) Data storage method, device, computer equipment and storage medium
CN111176886B (en) Database mode switching method and device and electronic equipment
CN113986148A (en) Data reading method and device and related equipment
CN114157663A (en) Cloud data access method and cloud server
CN114501545A (en) Slice information processing method, device, equipment and storage medium
US20200244525A1 (en) System and method for device configuration update

Legal Events

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