Movatterモバイル変換


[0]ホーム

URL:


CN111913732A - 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
CN111913732A
CN111913732ACN202010893499.9ACN202010893499ACN111913732ACN 111913732 ACN111913732 ACN 111913732ACN 202010893499 ACN202010893499 ACN 202010893499ACN 111913732 ACN111913732 ACN 111913732A
Authority
CN
China
Prior art keywords
service
server
service server
servers
access
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.)
Granted
Application number
CN202010893499.9A
Other languages
Chinese (zh)
Other versions
CN111913732B (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
Ping An International Smart City Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An International Smart City Technology Co LtdfiledCriticalPing An International Smart City Technology Co Ltd
Priority to CN202010893499.9ApriorityCriticalpatent/CN111913732B/en
Publication of CN111913732ApublicationCriticalpatent/CN111913732A/en
Application grantedgrantedCritical
Publication of CN111913732BpublicationCriticalpatent/CN111913732B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The embodiment of the application discloses a service updating method, a service updating 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 have the same service as the target service server and are deployed in the started service server, and adjusting the pre-configured access weights of the other servers according to a preset adjustment rule; and generating new service configuration data based on the new access weights corresponding to the target service server and other servers, sending 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 method is favorable for ensuring 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 application relates to the field of computer technologies, and in particular, to a service update method and apparatus, a management server, and a storage medium.
Background
In a distributed environment, for various reasons such as load and disaster tolerance, almost all services need to deploy multiple instances, referred to as service deployment, on multiple business servers. At present, in the conventional service deployment, all service servers are usually required to be stopped, then the service is updated, the received access request cannot be responded in the updating process, and a new access request cannot come, so that the normal response to the access request is seriously influenced.
Disclosure of Invention
The embodiment of the application provides a service updating method, a service updating device, a management server and a storage medium, in the service updating process of a target service server, all service servers do not need to be stopped, the access weights of the target service server and other service servers which provide the same service with the target service server are updated in a mode of adjusting the access weights, so that a reverse proxy server can not issue an access request to the target service server, but can deliver the access request to other service servers which provide the same service for processing based on the corresponding access weights, and the normal response to the access request in the service updating process is favorably ensured.
In one aspect, an embodiment of the present application provides a service updating method, which 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 representing an access weight of each service server, and issue the service configuration data to the reverse proxy server, and the reverse proxy server is configured to control, based on the service configuration data, a forwarding amount for forwarding an access request to each service server, where the method includes:
receiving a service deployment updating request from the client, wherein the service deployment updating request carries identification information of a service server;
determining a target service server matched with the identification information from the started service servers;
acquiring a 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;
determining other service servers which have the same service as the target service server and are deployed in the started service servers, and adjusting the pre-configured access weights of the other servers according to a preset adjustment rule 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;
sending the new service configuration data to the reverse proxy server, and returning update confirmation indication information for the target service server to the client, where the new service configuration data is used to indicate that the reverse proxy server controls forwarding amounts of access requests 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 a user corresponding to the client to update a 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 another aspect, an embodiment of the present application provides a service updating apparatus, where the apparatus is configured in a management server, the management server is deployed in a service deployment system, 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, the management server is configured to manage service configuration data representing an access weight of each service server, and issue the service configuration data to the reverse proxy server, and the reverse proxy server is configured to control, based on the service configuration data, a forwarding amount for forwarding an access request to each service server, where the apparatus includes:
the communication module is used for receiving a service deployment updating request from the client, wherein the service deployment updating 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, from the started service servers, other service servers with the same service as the target service server, and adjust the preconfigured access weight 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 is further configured to generate new service configuration data based on the new access weights corresponding to the target service server and the other 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 indicate that the reverse proxy server controls forwarding amounts of an access request to be forwarded 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 a user corresponding to the client to update a 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 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 used to store a computer program that supports a terminal to execute the foregoing method, the computer program includes program instructions, and the processor is configured to call the program instructions, and perform the following steps:
receiving a service deployment updating request from the client, wherein the service deployment updating request carries identification information of a service server;
determining a target service server matched with the identification information from the started service servers;
acquiring a 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;
determining other service servers which have the same service as the target service server and are deployed in the started service servers, and adjusting the pre-configured access weights of the other servers according to a preset adjustment rule 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;
sending the new service configuration data to the reverse proxy server, and returning update confirmation indication information for the target service server to the client, where the new service configuration data is used to indicate that the reverse proxy server controls forwarding amounts of access requests 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 a user corresponding to the client to update a 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 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 in a mode of adjusting the access weights, and subsequently, 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 deliver the access request to other service servers providing the same service to process the access request based on the corresponding access weights, so that the normal response to the access request in the service updating process can be ensured. Compared with the traditional service deployment, the method has the advantages that part or all of the servers do not need to be stopped, and then the services are updated.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of an operating scenario of a reverse proxy server according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a system with service deployment according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a service update method according to an embodiment of the present application;
FIG. 4 is a flow chart illustrating another service update method according to an embodiment of the present application;
FIG. 5 is a schematic structural diagram of a service renewal 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
The Nginx (engine x) is a high-performance HTTP and reverse proxy web server, and can be used as an HTTP server to perform website publishing processing, and can be used as a reverse proxy to perform load balancing. In the embodiment of the present application, mainly, the negative proxy server is Nginx. Regarding the way of dealing with reverse proxy, taking a certain X website as an example, the number of visitors who are connected to the website at the same time every day is already exploded, and a single server is far from meeting the increasing purchasing desire of people, and at this time, a well-understood term appears: distributed deployment; namely, the problem of limitation of the number of visitors is solved by deploying a plurality of servers.
Most functions in an X website are also implemented by directly using a reverse proxy by using a Nginx, and a specific deployment manner may be as shown in fig. 1. As can be seen from fig. 1, the reverse proxy process performed by Nginx is as follows: after receiving the request sent by the plurality of clients to the Nginx server, the Nginx server distributes the request to the service processing server at the back end according to a certain rule for processing. At this time, the source of the request, that is, the user terminal, is clear, but it is not clear which server the request is specifically processed by, the role played by nginn is 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 the visitor accesses the proxy. As the user terminal does not need any configuration to be accessible. Wherein, the reverse proxy has the following functions: the safety of the intranet is guaranteed, the reverse proxy is generally used as a public network access address, and the Web server is the intranet. And load balancing, namely optimizing the load of the website through a reverse proxy server.
Taking Nginx as a reverse proxy server, please refer to fig. 2, an embodiment of the present application provides a service deployment system, which includes amanagement server 20, aclient 21 corresponding to the management server, areverse proxy server 22, at least oneservice server 23, and at least oneuser terminal 24. Eachservice server 23 may deploy one or more services, themanagement server 20 is configured to manage service configuration data representing access weights of the service servers, and send the service configuration data to thereverse proxy server 22, and thereverse proxy server 22 is configured to control forwarding amounts for forwarding access requests from theuser terminal 24 to the 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, login services, payment services, and the like provided for a user, and each service may correspond to a plurality of business servers. Taking the login service as an example, the service server 1 corresponding to the service may be used to provide a username-password login service, and the service server 2 corresponding to the service may be used to provide a code scanning login service.
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 the service servers, and issue the service configuration data to the reverse proxy server, and 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. 3, the method of the embodiment of the present application includes the following steps.
S301: and receiving a service deployment updating request from the client, wherein the service deployment updating request carries the identification information of the service server. The identification information of the service server may refer to a number for uniquely identifying the service server, and the like.
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 a service deployment update operation may be input for the target service server (for example, after the target service server is selected, a service update button of a currently displayed page is clicked and pressed). After detecting the operation of the 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 a started service server based on the operation state. Further, the target service server corresponding to the identification information can be queried from the started service server through the identification information.
S303: and acquiring a 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 an embodiment, a service configuration page may be displayed through a client in advance, a user may configure an access weight (that is, a preconfigured 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 of 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 size of the access weight corresponding to each service server is in a direct proportion to the forwarding amount of the reverse proxy server forwarding the access request to each service server. It can be understood that, the higher the access weight of any service server is, the greater the number of access requests that characterize the reverse proxy server to forward to the any service server is, that is, the greater 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 the access requests forwarded to any service server by the reverse proxy server is represented to be 0, that is, the corresponding forwarding amount is 0.
S304: and determining other service servers which have the same service as the target service server and are deployed in the started service servers, and adjusting the pre-configured access weights of the other servers according to a preset adjustment rule to obtain new access weights corresponding to the other service servers.
The services 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. Exemplarily, it is assumed 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, where the service server 1 and the service server 2 are both configured to provide a login service, and the service server 3, the service server 4, and the service server 5 are all configured to provide a payment service. Then, when the target service server is the service server 3, the service server 4 and the service server 5 may be determined as other service servers having the same service as that deployed by the service server 3.
The preset adjustment rule is that, for example, the service provided by the target service server is a login service, the provided login service further includes a service server 1 and a service server 2, and the preconfigured access weights of the target service server, the service server 1 and the service server 3 are 0.4, 0.2 and 0.4, respectively, so that the preset adjustment rule may be that the preconfigured access weights of the target service server are averagely allocated to other servers providing the same service. In this case, after the access weight corresponding to the target service server is modified 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 service server and other servers respectively.
In an embodiment, service configuration data before updating of the access weight corresponding to the current target service server and the other servers may be obtained (for example, the service configuration data obtained by configuring the access weight of each service server through the service configuration page). Further, the access weight parts corresponding to the target service server and other servers in the service configuration data can be updated through the new access weights corresponding to the target service server and other servers, so that new service configuration data can be obtained.
S306: and sending the new service configuration data to the reverse proxy server, and returning the 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 of the access request to the target service server and other servers based on the new access weight corresponding to the target service server and other servers respectively. 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.
And the update confirmation indication information is used for prompting the client to update the service deployed by the target service server corresponding to the user. That is, when the user corresponding to the client checks the update confirmation indication information through the client, it can be known 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 deliver the access request to other servers providing the same service for processing based on the corresponding access weight. Compared with the traditional service deployment, the method has the advantages that part or all of the servers do not need to be stopped, and then the services are updated.
In the embodiment of the application, the access weights of the target service server and other service servers providing the same service as the target service server can be updated by adjusting the access weights, and subsequently, 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 deliver the access request to other service servers providing the same service to process the access request based on the corresponding access weights, so that the normal response to the access request in the service updating process is ensured. Compared with the traditional service deployment, the method has the advantages that part or all of the servers do not need to be stopped, and then the services are updated.
Referring to fig. 4, the present application provides another service updating method, 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 representing access weights of the service servers, and send the service configuration data to the reverse proxy server, and the reverse proxy server is configured to control forwarding amounts of 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 for providing, such as user password login service, code scanning login service, and the like.
As a feasible implementation manner, the SDK of the monitoring 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 a pre-configured access weight corresponding to each business server, and generating and storing service configuration data aiming at each business server based on the service information and the pre-configured access weight of each business server. Wherein the service configuration data comprises 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 management server may further perform statistics on access requests received by the reverse proxy server, determine an access request amount of each region within a preset time period according to a statistical result, extract location information of each service server from the service configuration data, and determine a region where each service server is located based on the location information. Further, the preconfigured access weights of the service servers in different regions in the service configuration data can be adjusted according to the access request amount of each region in a preset time period.
In the above process of adjusting the preconfigured access weights of the service servers in different regions in the service configuration data according to the access request amount of each region in the preset time period, the adjustment may be performed based on a principle that the larger the access request amount is, the larger the corresponding access weight is. Exemplarily, assuming that the access request volume in the beijing area is relatively high within a preset time period, the access weight of the service server deployed in beijing may be correspondingly adjusted, the resources may be dynamically adjusted, and the response speed to the access request may be improved.
In an embodiment, after the 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 deployed may 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, the service configuration data is updated based on the new access weights corresponding to the first service server and the second service server, and the updated service configuration data is sent to the reverse proxy server. So that the reverse proxy server can forward the access request based on the updated service configuration data.
S403: and receiving a service deployment updating request from the client, wherein the service deployment updating 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 acquiring a 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 have the same service as the target service server and are deployed in the started service servers, and adjusting the pre-configured access weights of the other servers according to a preset adjustment rule 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 service server and other servers respectively.
S408: and sending the new service configuration data to the reverse proxy server, and returning the update confirmation indication information aiming at the target service server to the client. For specific implementation of steps S403 to S408, refer to the description related to steps S301 to S306 in the foregoing embodiment, and details are not repeated here.
In an embodiment, after the update confirmation indication information for the target service server is returned to the client, 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 are restored based on the pre-recorded access weight before the target service server is updated and the pre-updated access weight of the other servers. Further, the new service configuration data may be updated based on the respective access weights corresponding to the restored target service server and other servers, and the updated service configuration data may be sent to the reverse proxy server.
Or, updating the service configuration data based on the restored access weight also requires occupying a certain resource. In order to improve the speed of restoration, the service configuration data before updating can be recorded directly before updating the access weights of the target service server and the other servers, if the completion of service updating deployed for the target service server is detected, the service configuration data before updating of the access weights corresponding to the target service server and the other servers which are recorded in advance are 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 of 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 as the target service server can be updated by adjusting the access weights, and subsequently, 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 deliver the access request to other service servers providing the same service to process the access request based on the corresponding access weights, so that the normal response to the access request in the service updating process is ensured. Compared with the traditional service deployment, the method has the advantages that part or all of the servers do not need to be stopped, and then the services are updated.
The embodiment of the present application further provides a computer storage medium, in which program instructions are stored, and when the program instructions are executed, the computer storage medium is used for implementing the corresponding method described in the above embodiment.
Fig. 5 is a schematic structural diagram of a service update apparatus according to an embodiment of the present application.
In an implementation manner of the apparatus in the embodiment of the present application, the apparatus is configured in a management server, the management server is deployed in a service deployment system, 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, the management server is configured to manage service configuration data representing an access weight of each service server, and issue the service configuration data to the reverse proxy server, and the reverse proxy server is configured to control, based on the service configuration data, a forwarding amount for forwarding an access request to each service server, including:
acommunication module 50, configured to receive a service deployment update request from the client, where the service deployment update request carries identification information of a service server;
aprocessing module 51, configured to determine, from the started service servers, a target service server that matches the identification information;
theprocessing module 51 is further configured to obtain a preconfigured access weight of the target service server, adjust the preconfigured access weight to zero to obtain a new access weight corresponding to the target service server, determine, from the started service servers, other service servers deployed with the same service as the target service server, and adjust the preconfigured access weight of the other servers according to a preset adjustment rule to obtain a new access weight corresponding to the other service servers;
theprocessing 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;
thecommunication module 50 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 indicate that the reverse proxy server controls 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 a user corresponding to the client to update a 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 an embodiment, theprocessing module 51 is further configured to, if it is detected that the service deployed for the target service server is updated, restore the access weights corresponding to the target service server and the other servers based on the pre-recorded access weight before the target service server is updated and the pre-recorded access weight before the other servers are updated; and updating the new service configuration data based on the restored access weights corresponding to the target service server and the other servers respectively, and sending the updated service configuration data to the reverse proxy server.
In an embodiment, theprocessing 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 of 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 thecommunication module 50.
In an embodiment, theprocessing module 51 is further configured to obtain service information of each service server, where the service information includes any one or more of the following: an internetworking protocol, port information, location information and identification information; determining a pre-configured access weight corresponding to each service server; and generating and storing service configuration data aiming at each service server based on the service information of each service server and the pre-configured access weight.
In an embodiment, the service information includes the location information, and theprocessing module 51 is further configured to count the access requests received by the reverse proxy server; determining the access request quantity of each region in a preset time period according to the statistical result; extracting the 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 pre-configured access weight of each service server in different areas in the service configuration data according to the access request quantity of each area in the preset time period.
In an embodiment, theprocessing module 51 is further configured to detect an operation condition of each service server, and if it is detected that a first service server in each service server has an operation failure, 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 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 weight corresponding to each of the first service server and the second service server; the updated service configuration data is sent to the reverse proxy server through thecommunication module 50.
In one embodiment, the size of the access weight corresponding to each service server is in a direct proportion to the forwarding amount of the reverse proxy server 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 which provide the same service with the target service server by adjusting the access weights, and subsequently 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 deliver the access request to other service servers which provide the same service for processing based on the corresponding access weights, so that the normal response to the access request in the service updating process can be ensured. Compared with the traditional service deployment, the method has the advantages that part or all of the servers do not need to be stopped, and then the services are updated.
Referring to fig. 6 again, it is a schematic structural diagram of a management server according to an embodiment of the present application, where the management server according to the embodiment of the present application includes a power supply module and the like, and includes aprocessor 601, astorage device 602, and acommunication interface 603. Theprocessor 601, thestorage device 602 and thecommunication interface 603 may exchange data with each other, and theprocessor 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 with services deployed and a client corresponding to the management server, the management server is used for managing service configuration data representing access weights of the service servers and sending the service configuration data to the reverse proxy server, and the reverse proxy server is used for controlling forwarding amount of access requests forwarded to the service servers based on the service configuration data.
Thestorage device 602 may include a volatile memory (volatile memory), such as a random-access memory (RAM); thestorage 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 means 602 may also comprise a combination of memories of the kind described above.
Theprocessor 601 may be a Central Processing Unit (CPU) 601. In one embodiment, theprocessor 601 may also be a Graphics Processing Unit (GPU) 601. Theprocessor 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 needed to perform corresponding service updating. In one embodiment, thestorage device 602 is used to store program instructions. Theprocessor 601 may invoke the program instructions to implement the various methods as described above in the embodiments of the present application.
In a first possible implementation manner, the processor 601 of the server calls a program instruction stored in the storage device 602, and is configured to receive a service deployment update request from the client through a 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; acquiring a 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; determining other service servers which have the same service as the target service server and are deployed in the started service servers, and adjusting the pre-configured access weights of the other servers according to a preset adjustment rule 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; sending the new service configuration data to the reverse proxy server, and returning update confirmation indication information for the target service server to the client, where the new service configuration data is used to indicate that the reverse proxy server controls forwarding amounts of access requests 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 a user corresponding to the client to update a 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 an embodiment, theprocessor 601 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 based on the pre-recorded access weight before the target service server is updated and the pre-updated access weight before the other servers are updated; and updating the new service configuration data based on the restored access weights corresponding to the target service server and the other servers respectively, and sending the updated service configuration data to the reverse proxy server.
In an embodiment, theprocessor 601 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 of 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 thecommunication interface 603.
In an embodiment, theprocessor 601 is further configured to obtain service information of each service server, where the service information includes any one or more of the following: an internetworking protocol, port information, location information and identification information; determining a pre-configured access weight corresponding to each service server; and generating and storing service configuration data aiming at each service server based on the service information of each service server and the pre-configured access weight.
In one embodiment, the service information includes the location information, and theprocessor 601 is further configured to count access requests received by the reverse proxy server; determining the access request quantity of each region in a preset time period according to the statistical result; extracting the 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 pre-configured access weight of each service server in different areas in the service configuration data according to the access request quantity of each area in the preset time period.
In an embodiment, theprocessor 601 is further configured to detect an operation condition of each service server, and if it is detected that a first service server in each service server has an operation failure, 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 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 weight corresponding to each of the first service server and the second service server; the updated service configuration data is sent to the reverse proxy server through thecommunication interface 603.
In one embodiment, the size of the access weight corresponding to each service server is in a direct proportion to the forwarding amount of the reverse proxy server forwarding the access request to each service server.
Theprocessor 601, thestorage device 602 and thecommunication interface 603 can be implemented as described in the embodiments corresponding to the previous figures.
In the embodiment of the application, the management server can update the access weights of the target service server and other service servers which provide the same service with the target service server by adjusting the access weights, and subsequently, 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 deliver the access request to other service servers which provide the same service for processing based on the corresponding access weights, so that the normal response to the access request in the service updating process is ensured. Compared with the traditional service deployment, the method has the advantages that part or all of the servers do not need to be stopped, and then the services are updated.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes 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 (RAM), or the like.
While the invention has been described with reference to a number of embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

CN202010893499.9A2020-08-282020-08-28Service updating method and device, management server and storage mediumActiveCN111913732B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202010893499.9ACN111913732B (en)2020-08-282020-08-28Service updating method and device, management server and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202010893499.9ACN111913732B (en)2020-08-282020-08-28Service updating method and device, management server and storage medium

Publications (2)

Publication NumberPublication Date
CN111913732Atrue CN111913732A (en)2020-11-10
CN111913732B CN111913732B (en)2023-07-11

Family

ID=73267134

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202010893499.9AActiveCN111913732B (en)2020-08-282020-08-28Service updating method and device, management server and storage medium

Country Status (1)

CountryLink
CN (1)CN111913732B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN116955574A (en)*2023-09-192023-10-27图林科技(深圳)有限公司Intelligent customer service robot based on artificial intelligence and application method thereof

Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2018107943A1 (en)*2016-12-132018-06-21腾讯科技(深圳)有限公司Network access control method, apparatus and system
CN108268271A (en)*2016-12-292018-07-10华为技术服务有限公司The upgrade method and update device of micro services
CN108494876A (en)*2018-04-122018-09-04北京达佳互联信息技术有限公司Realize method, apparatus, plug-in component equipment and the proxy server of service gray scale publication
CN109391512A (en)*2018-09-282019-02-26阿里巴巴集团控股有限公司A kind of service issuing method, device and electronic equipment
CN109743392A (en)*2019-01-072019-05-10北京字节跳动网络技术有限公司A kind of load-balancing method, device, electronic equipment and storage medium
CN109951566A (en)*2019-04-022019-06-28深圳市中博科创信息技术有限公司A kind of Nginx load-balancing method, device, equipment and readable storage medium storing program for executing
CN110311820A (en)*2019-07-052019-10-08山东云缦智能科技有限公司A kind of micro services cluster upgrade method of continual service
CN111556135A (en)*2020-04-262020-08-18北京奇艺世纪科技有限公司Request scheduling method, system and device and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2018107943A1 (en)*2016-12-132018-06-21腾讯科技(深圳)有限公司Network access control method, apparatus and system
CN108268271A (en)*2016-12-292018-07-10华为技术服务有限公司The upgrade method and update device of micro services
CN108494876A (en)*2018-04-122018-09-04北京达佳互联信息技术有限公司Realize method, apparatus, plug-in component equipment and the proxy server of service gray scale publication
CN109391512A (en)*2018-09-282019-02-26阿里巴巴集团控股有限公司A kind of service issuing method, device and electronic equipment
CN109743392A (en)*2019-01-072019-05-10北京字节跳动网络技术有限公司A kind of load-balancing method, device, electronic equipment and storage medium
CN109951566A (en)*2019-04-022019-06-28深圳市中博科创信息技术有限公司A kind of Nginx load-balancing method, device, equipment and readable storage medium storing program for executing
CN110311820A (en)*2019-07-052019-10-08山东云缦智能科技有限公司A kind of micro services cluster upgrade method of continual service
CN111556135A (en)*2020-04-262020-08-18北京奇艺世纪科技有限公司Request scheduling method, system and device and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN116955574A (en)*2023-09-192023-10-27图林科技(深圳)有限公司Intelligent customer service robot based on artificial intelligence and application method thereof
CN116955574B (en)*2023-09-192024-01-05图林科技(深圳)有限公司 An intelligent customer service robot based on artificial intelligence and its application method

Also Published As

Publication numberPublication date
CN111913732B (en)2023-07-11

Similar Documents

PublicationPublication DateTitle
CN108776934B (en)Distributed data calculation method and device, computer equipment and readable storage medium
CN111614736A (en)Network content resource scheduling method, domain name scheduling server and electronic equipment
EP3128420A1 (en)Service flow control method, controller and system in object-based storage system
CN110557284B (en)Data aggregation method and device based on client gateway
EP3489825A1 (en)Method, apparatus and computer readable storage medium for processing service
CN108833521A (en)Message pushing method, device, system, computer equipment and storage medium
JP4205323B2 (en) Distribution system, distribution server and distribution method, distribution program
CN108933829A (en)A kind of load-balancing method and device
CN109510878B (en)Long connection session keeping method and device
CN110324184B (en) Service expansion and migration method, apparatus, system, device and readable storage medium
CN114024972A (en)Long connection communication method, system, device, equipment and storage medium
CN112260933A (en)Communication method, communication device, electronic equipment and medium
CN110413918B (en)Data transmission method, device, equipment and storage medium
CN110247812A (en)A kind of more cluster management methods, device, system and associated component
CN109561054A (en)A kind of data transmission method, controller and access device
CN115442373A (en)Data processing method, device, equipment and storage medium
CN115344534A (en)File downloading method and device, computer equipment and storage medium
CN115250233B (en)Gray scale routing control method, gray scale routing assembly and computer equipment
CN111913732A (en)Service updating method and device, management server and storage medium
US20030126244A1 (en)Apparatus for scheduled service of network requests and a method therefor
US20170223136A1 (en)Any Web Page Reporting and Capture
CN113518013A (en)Processing method and device for realizing heartbeat mechanism
CN116703071A (en)Resource sharing method, device and equipment and storage medium
CN115695288A (en)Login control method and device, electronic equipment and storage medium
CN112433891B (en) Data processing method, device and server

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
TA01Transfer of patent application right
TA01Transfer 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.

SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp