CN111221668A - RS information updating method and device, electronic equipment and storage medium - Google Patents

RS information updating method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111221668A
CN111221668A CN202010032882.5A CN202010032882A CN111221668A CN 111221668 A CN111221668 A CN 111221668A CN 202010032882 A CN202010032882 A CN 202010032882A CN 111221668 A CN111221668 A CN 111221668A
Authority
CN
China
Prior art keywords
information
shared memory
updating
request information
update request
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
CN202010032882.5A
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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202010032882.5A priority Critical patent/CN111221668A/en
Publication of CN111221668A publication Critical patent/CN111221668A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The method, the device, the electronic device and the storage medium for updating the RS information provided by the embodiment of the application receive the update request information of the RS information, wherein the RS information is stored in a shared memory; and updating the RS information corresponding to the update request information in the shared memory through the target process receiving the update request information. The RS information can be dynamically updated, the updating cost of the RS information is reduced, and the updating efficiency of the RS information is improved.

Description

RS information updating method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of information technologies, and in particular, to a method and an apparatus for updating RS information, an electronic device, and a storage medium.
Background
Load balancing background Server (RS) information is used as a request forwarding main body of a load balancing technology, and needs to be updated in time when the RS changes, so as to ensure the availability of services. In the seven-layer load balancing forwarding mechanism represented by Nginx, after an application process is established, a memory area needs to be applied as a memory area corresponding to the application process, and each process stores RS information in charge of the process in the memory area corresponding to the process.
However, when the RS information is updated, the location of the RS information in the memory is changed, and the change of the location of the RS information in the memory affects the correspondence between the processes and the memory area, so that a plurality of processes need to be newly created after the RS information is updated successfully, and the old process needs to be closed. Therefore, in the process of updating the RS information, not only is port resources wasted, but also the compiling of new configuration files and the process creation are cumbersome.
Summary of the invention
An embodiment of the present application provides a method, an apparatus, an electronic device, and a storage medium for updating RS information, so as to achieve the purpose of reducing the update cost and improving the update efficiency. The specific technical scheme is as follows:
in a first aspect of this embodiment, there is provided a method for updating RS information, including:
receiving update request information of RS information of a load balancing background server, wherein the RS information is stored in a shared memory;
and updating the RS information corresponding to the update request information in the shared memory through the target process receiving the update request information.
Optionally, before receiving the update request information of the RS information, the method further includes:
when a reverse proxy server is started, a shared memory is established;
and storing the RS information into the shared memory.
Optionally, before the target process receiving the update request information updates the RS information corresponding to the update request information in the shared memory, the method further includes:
searching RS information corresponding to the updating request information;
judging whether RS information corresponding to the updating request information is in a read-write state;
if the RS information corresponding to the updating request information is not in a read-write state, locking the RS information, wherein the locking of the RS information comprises forbidding any process except the target process to read and write the RS information;
after the RS information corresponding to the update request information is updated in the shared memory by the target process receiving the update request information, the method further includes:
and unlocking the RS information.
Optionally, after determining whether the RS information corresponding to the update request information is in a read-write state, the method further includes:
and if the RS information corresponding to the updating request information is in a read-write state, after waiting for a preset time, judging whether the RS information corresponding to the updating request information is in the read-write state again.
Optionally, the update request information of the RS information is sent through a pre-established control center, and the method further includes:
according to a preset time interval, comparing RS information stored in the control center with RS information in a shared memory;
and when the difference information between the RS information stored in the control center and the RS information in the shared memory is larger than a preset threshold value, updating the RS information in the shared memory according to the RS information stored in the control center.
Optionally, after the RS information corresponding to the update request information is updated in the shared memory by the target process receiving the update request information, the method further includes:
and receiving request information of the RS information of the load balancing background server, and acquiring updated RS information in the shared memory corresponding to the request information through a preset process.
In a second aspect of the present application, there is provided an RS information updating apparatus, including:
the information receiving module is used for receiving update request information of RS information of the load balancing background server, wherein the RS information is stored in the shared memory;
and the information updating module is used for updating the RS information corresponding to the updating request information in the shared memory through the target process receiving the updating request information.
Optionally, the apparatus further comprises:
the shared memory module is used for establishing a shared memory when the reverse proxy server is started;
and the information storage module is used for storing the RS information into the shared memory.
Optionally, the apparatus further comprises:
the information searching module is used for searching the RS information corresponding to the updating request information;
the information judgment module is used for judging whether the RS information corresponding to the updating request information is in a read-write state;
the information locking module is used for locking the RS information if the RS information corresponding to the updating request information is not in a read-write state, wherein the locking of the RS information comprises forbidding any process except the target process to read and write the RS information;
and the information unlocking module is used for unlocking the RS information.
Optionally, the apparatus further comprises:
and the read-write state module is used for judging whether the RS information corresponding to the updating request information is in the read-write state again after waiting for the preset time length if the RS information corresponding to the updating request information is in the read-write state.
Optionally, the update request information of the RS information is sent through a pre-established control center, and the apparatus further includes:
the information comparison module is used for comparing the RS information stored in the control center with the RS information in the shared memory according to a preset time interval;
and the threshold value judging module is used for updating the RS information in the shared memory according to the RS information stored in the control center when the difference information between the RS information stored in the control center and the RS information in the shared memory is larger than a preset threshold value.
Optionally, the apparatus further comprises:
and the information acquisition module is used for receiving the request information of the RS information of the load balancing background server and acquiring the updated RS information in the shared memory corresponding to the request information through a preset process.
In a third aspect of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any RS information updating method when executing the program stored in the memory.
In a fourth aspect implemented by the present application, there is also provided a computer-readable storage medium, on which a computer program is stored, wherein the program is configured to implement any one of the RS information updating methods described above when executed by a processor.
In yet another aspect of this embodiment, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the RS information updating methods described above.
The method, the device, the electronic device and the storage medium for updating the RS information provided by the embodiment of the application receive the update request information of the RS information, wherein the RS information is stored in a shared memory; and updating the RS information corresponding to the update request information in the shared memory through the target process receiving the update request information. The RS information can be dynamically updated, the updating cost of the RS information is reduced, and the updating efficiency of the RS information is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart of an RS information updating method according to an embodiment of the present application.
Fig. 2 is a flowchart illustrating a method for storing RS information in a shared memory according to an embodiment of the present disclosure.
Fig. 3 is a flowchart of a method for locking RS information according to an embodiment of the present application.
Fig. 4 is a flowchart of an updating method for RS information in a read-write state according to an embodiment of the present application.
Fig. 5 is a flowchart of a method for periodically updating RS information according to an embodiment of the present disclosure.
Fig. 6 is a diagram illustrating an example of a timing update of RS information according to an embodiment of the present application.
Fig. 7 is a flowchart of an RS information obtaining method according to an embodiment of the present application.
Fig. 8 is another flowchart of an RS information updating method according to an embodiment of the present application.
Fig. 9 is a schematic diagram of an RS information updating apparatus according to an embodiment of the present application.
Fig. 10 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
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.
In order to implement dynamic update of load balancing backend Server (RS) information, reduce update cost of RS information, and improve update efficiency of RS information, an embodiment of the present application provides an RS information update method, including:
receiving update request information of RS information of a load balancing background server, wherein the RS information is stored in a shared memory;
and updating the RS information corresponding to the update request information in the shared memory through the target process receiving the update request information.
Therefore, the RS information updating method provided by the embodiment of the application can receive the updating request information of the RS information, wherein the RS information is stored in the shared memory; and updating the RS information corresponding to the update request information in the shared memory through the target process receiving the update request information. The RS information can be dynamically updated, the updating cost of the RS information is reduced, and the updating efficiency of the RS information is improved.
Referring to fig. 1, fig. 1 is a flowchart of an RS information updating method according to an embodiment of the present application, including:
and step S11, receiving the update request information of the RS information of the load balancing background server.
Wherein, the RS information is stored in the shared memory. In a seven-layer load balancing forwarding mechanism represented by Nginx, the RS information in the upstream module can be accessed by all worker processes. Wherein the update request information may include the upstream name and the new RS list.
The RS information updating method of the embodiment of the application aims at the RS information in the intelligent terminal device, so that the RS information can be executed through the intelligent terminal device, and specifically, the intelligent terminal device can be a computer or a server and the like.
Step S12, the RS information corresponding to the update request information is updated in the shared memory by the target process that receives the update request information.
The RS information is stored in the shared memory, and all worker processes can access the RS information stored in the shared memory. The RS information corresponding to the update request information is updated in the shared memory through the target process receiving the update request information, and the RS information corresponding to the update request information can be updated through the target process receiving the update request information, a new process or a current process such as a target process. For example, a worker process in the Nginx receives the update request information of the RS information, analyzes the content of the update request information of the RS information, and updates the RS information on the shared memory.
Because the worker process acquires the RS information from the shared memory, the RS information corresponding to the updating request information is updated in the shared memory through the target process for receiving the updating request information, and the real-time sharing of the RS information among all worker processes can be ensured.
Therefore, the RS information updating method provided by the embodiment of the application can receive the updating request information of the RS information, wherein the RS information is stored in the shared memory; and updating the RS information corresponding to the update request information in the shared memory through the target process receiving the update request information. The RS information can be dynamically updated, the updating cost of the RS information is reduced, and the updating efficiency of the RS information is improved.
Optionally, referring to fig. 2, fig. 2 is a flowchart of a method for storing RS information in a shared memory according to an embodiment of the present application, where before receiving an update request message of the RS information, the method further includes:
step S21, when the reverse proxy server is started, a shared memory is established.
The shared memory may be a segment of storage space in the server memory, and information in the storage space may be read by any process.
In step S22, the RS information is stored in the shared memory.
When the reverse proxy server is started, a shared memory is established, and the RS information is stored in the shared memory. A monitoring module can be added in the Nginx to monitor the RS state change, when the Nginx is started, a shared memory is created and used for storing the RS information, and all worker processes can read the RS information in the shared memory.
Therefore, when the reverse proxy server is started, a shared memory is established; and storing the RS information into the shared memory. The RS information in the shared memory can be read by any process in the server.
Optionally, referring to fig. 3, fig. 3 is a flowchart of a method for locking RS information according to an embodiment of the present application, where before updating, in a shared memory, RS information corresponding to update request information through a target process that receives the update request information, the method further includes:
step S31, the RS information corresponding to the update request information is searched.
The update request information may be the RS information corresponding to the update request information, which is obtained by analyzing the update request information. For example, a worker process in the Nginx receives the update request information of the RS information, analyzes the content of the update request information of the RS information, and searches for the corresponding RS information on the shared memory according to the content of the update request information of the RS information.
Step S32, it is determined whether the RS information corresponding to the update request information is in a read-write state.
The RS information corresponding to the update request information is determined whether to be in a read-write state, and the RS information corresponding to the update request information may be read-written for determining whether any process exists.
In step S33, if the RS information corresponding to the update request information is not in a read-write state, the RS information is locked.
And locking the RS information comprises forbidding any process except the target process to read and write the RS information. Therefore, error information generated by the RS information out of synchronization and integrity can be prevented from being updated when a process acquires the RS information.
After the RS information corresponding to the update request information is updated in the shared memory by the target process receiving the update request information, the method further includes:
step S34, unlock the RS information.
Therefore, by the method for locking the RS information, the RS information corresponding to the update request information can be searched, and the RS information is locked, wherein the locking of the RS information comprises prohibiting any process except the target process from reading and writing the RS information. Therefore, error information generated when the RS information is not synchronized completely in the process of acquiring the RS information updating by a process is prevented.
Optionally, referring to fig. 4, fig. 4 is a flowchart of an updating method for RS information in a read-write state according to an embodiment of the present application, and after determining whether RS information corresponding to update request information is in the read-write state, the method further includes:
step S35, if the RS information corresponding to the update request information is in a read-write state, after waiting for a preset duration, re-determining whether the RS information corresponding to the update request information is in a read-write state.
Therefore, by the method for locking the RS information, whether the RS information corresponding to the update request information is in the read-write state can be judged again when the RS information corresponding to the update request information is in the read-write state. Therefore, error information generated when the RS information is not synchronized completely in the process of acquiring the RS information updating by a process is prevented.
Optionally, referring to fig. 5, fig. 5 is a flowchart of a method for periodically updating RS information according to an embodiment of the present application, where update request information of the RS information is sent through a pre-established control center, and the method further includes:
step S41, comparing the RS information stored in the control center with the RS information in the shared memory according to the preset time interval.
The preset time interval can be any time interval, the RS information stored in the control center and the RS information in the shared memory are compared, and the RS information stored in the control center and the RS information in the shared memory can be compared through the control center and timing control.
And step S42, when the difference information between the RS information stored in the control center and the RS information in the shared memory is larger than a preset threshold value, updating the RS information in the shared memory according to the RS information stored in the control center.
In order to ensure the consistency of the RS information in the shared memory and the RS information of the control center, a timing task is required to be set, a list of the RS of the control center is obtained at regular time, and if the difference information between the data in the shared memory and the RS list of the control center is larger than a preset threshold value, the RS in the shared memory is updated. And the worker process and the control center data are synchronized. Wherein the threshold value may be any value, e.g. 0%, i.e. updated when there is a discrepancy. For example, referring to fig. 6, fig. 6 is a diagram illustrating an example of a timing update of RS information according to an embodiment of the present application, where an update request of RS information sent by a control center is sent to a work process, and RS information of a shared memory is updated by acquiring/updating the RS information.
Therefore, by the method for locking the RS information, the RS information stored in the control center and the RS information in the shared memory can be compared according to the preset time interval, and when the difference information between the RS information stored in the control center and the RS information in the shared memory is larger than the preset threshold value, the RS information in the shared memory is updated according to the RS information stored in the control center. Therefore, the consistency of the RS information stored in the control center and the RS information in the shared memory is ensured, and the real-time effectiveness of the RS information in the shared memory is ensured.
Optionally, referring to fig. 7, fig. 7 is a flowchart of a RS information obtaining method according to an embodiment of the present application, where after the target process that receives the update request information updates RS information corresponding to the update request information in the shared memory, the method further includes:
step S51, receiving the request information of the RS information of the load balancing backend server, and acquiring updated RS information in the shared memory corresponding to the request information through a preset process.
Therefore, by the method of the embodiment of the application, the request information of the RS information of the load balancing background server can be received after the RS information corresponding to the update request information is updated in the shared memory through the target process for receiving the update request information, and the updated RS information in the shared memory corresponding to the request information is obtained through the preset process. Therefore, the updated RS information is obtained from the shared memory, and the use of the RS information is ensured.
Referring to fig. 8, fig. 8 is another flowchart of an RS information updating method according to an embodiment of the present application, including:
and step S11, receiving the update request information of the RS information of the load balancing background server.
Wherein, the RS information is stored in the shared memory.
Step S31, the RS information corresponding to the update request information is searched.
Step S32, it is determined whether the RS information corresponding to the update request information is in a read-write state.
In step S33, if the RS information corresponding to the update request information is not in a read-write state, the RS information is locked.
And locking the RS information comprises forbidding any process except the target process to read and write the RS information.
Step S35, if the RS information corresponding to the update request information is in a read-write state, after waiting for a preset duration, re-determining whether the RS information corresponding to the update request information is in a read-write state.
Step S12, the RS information corresponding to the update request information is updated in the shared memory by the target process that receives the update request information.
The RS information corresponding to the update request information is updated in the shared memory by the target process that receives the update request information, and the update request information may be the update request information of the RS information sent by the established control center. An RS update list will be sent to Nginx, where the update request information of the RS information contains the upstream name and the new RS list. And a worker process in the Nginx receives the request and analyzes the content, and updates the RS information on the shared memory.
Because the worker process acquires the RS information from the shared memory, the RS information corresponding to the updating request information in the shared memory is updated, and the RS information among all worker processes can be guaranteed to be shared in real time. After the RS information is updated, when an access request of new RS information of the shared memory comes, the scheduled RS information can be taken out from the shared memory when Nginx schedules the RS, and the shared memory is already provided with a new RS list, so that the dynamic update of the RS is realized.
Step S34, unlock the RS information.
Step S51, receiving the request information of the RS information of the load balancing backend server, and acquiring updated RS information in the shared memory corresponding to the request information through a preset process.
Optionally, before receiving the update request information of the RS information, the method further includes: when a reverse proxy server is started, a shared memory is established; and storing the RS information into the shared memory.
Optionally, the update request information of the RS information is sent through a pre-established control center, and the method further includes: according to a preset time interval, comparing RS information stored in the control center with RS information in a shared memory; and when the difference information between the RS information stored in the control center and the RS information in the shared memory is larger than a preset threshold value, updating the RS information in the shared memory according to the RS information stored in the control center.
Therefore, the RS information updating method provided by the embodiment of the application can receive the updating request information of the RS information, wherein the RS information is stored in the shared memory; and updating the RS information corresponding to the update request information in the shared memory through the target process receiving the update request information. The RS information can be dynamically updated, the updating cost of the RS information is reduced, and the updating efficiency of the RS information is improved.
Referring to fig. 9, fig. 9 is a schematic diagram of an RS information updating apparatus according to an embodiment of the present application, including:
the information receiving module 901 is configured to receive update request information of RS information of a load balancing background server, where the RS information is stored in a shared memory.
An information updating module 902, configured to update, in the shared memory, RS information corresponding to the update request information through a target process that receives the update request information.
Optionally, the apparatus further comprises:
and the shared memory module is used for establishing a shared memory when the reverse proxy server is started.
And the information storage module is used for storing the RS information into the shared memory.
Optionally, the apparatus further comprises:
and the information searching module is used for searching the RS information corresponding to the updating request information.
And the information judgment module is used for judging whether the RS information corresponding to the updating request information is in a read-write state.
And the information locking module is used for locking the RS information if the RS information corresponding to the updating request information is not in a read-write state, wherein the locking of the RS information comprises forbidding any process except the target process to read and write the RS information.
And the information unlocking module is used for unlocking the RS information.
Optionally, the apparatus further comprises:
and the read-write state module is used for judging whether the RS information corresponding to the updating request information is in the read-write state again after waiting for the preset time length if the RS information corresponding to the updating request information is in the read-write state.
Optionally, the update request information of the RS information is sent through a pre-established control center, and the apparatus further includes:
and the information comparison module is used for comparing the RS information stored in the control center with the RS information in the shared memory according to a preset time interval.
And the threshold value judging module is used for updating the RS information in the shared memory according to the RS information stored in the control center when the difference information between the RS information stored in the control center and the RS information in the shared memory is larger than a preset threshold value.
Optionally, the apparatus further comprises:
and the information acquisition module is used for receiving the request information of the RS information of the load balancing background server and acquiring the updated RS information in the shared memory corresponding to the request information through a preset process.
Therefore, the RS information updating apparatus provided by the embodiment of the present application can receive the update request information of the RS information, where the RS information is stored in the shared memory; and updating the RS information corresponding to the update request information in the shared memory through the target process receiving the update request information. The RS information can be dynamically updated, the updating cost of the RS information is reduced, and the updating efficiency of the RS information is improved.
The embodiment of the present application further provides an electronic device, as shown in fig. 10, which includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002 and the memory 1003 complete mutual communication through the communication bus 1004,
a memory 1003 for storing a computer program;
the processor 1001 is configured to implement the following steps when executing the program stored in the memory 1003:
receiving update request information of RS information, wherein the RS information is stored in a shared memory;
and updating the RS information corresponding to the update request information in the shared memory through the target process receiving the update request information.
Optionally, the processor is configured to implement any one of the RS information updating methods when executing the program stored in the memory.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment provided by the present application, there is also provided a computer-readable storage medium, having stored therein instructions, which when run on a computer, cause the computer to execute the RS information updating method described in any of the above embodiments.
In yet another embodiment provided by the present application, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the RS information updating method described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, the storage medium and the computer program product embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (14)

