CN111913732B - Service updating method and device, management server and storage medium - Google Patents

Service updating method and device, management server and storage medium Download PDF

Info

Publication number
CN111913732B
CN111913732B CN202010893499.9A CN202010893499A CN111913732B CN 111913732 B CN111913732 B CN 111913732B CN 202010893499 A CN202010893499 A CN 202010893499A CN 111913732 B CN111913732 B CN 111913732B
Authority
CN
China
Prior art keywords
service
server
access
servers
configuration data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010893499.9A
Other languages
Chinese (zh)
Other versions
CN111913732A (en
Inventor
童玉云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Saiante Technology Service Co Ltd
Original Assignee
Shenzhen Saiante Technology Service 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 Shenzhen Saiante Technology Service Co Ltd filed Critical Shenzhen Saiante Technology Service Co Ltd
Priority to CN202010893499.9A priority Critical patent/CN111913732B/en
Publication of CN111913732A publication Critical patent/CN111913732A/en
Application granted granted Critical
Publication of CN111913732B publication Critical patent/CN111913732B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

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

Abstract

The embodiment of the application discloses a service updating method and device, a management server and a storage medium, which are applied to the field of service management, wherein the method comprises the following steps: acquiring a pre-configured access weight of a target service server, adjusting the pre-configured access weight to zero, determining other service servers which are deployed with the same service as the target service server from the started service servers, and adjusting the pre-configured access weights of the other servers according to a preset adjustment rule; based on the new access weight corresponding to the target service server and other servers, new service configuration data are generated, the new service configuration data are issued to the reverse proxy server, and update confirmation indication information aiming at the target service server is returned to the client. The method is beneficial to ensuring the normal response to the access request in the service updating process.

Description

Service updating method and device, management server and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a service updating method and apparatus, a management server, and a storage medium.
Background
In a distributed environment, almost all services need to deploy multiple instances, abbreviated as service deployment, on multiple service servers for various reasons such as loading, disaster recovery, and the like. At present, the conventional service deployment generally needs to stop all service servers and then go to update the service, and in the update process, the received access request cannot be responded, and a new access request cannot be received, so that the normal response to the access request is seriously affected.
Disclosure of Invention
The embodiment of the application provides a service updating method, a device, a management server and a storage medium, in the service updating process of a target service server, all service servers are not required to be stopped, and the access weights of the target service server and other service servers providing the same service with the target service server are updated by adjusting the access weights, so that a reverse proxy server can not issue an access request to the target service server, but process the access request by the other service servers providing the same service based on the corresponding access weights, thereby being beneficial to ensuring the normal response to the access request in the service updating process.
In one aspect, an embodiment of the present application provides a service update method, where the method is performed by a management server in a service deployment system, where the service deployment system further includes a reverse proxy server, at least one service server deployed with a service, and a client corresponding to the management server, where the management server is configured to manage service configuration data that characterizes access weights of each service server, and send the service configuration data to the reverse proxy server, and where the reverse proxy server is configured to control forwarding amounts for forwarding access requests to each service server based on the service configuration data, where the method includes:
receiving a service deployment update request from the client, wherein the service deployment update request carries identification information of a service server;
determining a target service server matched with the identification information from the started service servers;
obtaining a preconfigured access weight of the target service server, and adjusting the preconfigured access weight to zero to obtain a new access weight corresponding to the target service server;
determining other service servers which are deployed with the same service as the target service server from the started service servers, and adjusting the preconfigured access weights of the other servers according to preset adjustment rules to obtain new access weights corresponding to the other service servers;
Generating new service configuration data based on the new access weights corresponding to the target service server and the other servers respectively;
the new service configuration data is issued to the reverse proxy server, update confirmation indication information aiming at the target service server is returned to the client, the new service configuration data is used for indicating the reverse proxy server to control forwarding quantity of forwarding an access request to the target service server and the other servers based on new access weights corresponding to the target service server and the other servers respectively, and the update confirmation indication information is used for prompting a user corresponding to the client to update the service deployed by the target service server;
and if the new access weight corresponding to the target service server is zero, the forwarding amount corresponding to the target service server is zero.
In still another aspect, an embodiment of the present application provides a service update apparatus, where the apparatus is configured in a management server, where the management server is deployed in a service deployment system, where the service deployment system further includes a reverse proxy server, at least one service server deployed with a service, and a client corresponding to the management server, where the management server is configured to manage service configuration data representing access weights of each service server, and send the service configuration data to the reverse proxy server, where the reverse proxy server is configured to control forwarding amounts for forwarding access requests to each service server based on the service configuration data, where the service update apparatus includes:
The communication module is used for receiving a service deployment update request from the client, wherein the service deployment update request carries identification information of a service server;
the processing module is used for determining a target service server matched with the identification information from the started service servers;
the processing module is further configured to obtain a preconfigured access weight of the target service server, adjust the preconfigured access weight to zero, obtain a new access weight corresponding to the target service server, determine other service servers with the same service deployed with the target service server from the started service servers, and adjust the preconfigured access weights of the other servers according to a preset adjustment rule, so as to obtain the new access weight corresponding to the other service servers;
the processing module is further configured to generate new service configuration data based on new access weights corresponding to the target service server and the other servers respectively;
the communication module is further configured to issue the new service configuration data to the reverse proxy server, and return update confirmation indication information for the target service server to the client, where the new service configuration data is used to instruct the reverse proxy server to control forwarding amounts of forwarding an access request to the target service server and the other servers based on new access weights corresponding to the target service server and the other servers, and the update confirmation indication information is used to prompt the corresponding user of the client to update the service deployed by the target service server;
And if the new access weight corresponding to the target service server is zero, the forwarding amount corresponding to the target service server is zero.
In yet another aspect, an embodiment of the present application provides a management server, including a processor, a storage device, and a communication interface, where the processor, the storage device, and the communication interface are connected to each other, where the storage device is configured to store a computer program supporting a terminal to execute the foregoing method, the computer program includes program instructions, and the processor is configured to invoke the program instructions to perform the following steps:
receiving a service deployment update request from the client, wherein the service deployment update request carries identification information of a service server;
determining a target service server matched with the identification information from the started service servers;
obtaining a preconfigured access weight of the target service server, and adjusting the preconfigured access weight to zero to obtain a new access weight corresponding to the target service server;
determining other service servers which are deployed with the same service as the target service server from the started service servers, and adjusting the preconfigured access weights of the other servers according to preset adjustment rules to obtain new access weights corresponding to the other service servers;
Generating new service configuration data based on the new access weights corresponding to the target service server and the other servers respectively;
the new service configuration data is issued to the reverse proxy server, update confirmation indication information aiming at the target service server is returned to the client, the new service configuration data is used for indicating the reverse proxy server to control forwarding quantity of forwarding an access request to the target service server and the other servers based on new access weights corresponding to the target service server and the other servers respectively, and the update confirmation indication information is used for prompting a user corresponding to the client to update the service deployed by the target service server;
and if the new access weight corresponding to the target service server is zero, the forwarding amount corresponding to the target service server is zero.
According to the method and the device for updating the access weight, the access weight of the target service server and the access weight of other service servers providing the same service with the target service server can be updated, and then in the service updating process of the target service server, the reverse proxy server can not issue the access request to the target service server, but can process the access request by the other service servers providing the same service based on the corresponding access weight, so that the normal response to the access request in the service updating process is guaranteed. In contrast to conventional service deployment, there is no need to stop some or all of the servers and then go to an update service.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a reverse proxy server according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a system with service deployment according to an embodiment of the present application;
FIG. 3 is a flowchart of a service update method according to an embodiment of the present application;
FIG. 4 is a flow chart of another service update method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a service updating apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a management server according to an embodiment of the present application.
Detailed Description
Nginx (engine x) is a high-performance HTTP and reverse proxy web server, where nmginx can act as an HTTP server for web site posting, and where nmginx can act as a reverse proxy for load balancing implementation. In the embodiment of the application, nginx is mainly used as a reverse proxy server. Regarding the processing mode of the reverse proxy, taking a certain X website as an example, the number of visitors connected to the website at the same time every day has exploded, and a single server can not meet the increasing purchasing desire of people, at this time, a well-known noun appears: a distributed deployment; that is, the problem of access population limitation is solved by deploying a plurality of servers.
Most of the functions in a certain X website are directly realized by using Nginx for reverse proxy, and a specific deployment mode can be seen in FIG. 1. As can be seen from fig. 1, the flow of the reverse proxy by nginnx is: and after receiving the requests sent by the plurality of clients to the Nginx server, the Nginx server distributes the requests to the service processing server at the back end for processing according to a certain rule. The source of the request, i.e. the user terminal, is now explicit, but it is not clear which server the request is specifically handled by, the nginnx plays a reverse proxy role, the client is unaware of the existence of the proxy, the reverse proxy is transparent to the outside, and the visitor does not know that he accesses it. As the user terminal can be accessed without any configuration. Wherein the reverse proxy acts as: the security of the intranet is ensured, the reverse proxy is usually used as a public network access address, and the Web server is the intranet. Load balancing, the load of the website is optimized through the reverse proxy server.
Referring to fig. 2, an embodiment of the present application proposes a service deployment system, which includes a management server 20, a client 21 corresponding to the management server, a reverse proxy server 22, at least one service server 23, and at least one user terminal 24. Wherein each service server 23 may deploy one or more services, the management server 20 is configured to manage service configuration data characterizing access weights of the respective service servers and to issue the service configuration data to the reverse proxy server 22, the reverse proxy server 22 being configured to control forwarding amounts for forwarding access requests from the user terminal 24 to the respective service servers based on the service configuration data. The management server, the service server and the reverse proxy server may be independent physical servers, or may be a server cluster or a distributed system formed by a plurality of physical servers.
The services referred to in the embodiments of the present application may refer to, for example, a login service, a payment service, and the like provided for a user, and each service may correspond to a plurality of service servers. Taking a login service as an example, the service corresponding to the service may be used to provide a username-password login service, and the service corresponding to the service may be used to provide a scan-code login service by the service corresponding to the service server 2.
The service deployment system further comprises a reverse proxy server, at least one service server deployed with a service and a client corresponding to the management server, wherein the management server is used for managing service configuration data representing access weights of the service servers and issuing the service configuration data to the reverse proxy server, and the reverse proxy server is used for controlling forwarding amounts for forwarding the access requests to the service servers based on the service configuration data. Referring to fig. 3, the method of the embodiment of the present application includes the following steps.
S301: and receiving a service deployment update request from the client, wherein the service deployment update request carries the identification information of the service server. Wherein the identification information of the service server may refer to a number or the like for uniquely identifying the service server.
In a specific implementation, when a user wants to update a service deployed by a target service server, the target service server may be selected from a service server list displayed by a client, and an operation of service deployment update is input for the target service server (for example, after the target service server is selected, a service update button of a current display page is clicked and pressed). After detecting the operation of service deployment update, the client can acquire the identification information of the target service server and send a service deployment update request carrying the identification information of the target service server to the management server.
S302: and determining a target service server matched with the identification information from the started service servers.
In a specific implementation, the management server may detect an operation state of each service server in the service deployment system, and determine, based on the operation state, an activated service server from the service deployment system. Further, the target service server corresponding to the identification information can be queried from the started service servers through the identification information.
S303: and obtaining the pre-configured access weight of the target service server, and adjusting the pre-configured access weight to zero to obtain a new access weight corresponding to the target service server.
In one embodiment, a service configuration page may be displayed in advance through a client, a user may configure an access weight (i.e., pre-configure an access weight) of each service server in the service configuration page, after the configuration is completed, service configuration data for each service server may be generated and uploaded to a management server, the management server may store the service configuration data and issue the service configuration data to a reverse proxy server, and the reverse proxy server may control a forwarding amount for forwarding an access request to each service server based on the access weight of each service server indicated by the service configuration data.
Specifically, the relationship between the size of the access weight corresponding to each service server and the forwarding amount of the reverse proxy server for forwarding the access request to each service server is a direct ratio. It can be understood that the higher the access weight of any service server, the more the number of access requests forwarded by the reverse proxy server to the any service server is represented, that is, the larger the corresponding forwarding amount is, and conversely, the smaller the forwarding amount is. If the access weight of any service server is 0, the number of access requests forwarded by the reverse proxy server to the any service server is represented as 0, that is, the corresponding forwarding amount is 0.
S304: and determining other service servers which are deployed with the same service as the target service server from the started service servers, and adjusting the preconfigured access weights of the other servers according to preset adjustment rules to obtain new access weights corresponding to the other service servers.
The service may refer to, for example, a login service, a payment service, and the like provided for the user, and each service may correspond to a plurality of service servers. Illustratively, assume that the service deployment system includes a service server 1, a service server 2, a service server 3, a service server 4, and a service server 5, each of the service server 1 and the service server 2 being for providing a login service, each of the service server 3, the service server 4, and the service server 5 being for providing a payment service. Then, when the target service server is the service server 3, the service server 4 and the service server 5 can be determined as other service servers having the same service deployed with the service server 3.
The preset adjustment rule is preset, for example, the service provided by the target service server is login service, the login service provided by the target service server further comprises a service server 1 and a service server 2, the preconfigured access weights of the three servers of the target service server, the service server 1 and the service server 3 are respectively 0.4, 0.2 and 0.4, and then the preset adjustment rule can be that the preconfigured access weights of the target service server are averagely distributed to other servers providing the same service. In this case, after modifying the access weight corresponding to the target service server to 0, the access weight of the service server 1 may be updated to 0.4, and the access weight of the service server 2 may be updated to 0.6.
S305: and generating new service configuration data based on the new access weights corresponding to the target business server and other servers respectively.
In one embodiment, service configuration data before updating the access weights corresponding to the current target service server and other servers (for example, the service configuration data obtained by configuring the access weights of the service servers through the service configuration page) may be obtained. Further, the access weight parts corresponding to the target service server and the other servers in the service configuration data can be updated through the new access weights corresponding to the target service server and the other servers, so that the new service configuration data is obtained.
S306: and transmitting the new service configuration data to the reverse proxy server, and returning update confirmation indication information aiming at the target service server to the client.
The new service configuration data is used for indicating the reverse proxy server to control the forwarding amount for forwarding the access request to the target service server and other servers based on the new access weights corresponding to the target service server and other servers. And if the new access weight corresponding to the target service server is zero, the forwarding amount corresponding to the target service server is zero.
The update confirmation indication information is used for prompting the corresponding user of the client to update the service deployed by the target service server. That is, when the client side corresponding user views the update confirmation indication information through the client side, it can know that the preparation work for updating the service deployed by the target service server is completed (that is, the access weight is updated), and the user can perform the subsequent operation of service update on the target service server. By adopting the mode, in the subsequent process of updating the corresponding service of the target service server, the reverse proxy server can be ensured not to issue the access request to the target service server, but to process the access request by other servers providing the same service based on the corresponding access weight. In contrast to conventional service deployment, there is no need to stop some or all of the servers and then go to an update service.
In the embodiment of the application, the access weights of the target service server and other service servers providing the same service with the target service server can be updated by adjusting the access weights, and then in the service updating process of the target service server, the reverse proxy server can not issue the access request to the target service server, but can process the access request by the other service servers providing the same service based on the corresponding access weights, thereby being beneficial to ensuring the normal response to the access request in the service updating process. In contrast to conventional service deployment, there is no need to stop some or all of the servers and then go to an update service.
Referring to fig. 4, another service updating method is provided, which may be executed by a management server in a service deployment system, where the service deployment system further includes a reverse proxy server, at least one service server deployed with a service, and a client corresponding to the management server, where the management server is configured to manage service configuration data characterizing access weights of the service servers, and send the service configuration data to the reverse proxy server, where the reverse proxy server is configured to control forwarding amounts for forwarding access requests to the service servers based on the service configuration data. Referring to fig. 4, the method of the embodiment of the present application includes the following steps.
S401: acquiring service information of each service server, wherein the service information comprises any one or more of the following: internet protocol, port information, location information, identification information, and service description information of the corresponding service provided. The service description information characterizes what service the corresponding service server is used to provide, such as a user password login service, a scan login service, and so on.
As a possible implementation manner, the SDK of the monitor program may be integrated into each service server in advance, and the SDK may collect service information of each service server after each service server is started, and report the collected service information to the management server.
S402: and determining the corresponding pre-configured access weight of each business server, and generating and storing service configuration data for each business server based on the service information of each business server and the pre-configured access weight. Wherein the service configuration data includes preconfigured access weights and service information of the respective service servers.
In one embodiment, the service information includes location information, and after the management server performs step S402, the access request received by the reverse proxy server may be counted, the amount of access request of each region in the preset time period is determined according to the counted result, the location information of each service server is extracted from the service configuration data, and the region where each service server is located is determined based on the location information. Further, the preconfigured access weights of the service servers in different areas in the service configuration data can be adjusted according to the access request amounts of the areas in the preset time period.
In the process of adjusting the pre-configured access weights of the service servers in different regions in the service configuration data according to the access request amounts of the regions in the preset time period, the adjustment can be performed based on the principle that the larger the access request amount is, the larger the corresponding access weight is. By way of example, if the access request amount of the Beijing area is higher in the preset time period, the access weight of the service server deployed in Beijing can be adjusted accordingly, the resources can be adjusted dynamically, and the response speed to the access request can be improved.
In one embodiment, after service configuration data for each service server is generated and stored, the operation condition of each service server may also be detected, and if an operation failure of a first service server in each service server is detected, the preconfigured access weight of the first service server is adjusted to zero, so as to obtain a new access weight corresponding to the first service server, where the first service server is any one or more service servers in each service server. Further, a second service server with the same service as the first service server can be determined from the started service servers, the preconfigured access weight of the second service server is adjusted according to a preset adjustment rule, a new access weight corresponding to the second service server is obtained, service configuration data are updated based on the new access weights corresponding to the first service server and the second service server, and the updated service configuration data are issued to the reverse proxy server. So that the reverse proxy server forwards the access request based on the updated service configuration data.
S403: and receiving a service deployment update request from the client, wherein the service deployment update request carries the identification information of the service server.
S404: and determining a target service server matched with the identification information from the started service servers.
S405: and obtaining the pre-configured access weight of the target service server, and adjusting the pre-configured access weight to zero to obtain a new access weight corresponding to the target service server.
S406: and determining other service servers which are deployed with the same service as the target service server from the started service servers, and adjusting the preconfigured access weights of the other servers according to preset adjustment rules to obtain new access weights corresponding to the other service servers.
S407: and generating new service configuration data based on the new access weights corresponding to the target business server and other servers respectively.
S408: and transmitting the new service configuration data to the reverse proxy server, and returning update confirmation indication information aiming at the target service server to the client. For the specific implementation of step S403 to step S408, reference may be made to the description of step S301 to step S306 in the above embodiment, which is not repeated here.
In one embodiment, after the update confirmation indication information for the target service server is returned to the client, if the completion of service update for the target service server deployment is detected, the access weights corresponding to the target service server and the other servers are restored based on the pre-recorded access weights before the update of the target service server and the access weights before the update of the other servers. Further, the new service configuration data may be updated based on the access weights corresponding to the restored target service server and the other servers, and the updated service configuration data may be issued to the reverse proxy server.
Or, since updating the service configuration data based on the restored access weight also requires a certain resource. In order to increase the speed of restoration, the service configuration data before updating may be recorded directly before updating the access weights of the target service server and the other servers, if the completion of service update for the deployment of the target service server is detected, the service configuration data before updating corresponding to the access weights of the target service server and the other servers, which are recorded in advance, is obtained, and the service configuration data before updating is issued to the reverse proxy server, so that the reverse proxy server controls the forwarding amount for forwarding the access request to each service server based on the service configuration data before updating.
In the embodiment of the application, the access weights of the target service server and other service servers providing the same service with the target service server can be updated by adjusting the access weights, and then in the service updating process of the target service server, the reverse proxy server can not issue the access request to the target service server, but can process the access request by the other service servers providing the same service based on the corresponding access weights, thereby being beneficial to ensuring the normal response to the access request in the service updating process. In contrast to conventional service deployment, there is no need to stop some or all of the servers and then go to an update service.
The present embodiment also provides a computer storage medium having stored therein program instructions for implementing the corresponding method described in the above embodiments when executed.
Referring to fig. 5 again, a schematic structural diagram of a service updating apparatus according to an embodiment of the present application is shown.
In one implementation manner of the apparatus in this embodiment of the present application, the apparatus is configured in a management server, where the management server is deployed in a service deployment system, where the service deployment system further includes a reverse proxy server, at least one service server deployed with a service, and a client corresponding to the management server, where the management server is configured to manage service configuration data representing access weights of each service server, and send the service configuration data to the reverse proxy server, where the reverse proxy server is configured to control forwarding amounts for forwarding an access request to each service server based on the service configuration data, where the method includes:
the communication module 50 is configured to receive a service deployment update request from the client, where the service deployment update request carries identification information of a service server;
A processing module 51, configured to determine a target service server that matches the identification information from the started service servers;
the processing module 51 is further configured to obtain a preconfigured access weight of the target service server, adjust the preconfigured access weight to zero, obtain a new access weight corresponding to the target service server, determine, from the started service servers, other service servers with the same service as the target service server, and adjust the preconfigured access weights of the other servers according to a preset adjustment rule, so as to obtain a new access weight corresponding to the other service servers;
the processing module 51 is further configured to generate new service configuration data based on new access weights corresponding to the target service server and the other servers respectively;
the communication module 50 is further configured to issue the new service configuration data to the reverse proxy server, and return update confirmation indication information for the target service server to the client, where the new service configuration data is used to instruct the reverse proxy server to control forwarding amounts of forwarding an access request to the target service server and the other servers based on new access weights corresponding to the target service server and the other servers, and the update confirmation indication information is used to prompt the client to update the service deployed by the target service server corresponding to the user;
And if the new access weight corresponding to the target service server is zero, the forwarding amount corresponding to the target service server is zero.
In one embodiment, the processing module 51 is further configured to restore, if it is detected that the service deployed for the target service server is updated, the access weights corresponding to the target service server and the other servers respectively based on the pre-recorded access weights before the update of the target service server and the pre-update access weights of the other servers; and updating the new service configuration data based on the restored access weights corresponding to the target service server and the other servers, and transmitting the updated service configuration data to the reverse proxy server.
In one embodiment, the processing module 51 is further configured to, if it is detected that the service deployed for the target service server is updated, obtain pre-recorded service configuration data before updating the access weights corresponding to the target service server and the other servers, and send the pre-updated service configuration data to the reverse proxy server through the communication module 50.
In one embodiment, the processing module 51 is further configured to obtain service information of the respective service servers, where the service information includes any one or more of the following: an internetworking protocol, port information, location information and identification information; determining the pre-configured access weight corresponding to each service server; service configuration data for the respective service server is generated and stored based on the service information of the respective service server and the pre-configured access weight.
In one embodiment, the service information includes the location information, and the processing module 51 is further configured to count the access requests received by the reverse proxy server; determining access request quantity of each region in a preset time period according to the statistical result; extracting position information of each business server from the service configuration data; determining the region where each service server is located based on the position information; and adjusting the preconfigured access weights of the business servers in different areas in the service configuration data according to the access request quantity of the areas in the preset time period.
In one embodiment, the processing module 51 is further configured to detect an operation condition of each service server, and if an operation failure of a first service server in each service server is detected, adjust a preconfigured access weight of the first service server to zero to obtain a new access weight corresponding to the first service server, where the first service server is any one or more service servers in each service server; determining a second service server which is deployed with the same service as the first service server from the started service servers, and adjusting the pre-configured access weight of the second service server according to a preset adjustment rule to obtain a new access weight corresponding to the second service server; updating the service configuration data based on the new access weights corresponding to the first service server and the second service server respectively; the updated service configuration data is issued to the reverse proxy server by the communication module 50.
In one embodiment, the size of the access weight corresponding to each service server is in a proportional relationship with the forwarding amount of the reverse proxy server for forwarding the access request to each service server.
In the embodiment of the application, the service updating device can update the access weights of the target service server and other service servers providing the same service with the target service server by adjusting the access weights, and can ensure that the reverse proxy server does not issue the access request to the target service server in the service updating process of the target service server, but can process the access request by the other service servers providing the same service based on the corresponding access weights, thereby being beneficial to ensuring the normal response to the access request in the service updating process. In contrast to conventional service deployment, there is no need to stop some or all of the servers and then go to an update service.
Referring to fig. 6 again, a schematic structural diagram of a management server according to an embodiment of the present application includes a power supply module and other structures, and includes a processor 601, a storage device 602, and a communication interface 603. The processor 601, the storage device 602 and the communication interface 603 may interact data, and the processor 601 implements a corresponding service update function. The management server is deployed in a service deployment system, the service deployment system further comprises a reverse proxy server, at least one service server deployed with a service and a client corresponding to the management server, the management server is used for managing service configuration data representing access weights of all the service servers and sending the service configuration data to the reverse proxy server, and the reverse proxy server is used for controlling forwarding quantity for forwarding the access requests to all the service servers based on the service configuration data.
The storage 602 may include volatile memory (RAM), such as random-access memory (RAM); the storage device 602 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a Solid State Drive (SSD), etc.; the storage 602 may also include a combination of the types of memory described above.
The processor 601 may be a central processing unit 601 (central processing unit, CPU). In one embodiment, the processor 601 may also be a graphics processor 601 (Graphics Processing Unit, GPU). The processor 601 may also be a combination of a CPU and a GPU. In the server, a plurality of CPUs and GPUs can be included as required to perform corresponding service updating. In one embodiment, the storage 602 is configured to store program instructions. The processor 601 may invoke the program instructions to implement the various methods as referred to above in the embodiments of the present application.
In a first possible implementation manner, the processor 601 of the server invokes the program instructions stored in the storage device 602, to receive a service deployment update request from the client through the communication interface 603, where the service deployment update request carries identification information of a service server; determining a target service server matched with the identification information from the started service servers; obtaining a preconfigured access weight of the target service server, and adjusting the preconfigured access weight to zero to obtain a new access weight corresponding to the target service server; determining other service servers which are deployed with the same service as the target service server from the started service servers, and adjusting the preconfigured access weights of the other servers according to preset adjustment rules to obtain new access weights corresponding to the other service servers; generating new service configuration data based on the new access weights corresponding to the target service server and the other servers respectively; the new service configuration data is issued to the reverse proxy server, update confirmation indication information aiming at the target service server is returned to the client, the new service configuration data is used for indicating the reverse proxy server to control forwarding quantity of forwarding an access request to the target service server and the other servers based on new access weights corresponding to the target service server and the other servers respectively, and the update confirmation indication information is used for prompting a user corresponding to the client to update the service deployed by the target service server;
And if the new access weight corresponding to the target service server is zero, the forwarding amount corresponding to the target service server is zero.
In one embodiment, the processor 601 is further configured to restore, if it is detected that the service deployed for the target service server is updated, access weights corresponding to the target service server and the other servers respectively based on the pre-recorded access weights before the update of the target service server and the pre-update access weights of the other servers; and updating the new service configuration data based on the restored access weights corresponding to the target service server and the other servers, and transmitting the updated service configuration data to the reverse proxy server.
In one embodiment, the processor 601 is further configured to, if it is detected that the service update deployed for the target service server is completed, obtain pre-recorded service configuration data before updating the access weights corresponding to the target service server and the other servers, and send the service configuration data before updating to the reverse proxy server through the communication interface 603.
In one embodiment, the processor 601 is further configured to obtain service information of the respective service servers, where the service information includes any one or more of the following: an internetworking protocol, port information, location information and identification information; determining the pre-configured access weight corresponding to each service server; service configuration data for the respective service server is generated and stored based on the service information of the respective service server and the pre-configured access weight.
In one embodiment, the service information includes the location information, and the processor 601 is further configured to count access requests received by the reverse proxy server; determining access request quantity of each region in a preset time period according to the statistical result; extracting position information of each business server from the service configuration data; determining the region where each service server is located based on the position information; and adjusting the preconfigured access weights of the business servers in different areas in the service configuration data according to the access request quantity of the areas in the preset time period.
In an embodiment, the processor 601 is further configured to detect an operation condition of each service server, and if an operation failure of a first service server in each service server is detected, adjust a preconfigured access weight of the first service server to zero to obtain a new access weight corresponding to the first service server, where the first service server is any one or more service servers in each service server; determining a second service server which is deployed with the same service as the first service server from the started service servers, and adjusting the pre-configured access weight of the second service server according to a preset adjustment rule to obtain a new access weight corresponding to the second service server; updating the service configuration data based on the new access weights corresponding to the first service server and the second service server respectively; the updated service configuration data is issued to the reverse proxy server via the communication interface 603.
In one embodiment, the size of the access weight corresponding to each service server is in a proportional relationship with the forwarding amount of the reverse proxy server for forwarding the access request to each service server.
The implementation of the processor 601, the storage device 602, and the communication interface 603 may refer to the description of the related content in the embodiments corresponding to the foregoing drawings.
In the embodiment of the application, the management server can update the access weights of the target service server and other service servers providing the same service with the target service server by adjusting the access weights, and then in the service update process of the target service server, the reverse proxy server can not issue the access request to the target service server, but can process the access request by the other service servers providing the same service based on the corresponding access weights, thereby being beneficial to ensuring the normal response to the access request in the service update process. In contrast to conventional service deployment, there is no need to stop some or all of the servers and then go to an update service.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.
The above disclosure is only a few examples of the present application, and it is not intended to limit the scope of the claims, and those of ordinary skill in the art will understand that all or a portion of the above-described embodiments may be implemented and that equivalent changes may be made in the claims of the present application while still falling within the scope of the present invention.

Claims (8)

1. A service updating method, wherein the method is performed by a management server in a service deployment system, the service deployment system further comprises a reverse proxy server, at least two service servers deployed with services and clients corresponding to the management server, each service corresponds to a plurality of service servers, the management server is used for managing service configuration data representing access weights of the service servers and issuing the service configuration data to the reverse proxy server, and the reverse proxy server is used for controlling forwarding amounts for forwarding access requests to the service servers based on the service configuration data, and the method comprises:
acquiring service information of each service server, wherein the service information comprises position information; the SDK is used for collecting and reporting service information of the service servers after the service servers are started;
Determining the corresponding pre-configured access weight of each business server, and generating and storing service configuration data for each business server based on the service information of each business server and the pre-configured access weight;
counting the access requests received by the reverse proxy server; determining access request quantity of each region in a preset time period according to the statistical result;
extracting position information of each business server from the service configuration data; determining the region where each service server is located based on the position information; according to the access request quantity of each region in the preset time period, the pre-configured access weight of each business server in different regions in the service configuration data is adjusted;
receiving a service deployment update request from the client, wherein the service deployment update request carries identification information of a service server;
determining a target service server matched with the identification information from the started service servers;
obtaining a preconfigured access weight of the target service server, and adjusting the preconfigured access weight to zero to obtain a new access weight corresponding to the target service server;
Determining other service servers which are deployed with the same service as the target service server from the started service servers, and adjusting the preconfigured access weights of the other service servers according to preset adjustment rules to obtain new access weights corresponding to the other service servers; the preset adjustment rule comprises the steps of distributing the preset access weight of the target service server to other service servers providing the same service;
generating new service configuration data based on the new access weights corresponding to the target service server and the other service servers respectively;
the new service configuration data is issued to the reverse proxy server, update confirmation indication information aiming at the target service server is returned to the client, the new service configuration data is used for indicating the reverse proxy server to control forwarding quantity of forwarding an access request to the target service server and the other service servers based on new access weights corresponding to the target service server and the other service servers respectively, and the update confirmation indication information is used for prompting a user corresponding to the client to update the service deployed by the target service server;
And if the new access weight corresponding to the target service server is zero, the forwarding amount corresponding to the target service server is zero.
2. The method of claim 1, wherein after the returning of the update confirm indication information for the target traffic server to the client, the method further comprises:
if the service deployed for the target service server is detected to be updated, restoring the access weights corresponding to the target service server and the other service servers respectively based on the pre-recorded access weights before updating the target service server and the access weights before updating the other service servers;
and updating the new service configuration data based on the restored access weights corresponding to the target service server and the other service servers, and transmitting the updated service configuration data to the reverse proxy server.
3. The method of claim 1, wherein after the returning of the update confirm indication information for the target traffic server to the client, the method further comprises:
if the completion of service updating aiming at the deployment of the target service server is detected, service configuration data before the updating of the access weights corresponding to the target service server and the other service servers are obtained;
And transmitting the service configuration data before updating to the reverse proxy server.
4. The method of claim 1, wherein after said generating and storing service configuration data for said respective traffic server, said method further comprises:
detecting the operation condition of each service server, and if detecting the operation fault of a first service server in each service server, adjusting the preconfigured access weight of the first service server to be zero to obtain a new access weight corresponding to the first service server, wherein the first service server is any one or more service servers in each service server;
determining a second service server which is deployed with the same service as the first service server from the started service servers, and adjusting the pre-configured access weight of the second service server according to a preset adjustment rule to obtain a new access weight corresponding to the second service server;
updating the service configuration data based on the new access weights corresponding to the first service server and the second service server respectively;
and transmitting the updated service configuration data to the reverse proxy server.
5. The method of claim 1, wherein the magnitude of the access weight corresponding to each service server is proportional to the forwarding amount of the access request forwarded to each service server by the reverse proxy server.
6. The service updating device is configured in a management server, the management server is deployed in a service deployment system, the service deployment system further comprises a reverse proxy server, at least two service servers deployed with services and clients corresponding to the management server, each service corresponds to a plurality of service servers, the management server is used for managing service configuration data representing access weights of each service server and transmitting the service configuration data to the reverse proxy server, and the reverse proxy server is used for controlling forwarding quantity for forwarding an access request to each service server based on the service configuration data, and the service updating device comprises:
the processing module is used for acquiring service information of each service server, wherein the service information comprises position information; determining the corresponding pre-configured access weight of each business server, and generating and storing service configuration data for each business server based on the service information of each business server and the pre-configured access weight; the SDK is used for collecting and reporting service information of the service servers after the service servers are started;
The processing module is also used for counting the access requests received by the reverse proxy server; determining access request quantity of each region in a preset time period according to the statistical result; extracting position information of each business server from the service configuration data; determining the region where each service server is located based on the position information; according to the access request quantity of each region in the preset time period, the pre-configured access weight of each business server in different regions in the service configuration data is adjusted;
the communication module is used for receiving a service deployment update request from the client, wherein the service deployment update request carries identification information of a service server;
the processing module is also used for determining a target service server matched with the identification information from the started service servers;
the processing module is further configured to obtain a preconfigured access weight of the target service server, adjust the preconfigured access weight to zero, obtain a new access weight corresponding to the target service server, determine, from the started service servers, other service servers with the same service as the target service server, and adjust the preconfigured access weights of the other service servers according to a preset adjustment rule, so as to obtain a new access weight corresponding to the other service servers; the preset adjustment rule comprises the steps of distributing the preset access weight of the target service server to other service servers providing the same service;
The processing module is further configured to generate new service configuration data based on new access weights corresponding to the target service server and the other service servers respectively;
the communication module is further configured to send the new service configuration data to the reverse proxy server, and return update confirmation indication information for the target service server to the client, where the new service configuration data is used to instruct the reverse proxy server to control forwarding amounts of forwarding an access request to the target service server and the other service servers based on new access weights corresponding to the target service server and the other service servers, and the update confirmation indication information is used to prompt the client to update a service deployed by the target service server corresponding to a user;
and if the new access weight corresponding to the target service server is zero, the forwarding amount corresponding to the target service server is zero.
7. A management server comprising a processor and a storage device, the processor and the storage device being interconnected, wherein the storage device is adapted to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1-5.
8. A computer storage medium having stored therein program instructions which, when executed, are adapted to carry out the method of any one of claims 1-5.
CN202010893499.9A 2020-08-28 2020-08-28 Service updating method and device, management server and storage medium Active CN111913732B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010893499.9A CN111913732B (en) 2020-08-28 2020-08-28 Service updating method and device, management server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010893499.9A CN111913732B (en) 2020-08-28 2020-08-28 Service updating method and device, management server and storage medium

Publications (2)

Publication Number Publication Date
CN111913732A CN111913732A (en) 2020-11-10
CN111913732B true CN111913732B (en) 2023-07-11

Family

ID=73267134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010893499.9A Active CN111913732B (en) 2020-08-28 2020-08-28 Service updating method and device, management server and storage medium

Country Status (1)

Country Link
CN (1) CN111913732B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116955574B (en) * 2023-09-19 2024-01-05 图林科技(深圳)有限公司 Intelligent customer service robot based on artificial intelligence and application method thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018107943A1 (en) * 2016-12-13 2018-06-21 腾讯科技(深圳)有限公司 Network access control method, apparatus and system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108268271A (en) * 2016-12-29 2018-07-10 华为技术服务有限公司 The upgrade method and update device of micro services
CN108494876A (en) * 2018-04-12 2018-09-04 北京达佳互联信息技术有限公司 Realize method, apparatus, plug-in component equipment and the proxy server of service gray scale publication
CN109391512B (en) * 2018-09-28 2021-08-27 创新先进技术有限公司 Service publishing method and device and electronic equipment
CN109743392A (en) * 2019-01-07 2019-05-10 北京字节跳动网络技术有限公司 A kind of load-balancing method, device, electronic equipment and storage medium
CN109951566A (en) * 2019-04-02 2019-06-28 深圳市中博科创信息技术有限公司 A kind of Nginx load-balancing method, device, equipment and readable storage medium storing program for executing
CN110311820A (en) * 2019-07-05 2019-10-08 山东云缦智能科技有限公司 A kind of micro services cluster upgrade method of continual service
CN111556135A (en) * 2020-04-26 2020-08-18 北京奇艺世纪科技有限公司 Request scheduling method, system and device and electronic equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018107943A1 (en) * 2016-12-13 2018-06-21 腾讯科技(深圳)有限公司 Network access control method, apparatus and system

Also Published As

Publication number Publication date
CN111913732A (en) 2020-11-10

Similar Documents

Publication Publication Date Title
CN106899680B (en) The fragment treating method and apparatus of multi-tiling chain
US8539068B2 (en) Methods and systems for providing customized domain messages
CN104781802B (en) User Defined Resource in resource stack
US7886295B2 (en) Connection manager, method, system and program product for centrally managing computer applications
CN101535978B (en) Message forwarding backup manager in a distributed server system
US9466036B1 (en) Automated reconfiguration of shared network resources
US8918761B1 (en) Elastic application framework for deploying software
CN112256495A (en) Data transmission method and device, computer equipment and storage medium
US8821296B1 (en) Network gaming system and casino management system link
CN109510878B (en) Long connection session keeping method and device
JP2005149387A (en) Real time web sharing system
CN108933829A (en) A kind of load-balancing method and device
CN113765980A (en) Current limiting method, device, system, server and storage medium
CN101202716A (en) Method for storing information and communication system and related devices
CN108319550A (en) A kind of test system and test method
CN109561054A (en) A kind of data transmission method, controller and access device
CN103166980A (en) Internet data pulling method and system
US8930532B2 (en) Session management in a thin client system for effective use of the client environment
CN111913732B (en) Service updating method and device, management server and storage medium
CN104902033B (en) Log in address recording method and device
CN112882895B (en) Health check method, device, computer system and readable storage medium
US20080133756A1 (en) Explicit casualty control in a client/server system
US20170223136A1 (en) Any Web Page Reporting and Capture
EP3298736B1 (en) Forwarding current request based on, at least in part, previous request(s)
US11838193B1 (en) Real-time load limit measurement for a plurality of nodes

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210129

Address after: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant after: Shenzhen saiante Technology Service Co.,Ltd.

Address before: 1-34 / F, Qianhai free trade building, 3048 Xinghai Avenue, Mawan, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong 518000

Applicant before: Ping An International Smart City Technology Co.,Ltd.

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant