Method and apparatus for maintaining a server
By sending configuration information to the back-end server and processing service relationship requests, the problem of low configuration accuracy and efficiency between the load balancing device and the back-end server is solved, and more efficient service relationship management is achieved.
Patent Information
- Application Number
- CN202210690175.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-17
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-06-17
AI Technical Summary
The existing debugging configuration between the load balancing device and the back-end server has problems of low accuracy and low efficiency, requiring administrators to configure parameters separately to achieve collaborative processing tasks.
By sending configuration information to the back-end server, the service relationship information is processed in response to processing requests, including verification of authentication information, registration or deregistration requests, to ensure the accuracy and efficiency of the service relationship information.
It improves the accuracy and efficiency of service relationship processing between the load balancing device and the back-end server, simplifies the administrator's configuration process, and enhances the security and flexibility of the system.
Smart Images

Figure CN115134227B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method and device for maintaining a server. Background Art
[0002] A load balancing device is a network device used to distribute access traffic to multiple backend servers for processing according to a preset strategy. In the prior art, in order to debug the configuration between the load balancing device and the backend server, the administrator needs to configure parameters for the load balancing device and the backend server respectively, so that the configured load balancing device and the backend server can collaborate to process tasks.
[0003] However, the existing method that requires the administrator to configure parameters for the load balancing device and the backend server separately has the problems of low accuracy and low efficiency. Summary of the invention
[0004] The present disclosure provides a method, an apparatus, an electronic device, and a computer-readable storage medium for maintaining a server.
[0005] According to a first aspect of the present disclosure, a method for maintaining a server is provided, which is applied to a load balancing device, and includes: sending configuration information for configuring a load balancing service to at least one back-end server; in response to receiving a processing request sent by the back-end server based on the configuration information, processing service relationship information of the back-end server based on the processing request, wherein the service relationship information is used to indicate the task served by the back-end server; and sending the processing result to the back-end server.
[0006] In some embodiments, the processing request includes authentication information; processing the service relationship information of the backend server based on the processing request includes: verifying the authentication information in the processing request; in response to determining that the verification is successful, processing the service relationship information of the backend server based on the processing request.
[0007] In some embodiments, the processing request includes information of a first server group, which is a server group that is communicatively connected to a load balancing device; the service relationship information of the back-end server is processed based on the processing request, including: if the processing request includes a registration request, registering the information of the back-end server to the information of the first server group based on the registration request; if the processing request includes a deregistration request, deregistering the information of the back-end server from the information of the first server group based on the deregistration request.
[0008] In some embodiments, before processing the service relationship information of the back-end server based on the processing request, the method includes: determining whether the first server group allows the execution of the processing request of the back-end server; in response to determining that the first server group allows the execution of the processing request of the back-end server, processing the service relationship information of the back-end server based on the processing request.
[0009] According to a second aspect of the present disclosure, a method for maintaining a server is provided, which is applied to a back-end server and includes: obtaining configuration information sent by a load balancing device for configuring a load balancing service; sending a processing request to the load balancing device based on the configuration information, the processing request being used to enable the load balancing device to process service relationship information of the back-end server, wherein the service relationship information is used to indicate the tasks served by the back-end server; and receiving the processing result sent by the load balancing device.
[0010] In some embodiments, the processing request includes information of a second server group, which is a server group that is communicatively connected to the load balancing device; if the processing request includes a registration request, the information of the second server group is used to register the information of the back-end server to the information of the second server group; if the processing request includes a deregistration request, the information of the second server group is used to deregister the information of the back-end server from the information of the second server group.
[0011] According to a third aspect of the present disclosure, there is provided an apparatus for maintaining a server, which is applied to a load balancing device, and includes: a first sending unit, configured to send configuration information for configuring a load balancing service to at least one back-end server; a processing unit, configured to respond to receiving a processing request sent by the back-end server based on the configuration information, and process service relationship information of the back-end server based on the processing request, wherein the service relationship information is used to indicate the task served by the back-end server; and a second sending unit, configured to send the processing result to the back-end server.
[0012] In some embodiments, the processing request includes authentication information; the processing unit includes: a verification module configured to verify the authentication information in the processing request; and a first processing module configured to process the service relationship information of the backend server based on the processing request in response to determining that the verification is successful.
[0013] In some embodiments, the processing request includes information of a first server group, which is a server group that is communicatively connected to the load balancing device; the processing unit includes: a registration module, configured to register the information of the backend server to the information of the first server group based on the registration request if the processing request includes a registration request; a deregistration module, configured to deregister the information of the backend server from the information of the first server group based on the deregistration request if the processing request includes a deregistration request.
[0014] In some embodiments, the device includes: a judgment unit configured to judge whether the first server group allows the execution of the processing request of the back-end server; a second processing module configured to process the service relationship information of the back-end server based on the processing request in response to determining that the first server group allows the execution of the processing request of the back-end server.
[0015] According to a fourth aspect of the present disclosure, there is provided an apparatus for maintaining a server, which is applied to a back-end server and includes: an acquisition unit configured to acquire configuration information sent by a load balancing device for configuring a load balancing service; a third sending unit configured to send a processing request to the load balancing device based on the configuration information, the processing request being used to enable the load balancing device to process service relationship information of the back-end server, wherein the service relationship information is used to indicate the tasks served by the back-end server; and a receiving unit configured to receive the processing result sent by the load balancing device.
[0016] In some embodiments, the processing request includes information of a second server group, which is a server group that is communicatively connected to the load balancing device; if the processing request includes a registration request, the information of the second server group is used to register the information of the backend server to the information of the second server group; if the processing request includes a deregistration request, the information of the second server group is used to deregister the information of the backend server from the information of the second server group.
[0017] According to the fifth aspect of the present disclosure, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for maintaining a server as provided in the first aspect or implement the method for maintaining a server as provided in the second aspect.
[0018] According to the sixth aspect of the present disclosure, an embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored, wherein when the program is executed by a processor, it implements the method for maintaining a server as provided in the first aspect or implements the method for maintaining a server as provided in the second aspect.
[0019] The method and apparatus for maintaining a server provided by the present disclosure include: a load balancing device sends configuration information for configuring a load balancing service to at least one back-end server; in response to receiving a processing request sent by the back-end server based on the configuration information, processing service relationship information of the back-end server based on the processing request, wherein the service relationship information is used to indicate the task served by the back-end server; and sending the processing result to the back-end server, which can improve the accuracy and efficiency of processing the service relationship of the back-end server.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.
[0022] Figure 1 is an exemplary system architecture diagram to which embodiments of the present application may be applied;
[0023] Figure 2 is a flow chart of an embodiment of a method for maintaining a server according to the present application;
[0024] Figure 3 is a flow chart of another embodiment of a method for maintaining a server according to the present application;
[0025] Figure 4 is a flow chart of another embodiment of a method for maintaining a server according to the present application;
[0026] Figure 5 is a flow chart of an embodiment of a method for maintaining a server according to the present application;
[0027] Figure 6 is a structural schematic diagram of an embodiment of a device for maintaining a server according to the present application;
[0028] Figure 7 is a structural schematic diagram of an embodiment of a device for maintaining a server according to the present application;
[0029] Figure 8 It is a block diagram of an electronic device used to implement the method for maintaining a server according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0031] Figure 1 An exemplary system architecture 100 is shown to which embodiments of the method for maintaining a server or the apparatus for maintaining a server of the present application can be applied.
[0032] like Figure 1 As shown, the system architecture 100 may include backend servers 101, 102, 103, a network 104, and a load balancing device 105. The network 104 is used to provide a medium for communication links between the backend servers 101, 102, 103 and the load balancing device 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0033] The user may use the backend servers 101, 102, 103 to interact with the load balancing device 105 through the network 104 to receive or send messages, etc. The backend servers 101, 102, 103 may be servers for processing various services or tasks.
[0034] The backend servers 101, 102, 103 can be hardware or software. When the backend servers 101, 102, 103 are hardware, they can be various electronic devices. When the backend servers 101, 102, 103 are software, they can be various software installed in the device. It can be implemented as multiple software or software modules (for example, multiple software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0035] The load balancing device 105 can send configuration information to at least one back-end server, and in response to receiving a processing request sent by the back-end server based on the configuration information, process the service relationship of the back-end server based on the processing request, where the service relationship is used for at least the task served by the back-end server, and send the processing result to the back-end server based on a predetermined communication protocol.
[0036] It should be noted that the method for maintaining a server provided in the embodiment of the present disclosure may be executed by the load balancing device 105 , and accordingly, the apparatus for maintaining a server may be disposed in the load balancing device 105 .
[0037] It should be understood that Figure 1The number of load balancing devices, backend servers and networks in the embodiment is only for illustration. Any number of load balancing devices, backend servers and networks may be provided according to implementation requirements.
[0038] Continue to refer Figure 2 , shows a process 200 of an embodiment of a method for maintaining a server according to the present disclosure, applied to a load balancing device, and comprising the following steps:
[0039] Step 201: Send configuration information for configuring a load balancing service to at least one backend server.
[0040] In this embodiment, the execution subject of the method for maintaining the server (for example Figure 1 The load balancing device 105 shown in the figure can send configuration information to each of the at least one back-end server in a wired or wireless manner. The back-end server refers to a server used to process data of a business or task. For example, the back-end server can be a server that processes video data sent by a front-end program (such as a program installed on a terminal device), a server that processes computing tasks sent by a front-end program, or a server that processes data monitoring tasks sent by a front-end program, etc., and can be a server used to process data of any business or task.
[0041] Configuration information refers to the information stored / used by the load balancing device for configuring the load balancing service, which may include information such as the network address / port information used for backend server registration in the load balancing device, the load balancing algorithm / communication protocol type used by the load balancing device, etc., which is used to make the backend server shake hands with the load balancing device, information of at least one backend server group that is connected to the load balancing device for communication, identification information of the backend server group, information on whether the backend server group allows the servers therein to actively register / unregister, and authentication information used for backend server registration / unregistration. Sending this configuration information to the backend server can enable the backend server to provide the information required to implement the load balancing configuration, or configure the software / hardware environment required to implement the load balancing configuration, based on the configuration requirements of the load balancing device.
[0042] The load balancing device can send configuration information to a new backend server when it appears in the local area network, can send configuration information to any backend server after receiving a request from the backend server, or can send configuration information to a specified backend server based on instructions entered by the user.
[0043] Step 202, in response to receiving a processing request sent by the backend server based on the configuration information, process the service relationship information of the backend server based on the processing request, wherein the service relationship information is used to indicate the task served by the backend server.
[0044] In this embodiment, when the load balancing device receives a processing request sent by the back-end server based on the configuration information, it processes the service relationship of the back-end server based on the processing request. The service relationship of the back-end server is used to indicate the load balancing strategy determined by the load balancing device based on the load balancing algorithm and / or the current business traffic, that is, the processing tasks / businesses that each back-end server determined by the load balancing device needs to serve. Among them, the processing request can be a request sent by the back-end server to the load balancing device to register with the load balancing device, a request sent by the back-end server to the load balancing device to deregister from the load balancing device, or a request sent by the back-end server to the load balancing device to change the task served by the back-end server, etc.
[0045] Step 203: Send the processing result to the backend server.
[0046] In this embodiment, the load balancing device can send the processing result of the service relationship information of the backend processing server to the backend server based on the predetermined communication protocol for communication between the load balancing device and the backend server. For example, when the processing request is a request sent by the backend server to the load balancing device to register with the load balancing device, the processing result can be information indicating successful registration or failed registration; when the processing request is a request sent by the backend server to the load balancing device to deregister from the load balancing device, the processing result can be information indicating successful deregistration or failed deregistration; when the processing request is a request sent by the backend server to the load balancing device to query maintenance information, the processing result can be information such as the load balancing strategy applied by the load balancing device, the registration / deregistration log of the backend server, the system parameters of the backend server, and the weight of the backend server returned by the load balancing device to the backend server.
[0047] The method for maintaining servers provided by this embodiment includes: a load balancing device sending configuration information for configuring a load balancing service to at least one back-end server; in response to receiving a processing request sent by the back-end server based on the configuration information, processing the service relationship information of the back-end server based on the processing request, wherein the service relationship information is used to indicate the task served by the back-end server; sending the processing result to the back-end server, and processing the service relationship information of the back-end server based on the request of the back-end server, thereby improving the accuracy and efficiency of processing the service relationship of the back-end server.
[0048] Continue to refer Figure 3 , shows a process 300 of another embodiment of the method for maintaining a server according to the present disclosure, which is applied to a load balancing device and includes the following steps:
[0049] Step 301: Send configuration information for configuring a load balancing service to at least one backend server.
[0050] Step 302: in response to receiving a processing request sent by the backend server based on the configuration information, verify the authentication information in the processing request.
[0051] In this embodiment, when the load balancing device receives the processing request sent by the back-end server based on the configuration information, the authentication information contained in the processing request is verified. The authentication information can be information pre-stored in the back-end server, or information containing the back-end server identifier, so that the load balancing device verifies whether the back-end server whose service relationship information is processed by the request is a legitimate back-end server.
[0052] Step 303: In response to determining that the verification is successful, the service relationship information of the backend server is processed based on the processing request.
[0053] In this embodiment, after the load balancing device determines that the authentication information sent by the backend server passes the verification, the service relationship information of the backend server is processed based on the processing request.
[0054] Step 304: Send the processing result to the backend server.
[0055] The description of step 301 and step 304 in this embodiment is consistent with the description of step 201 and step 203, and will not be repeated here.
[0056] Compared with the method for maintaining a server provided in this embodiment, Figure 2 The described embodiment adds a step of processing the service relationship information of the back-end server only after the load balancing device verifies that the authentication information contained in the processing request sent by the back-end server has passed the verification, which can improve the security of the system.
[0057] Continue to refer Figure 4 , shows a process 400 of another embodiment of a method for maintaining a server according to the present disclosure, which is applied to a load balancing device, wherein the processing request includes information of a first server group, and the first server group is a server group that is in communication connection with the load balancing device, and the method includes the following steps:
[0058] Step 401: Send configuration information for configuring a load balancing service to at least one backend server.
[0059] Step 4021, if a registration request is received from the backend server based on the configuration information, the information of the backend server is registered into the information of the first server group based on the registration request, wherein the service relationship information is used to indicate the task served by the backend server.
[0060] In this embodiment, when the load balancing device receives a processing request including a registration request sent by the back-end server based on the configuration information, the information of the back-end server is registered with the information of the first server group based on the registration request, so that the load balancing device can drive the back-end server to process a certain service / task / data based on the load balancing strategy and the current processing requirements. The processing request also includes information of the first server group, such as the identifier or network address of the first server group. The first server group is a server group that is connected to the load balancing device for communication. The first server group is specifically a server cluster composed of at least one server specified by the load balancing device based on the load balancing strategy and used to serve a certain type of service / task or a certain service / task.
[0061] Step 4022: If a deregistration request is received from the backend server based on the configuration information, the information of the backend server is deregistered from the information of the first server group based on the deregistration request, wherein the service relationship information is used to indicate the task served by the backend server.
[0062] In this embodiment, when the load balancing device receives a processing request sent by the back-end server based on configuration information that includes a logout request, the information of the back-end server is logged out from the information of the first server group based on the logout request, so that the back-end server no longer participates in the tasks / services assigned by the load balancing device.
[0063] Step 403: Send the processing result to the backend server.
[0064] The description of step 401 and step 403 in this embodiment is consistent with the description of step 201 and step 203, and will not be repeated here.
[0065] Compared with the method for maintaining a server provided in this embodiment, Figure 2 In the described embodiment, the processing request includes information of the first server group, and the processing request is divided into two cases: a registration request or a deregistration request. The load balancing device registers the information of the back-end server to the information of the first server group based on the registration request, or the load balancing device deregisters the information of the back-end server from the information of the first server group based on the deregistration request, so as to flexibly update the back-end servers in the preset server group for serving different businesses / tasks, thereby improving the flexibility of the system and the efficiency of updating the back-end servers in different server groups.
[0066] In the above process, after the backend server self-registers with the load balancing device, the load balancing device can distribute traffic to the backend server. Before distribution, you can choose to perform a health check on the backend server and distribute traffic to the backend server after the health check passes. Of course, you can also distribute traffic directly without performing a health check.
[0067] Optionally, before processing the service relationship information of the back-end server based on the processing request, the method for maintaining the server includes: determining whether the first server group allows the execution of the processing request of the back-end server; in response to determining that the first server group allows the execution of the processing request of the back-end server, processing the service relationship information of the back-end server based on the processing request.
[0068] In this embodiment, before the load balancing device processes the service relationship information of the back-end server based on the processing request, it is necessary to determine whether the first server group allows the execution of the processing request of the back-end server, that is, it is necessary to determine whether the first server group allows other back-end servers to actively register with the server group, or whether it allows the registered back-end servers in the group to actively deregister from the server group, so as to ensure the security of the first server group. After the load balancing device determines that the first server group allows other back-end servers to actively register with the server group, or allows the registered back-end servers in the group to actively deregister from the server group, it can process the service relationship information of the back-end server based on the processing request to improve the security of the system.
[0069] Optionally, the load balancing device may also maintain registration log information or deregistration log information of the backend server, and may forcibly deregister a registered backend server.
[0070] Continue to refer Figure 5 , shows a process 500 of an embodiment of a method for maintaining a server according to the present disclosure, applied to a backend server, the method comprising the following steps:
[0071] Step 501: Obtain configuration information sent by a load balancing device for configuring a load balancing service.
[0072] In this embodiment, the execution subject of the method for maintaining the server (for example Figure 1The backend servers 101, 102, and 103 shown in the figure can obtain the configuration information for configuring the load balancing service sent by the load balancing device through wired or wireless means. The configuration information refers to the information stored / used by the load balancing device for configuring the load balancing service, which may include the network address / port number information for the backend server registration in the load balancing device, the load balancing algorithm used by the load balancing device, and other information for the backend server to shake hands with the load balancing device.
[0073] Step 502: Send a processing request to the load balancing device based on the configuration information, where the processing request is used to enable the load balancing device to process the service relationship information of the backend server, wherein the service relationship information is used to indicate the task served by the backend server.
[0074] In this embodiment, the backend server can complete the configuration based on the configuration information, such as calling the communication protocol based on the handshake protocol included in the configuration information, determining the server group to be registered based on the information of the backend server provided by the configuration information, and preparing for the communication connection based on the port information included in the configuration information. After completing the configuration, a processing request is sent to the load balancing device so that the load balancing device processes the service relationship of the backend server based on the processing request. The service relationship of the backend server is used to indicate the load balancing strategy determined by the load balancing device based on the load balancing algorithm and / or the current business traffic, that is, the processing tasks / businesses that each backend server determined by the load balancing device needs to serve.
[0075] Among them, the processing request can be a request sent by the back-end server to the load balancing device to register with the load balancing device, a request sent by the back-end server to the load balancing device to deregister from the load balancing device, or a request sent by the back-end server to the load balancing device to change the task served by the back-end server, etc.
[0076] Step 503: Receive the processing result sent by the load balancing device.
[0077] In this embodiment, the backend server may receive the processing result of the service relationship information for the backend server returned by the load balancing device based on a predetermined communication protocol.
[0078] The method for maintaining a server provided in this embodiment obtains configuration information sent by a load balancing device for configuring a load balancing service; sends a processing request to the load balancing device based on the configuration information, the processing request is used to enable the load balancing device to process the service relationship information of the back-end server, wherein the service relationship information is used to indicate the task served by the back-end server; receives the processing result sent by the load balancing device, and the back-end server can actively send a processing request to the load balancing device so that the load balancing device processes the service relationship information of the back-end server, which can improve the accuracy and efficiency of processing the service relationship of the back-end server.
[0079] Optionally, the processing request includes information of a second server group, which is a server group that is communicatively connected to the load balancing device; if the processing request includes a registration request, the information of the second server group is used to register the information of the back-end server to the information of the second server group; if the processing request includes a deregistration request, the information of the second server group is used to deregister the information of the back-end server from the information of the second server group.
[0080] In this embodiment, the processing request may include information of the second server group, such as the identifier or network address of the second server group. The second server group is a server group that is communicatively connected to the load balancing device. The second server group is specifically a server cluster composed of at least one server specified by the load balancing device based on the load balancing strategy and used to serve a certain type of business / task or a certain business / task.
[0081] If the processing request includes a registration request, the information of the second server group is used to enable the load balancing device to register the information of the backend server with the information of the second server group. The processing request also includes the information of the second server group, such as the identifier or network address of the second server group. The second server group is a server group that is connected to the load balancing device for communication. The second server group is specifically a server cluster composed of at least one server that is specified by the load balancing device based on the load balancing strategy and is used to serve a certain type of business / task. If the processing request includes a deregistration request, the information of the second server group is used to enable the load balancing device to deregister the information of the backend server from the information of the second server group.
[0082] In this embodiment, the processing request includes information of the second server group, and the processing request is divided into two cases: a registration request or a deregistration request. The load balancing device registers the information of the back-end server to the information of the second server group based on the registration request, or the load balancing device deregisters the information of the back-end server from the information of the second server group based on the deregistration request, so as to flexibly update the back-end servers in the preset server group used to serve different businesses / tasks, thereby improving the flexibility of the system and the efficiency of updating the back-end servers in different server groups.
[0083] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for maintaining a server. Figure 2 , Figure 3 and Figure 4 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0084] like Figure 6 As shown, the apparatus for maintaining a server in this embodiment is applied to a load balancing device, and includes: a first sending unit 601, a processing unit 602, and a second sending unit 603. The first sending unit is configured to send configuration information for configuring a load balancing service to at least one backend server; the processing unit is configured to process the service relationship information of the backend server based on the processing request in response to receiving a processing request sent by the backend server based on the configuration information, wherein the service relationship information is used to indicate the task served by the backend server; and the second sending unit is configured to send the processing result to the backend server.
[0085] In some embodiments, the processing request includes authentication information; the processing unit includes: a verification module configured to verify the authentication information in the processing request; and a first processing module configured to process the service relationship information of the backend server based on the processing request in response to determining that the verification is successful.
[0086] In some embodiments, the processing request includes information of a first server group, which is a server group that is communicatively connected to the load balancing device; the processing unit includes: a registration module, configured to register the information of the backend server to the information of the first server group based on the registration request if the processing request includes a registration request; a deregistration module, configured to deregister the information of the backend server from the information of the first server group based on the deregistration request if the processing request includes a deregistration request.
[0087] In some embodiments, the device includes: a judgment unit configured to judge whether the first server group allows the execution of a processing request of the back-end server; a second processing module configured to process the service relationship information of the back-end server based on the processing request in response to determining that the first server group allows the execution of the processing request of the server.
[0088] Each unit in the above device 600 is similar to the reference Figure 2 , Figure 3 and Figure 4Therefore, the operations, features and technical effects described above for the method for maintaining a server are also applicable to the device 600 and the units included therein, and will not be described in detail here.
[0089] Further references Figure 7 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for maintaining a server. Figure 5 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0090] like Figure 7 As shown, the apparatus for maintaining a server in this embodiment is applied to a backend server and includes: an acquisition unit 701, a third sending unit 702, and a receiving unit 703. The acquisition unit is configured to acquire configuration information sent by a load balancing device for configuring a load balancing service; the third sending unit is configured to send a processing request to the load balancing device based on the configuration information, and the processing request is used to enable the load balancing device to process the service relationship information of the backend server, wherein the service relationship information is used to indicate the task served by the backend server; and the receiving unit is configured to receive the processing result sent by the load balancing device.
[0091] In some embodiments, the processing request includes information of a second server group, which is a server group that is communicatively connected to the load balancing device; if the processing request includes a registration request, the information of the second server group is used to register the information of the back-end server to the information of the second server group; if the processing request includes a deregistration request, the information of the second server group is used to deregister the information of the back-end server from the information of the second server group.
[0092] Each unit in the above device 700 is similar to the reference Figure 5 Therefore, the operations, features and technical effects described above for the method for maintaining a server are also applicable to the device 700 and the units included therein, and will not be described in detail here.
[0093] According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.
[0094] like Figure 8, is a block diagram of an electronic device 800 for maintaining a method for a server according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0095] like Figure 8 As shown, the electronic device includes: one or more processors 801, memory 802, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 801 is taken as an example.
[0096] The memory 802 is a non-transient computer-readable storage medium provided in the present application. The memory stores instructions executable by at least one processor to enable the at least one processor to perform the method for maintaining a server provided in the present application. The non-transient computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to perform the method for maintaining a server provided in the present application.
[0097] The memory 802 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the method for maintaining a server in the embodiment of the present application (for example, the attached Figure 6 The processor 801 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 802, that is, the method for maintaining the server in the above method embodiment is implemented.
[0098] The memory 802 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the electronic device for extracting video clips, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 802 may optionally include a memory remotely arranged relative to the processor 801, and these remote memories may be connected to the electronic device for extracting video clips via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0099] The electronic device for maintaining the server method may further include: an input device 803, an output device 804, and a bus 805. The processor 801, the memory 802, the input device 803, and the output device 804 may be connected via the bus 805 or in other ways. Figure 8 The connection via bus 805 is taken as an example.
[0100] The input device 803 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device for extracting video clips, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick, and other input devices. The output device 804 may include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.
[0101] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0102] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0103] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0104] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0105] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
[0106] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.
[0107] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A method for maintaining a server, applied to a load balancing device, comprising: In response to detecting that at least one new back-end server appears in the local area network, configuration information for configuring a load balancing service is sent to the at least one back-end server, wherein the configuration information includes information for configuring a load balancing service stored and / or used by the load balancing device, so that the back-end server provides information required for implementing the load balancing configuration, or configures a software and / or hardware environment required for implementing the load balancing configuration, based on the configuration information; In response to receiving a processing request sent by the backend server based on the configuration information, verifying authentication information in the processing request; In response to determining that the verification is passed, processing the service relationship information of the backend server based on the processing request, wherein the service relationship information is used to indicate the task served by the backend server; Sending the processing result to the backend server.
2. The method according to claim 1, wherein: The processing request includes information of a first server group, where the first server group is a server group that is in communication connection with the load balancing device; and processing the service relationship information of the backend server based on the processing request includes: If the processing request includes a registration request, registering the information of the backend server into the information of the first server group based on the registration request; If the processing request includes a deregistration request, the information of the backend server is deregistered from the information of the first server group based on the deregistration request.
3. The method according to claim 2, wherein: Before processing the service relationship information of the backend server based on the processing request, the method includes: Determining whether the first server group is allowed to execute the processing request of the back-end server; In response to determining that the first server group allows execution of the processing request of the backend server, service relationship information of the backend server is processed based on the processing request.
4. A method for maintaining a server, applied to a back-end server, comprising: In response to entering the local area network, obtaining configuration information for configuring the load balancing service sent by the load balancing device, the configuration information including information for configuring the load balancing service stored and / or used by the load balancing device, and providing information required for implementing the load balancing configuration, or configuring the software and / or hardware environment required for implementing the load balancing configuration based on the configuration information; Sending a processing request to the load balancing device based on the configuration information, wherein the processing request includes authentication information, so that the load balancing device verifies the authentication information and processes the service relationship information of the back-end server after the verification is passed, wherein the service relationship information is used to indicate the task served by the back-end server; Receive the processing result sent by the load balancing device.
5. The method according to claim 4, wherein: The processing request includes information of a second server group, where the second server group is a server group that is in communication connection with the load balancing device; If the processing request includes a registration request, the information of the second server group is used to register the information of the backend server into the information of the second server group; If the processing request includes a deregistration request, the information of the second server group is used to deregister the information of the backend server from the information of the second server group.
6. A device for maintaining a server, applied to a load balancing device, comprising: A first sending unit is configured to, in response to detecting that at least one new back-end server appears in the local area network, send configuration information for configuring a load balancing service to the at least one back-end server, wherein the configuration information includes information for configuring a load balancing service stored and / or used by the load balancing device, so that the back-end server provides information required for implementing the load balancing configuration, or configures a software and / or hardware environment required for implementing the load balancing configuration based on the configuration information; a processing unit, configured to, in response to receiving a processing request sent by the backend server based on the configuration information, process the service relationship information of the backend server based on the processing request, wherein the service relationship information is used to indicate the task served by the backend server; A second sending unit is configured to send the processing result to the backend server; The processing request includes authentication information; the processing unit includes: A verification module, configured to verify the authentication information in the processing request; The first processing module is configured to process the service relationship information of the backend server based on the processing request in response to determining that the verification is passed.
7. The device according to claim 6, wherein: The processing request includes information of a first server group, where the first server group is a server group that is in communication connection with the load balancing device; the processing unit includes: a registration module configured to register the information of the backend server into the information of the first server group based on the registration request if the processing request includes a registration request; The deregistration module is configured to deregister the information of the backend server from the information of the first server group based on the deregistration request if the processing request includes a deregistration request.
8. The device according to claim 7, wherein: The device comprises: a determination unit, configured to determine whether the first server group is allowed to execute the processing request of the backend server; The second processing module is configured to process the service relationship information of the backend server based on the processing request in response to determining that the first server group allows the execution of the processing request of the backend server.
9. A device for maintaining a server, applied to a back-end server, comprising: an acquisition unit, configured to, in response to entering the local area network, acquire configuration information for configuring the load balancing service sent by the load balancing device, the configuration information including information for configuring the load balancing service stored and / or used by the load balancing device, and provide information required for implementing the load balancing configuration, or configure a software and / or hardware environment required for implementing the load balancing configuration based on the configuration information; a third sending unit, configured to send a processing request to the load balancing device based on the configuration information, wherein the processing request includes authentication information, so that the load balancing device verifies the authentication information and processes the service relationship information of the backend server after the verification is passed, wherein the service relationship information is used to indicate the task served by the backend server; The receiving unit is configured to receive the processing result sent by the load balancing device.
10. The device according to claim 9, wherein: The processing request includes information of a second server group, where the second server group is a server group that is in communication connection with the load balancing device; If the processing request includes a registration request, the information of the second server group is used to register the information of the backend server into the information of the second server group; If the processing request includes a deregistration request, the information of the second server group is used to deregister the information of the backend server from the information of the second server group.
11. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method of any one of claims 1-3 or the method of any one of claims 4-5.
12. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the method of any one of claims 1-3 or the method of any one of claims 4-5.