1. An RS information updating method, comprising:
receiving update request information of RS information of a load balancing background server, wherein the RS information is stored in a shared memory;
and updating the RS information corresponding to the update request information in the shared memory through the target process receiving the update request information.
2. The method of claim 1, wherein before the receiving the update request information of the RS information, the method further comprises:
when the reverse proxy server is started, establishing the shared memory;
and storing the RS information into the shared memory.
3. The method according to claim 1, wherein before the target process receiving the update request information updates RS information corresponding to the update request information in the shared memory, the method further comprises:
searching RS information corresponding to the updating request information;
judging whether the RS information corresponding to the updating request information is in a read-write state;
if the RS information corresponding to the updating request information is not in a read-write state, locking the RS information, wherein the locking of the RS information comprises forbidding any process except a target process to read and write the RS information;
after the target process receiving the update request information updates RS information corresponding to the update request information in the shared memory, the method further includes:
and unlocking the RS information.
4. The method according to claim 3, wherein after determining whether the RS information corresponding to the update request information is in a read-write state, the method further comprises:
and if the RS information corresponding to the updating request information is in a read-write state, after waiting for a preset time, re-judging whether the RS information corresponding to the updating request information is in the read-write state.
5. The method of claim 1, wherein the update request information of the RS information is transmitted through a pre-established control center, and the method further comprises:
according to a preset time interval, comparing RS information stored in the control center with RS information in the shared memory;
and when the difference information between the RS information stored in the control center and the RS information in the shared memory is larger than a preset threshold value, updating the RS information in the shared memory according to the RS information stored in the control center.
6. The method according to claim 1, wherein after the target process receiving the update request information updates RS information corresponding to the update request information in the shared memory, the method further comprises:
receiving request information of RS information of a load balancing background server, and acquiring updated RS information in the shared memory corresponding to the request information through a preset process.
7. An RS information updating apparatus, comprising:
the information receiving module is used for receiving update request information of RS information of the load balancing background server, wherein the RS information is stored in the shared memory;
and the information updating module is used for updating the RS information corresponding to the updating request information in the shared memory through the target process receiving the updating request information.
8. The apparatus of claim 7, further comprising:
the shared memory module is used for establishing the shared memory when the reverse proxy server is started;
and the information storage module is used for storing the RS information into the shared memory.
9. The apparatus of claim 8, further comprising:
the information searching module is used for searching the RS information corresponding to the updating request information;
the information judgment module is used for judging whether the RS information corresponding to the updating request information is in a read-write state;
an information locking module, configured to lock the RS information if the RS information corresponding to the update request information is not in a read-write state, where the locking the RS information includes prohibiting any process other than a target process from reading and writing the RS information;
and the information unlocking module is used for unlocking the RS information.
10. The apparatus of claim 9, further comprising:
and the read-write state module is used for judging whether the RS information corresponding to the updating request information is in the read-write state again after waiting for a preset time length if the RS information corresponding to the updating request information is in the read-write state.
11. The apparatus of claim 7, wherein the update request information of the RS information is transmitted through a pre-established control center, and the apparatus further comprises:
the information comparison module is used for comparing the RS information stored in the control center with the RS information in the shared memory according to a preset time interval;
and the threshold value judging module is used for updating the RS information in the shared memory according to the RS information stored in the control center when the difference information between the RS information stored in the control center and the RS information in the shared memory is larger than a preset threshold value.
12. The apparatus of claim 7, further comprising:
and the information acquisition module is used for receiving request information of the RS information of the load balancing background server and acquiring updated RS information in the shared memory corresponding to the request information through a preset process.
13. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-6 when executing a program stored in the memory.
14. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN202010032882.5A 2020-01-13 2020-01-13 RS information updating method and device, electronic equipment and storage medium Pending CN111221668A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010032882.5A CN111221668A (en) 2020-01-13 2020-01-13 RS information updating method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010032882.5A CN111221668A (en) 2020-01-13 2020-01-13 RS information updating method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111221668A true CN111221668A (en) 2020-06-02

Family

ID=70828373

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010032882.5A Pending CN111221668A (en) 2020-01-13 2020-01-13 RS information updating method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111221668A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630612A (en) * 2014-10-31 2016-06-01 腾讯科技(深圳)有限公司 Progress updating method and device
CN108712457A (en) * 2018-04-03 2018-10-26 苏宁易购集团股份有限公司 Back-end server dynamic load method of adjustment and device based on Nginx reverse proxys
CN109842651A (en) * 2017-11-27 2019-06-04 中国移动通信集团上海有限公司 A kind of continual load-balancing method of business and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630612A (en) * 2014-10-31 2016-06-01 腾讯科技(深圳)有限公司 Progress updating method and device
CN109842651A (en) * 2017-11-27 2019-06-04 中国移动通信集团上海有限公司 A kind of continual load-balancing method of business and system
CN108712457A (en) * 2018-04-03 2018-10-26 苏宁易购集团股份有限公司 Back-end server dynamic load method of adjustment and device based on Nginx reverse proxys

Similar Documents

Publication Publication Date Title
US20070118572A1 (en) Detecting changes in data
CN110008041B (en) Message processing method and device
US11886298B2 (en) Using a storage log to generate an incremental backup
CN109450969B (en) Method and device for acquiring data from third-party data source server and server
CN111708755A (en) Data migration method, device, system, electronic equipment and readable storage medium
EP3497586A1 (en) Discovery of calling application for control of file hydration behavior
CN113961510B (en) File processing method, device, equipment and storage medium
US8600960B2 (en) Processing proposed changes to data
CN112860953A (en) Data importing method, device, equipment and storage medium of graph database
CN110336813B (en) Access control method, device, equipment and storage medium
US11853229B2 (en) Method and apparatus for updating cached information, device, and medium
CN110489416B (en) Information storage method based on data processing and related equipment
CN110674153B (en) Data consistency detection method and device and electronic equipment
CN109976828B (en) Method and device for configuring file
CN111339054A (en) Storage system hierarchical management method, device, equipment and storage medium
CN111221668A (en) RS information updating method and device, electronic equipment and storage medium
CN111078418A (en) Operation synchronization method and device, electronic equipment and computer readable storage medium
CN110955460A (en) Service process starting method and device, electronic equipment and storage medium
CN116151631A (en) Service decision processing system, service decision processing method and device
CN110083509B (en) Method and device for arranging log data
CN113760854A (en) Method for identifying data in HDFS memory and related equipment
CN112291241A (en) Firewall wall opening method, firewall wall opening device and terminal equipment
CN111291127A (en) Data synchronization method, device, server and storage medium
CN111858497A (en) Storage type conversion method, device and equipment
US20210110053A1 (en) Exclusive control system and exclusive control method

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