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
CN111913732A CN202010893499.9A CN202010893499A CN111913732A CN 111913732 A CN111913732 A CN 111913732A CN 202010893499 A CN202010893499 A CN 202010893499A CN 111913732 A CN111913732 A CN 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 Ltd filed Critical Ping An International Smart City Technology 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, 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 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. Each service server 23 may deploy one or more services, the management server 20 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 22, and the reverse proxy server 22 is configured to control forwarding amounts for forwarding access requests from the user 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:
a communication 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;
a processing module 51, configured to determine, from the started service servers, a target service server that matches the identification information;
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 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;
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 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, the processing 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, 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 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 the communication module 50.
In an embodiment, the processing 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 the processing 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, the processing 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 the communication 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 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 exchange data with each other, 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 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.
The storage device 602 may include a volatile memory (volatile memory), such as a 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 means 602 may also comprise a combination of memories of the kind described above.
The processor 601 may be a Central Processing Unit (CPU) 601. In one embodiment, the processor 601 may also be a Graphics Processing Unit (GPU) 601. 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 needed to perform corresponding service updating. In one embodiment, the storage device 602 is used to store program instructions. The processor 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, the processor 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, the processor 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 the communication interface 603.
In an embodiment, the processor 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 the processor 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, the processor 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 the communication 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.
The processor 601, the storage device 602 and the communication 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)

1. A service updating method is characterized in that the method is executed by a management server in a service deployment system, the service deployment system further comprises a reverse proxy server, at least one service server deployed with services 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 to the service servers based on the service configuration data, and the method comprises 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.
2. The method of claim 1, wherein after returning the update confirmation indication information for the target service server to the client, the method further comprises:
if the completion of the service updating deployed for the target service server is detected, restoring 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.
3. The method of claim 1, wherein after returning the update confirmation indication information for the target service server to the client, the method further comprises:
if the completion of the service update deployed for the target service server is detected, acquiring pre-recorded service configuration data before the update of the access weights corresponding to the target service server and the other servers;
and sending the service configuration data before updating to the reverse proxy server.
4. The method of claim 1, wherein prior to receiving the service deployment update request from the client, the method further comprises:
acquiring service information of each service server, wherein the service information comprises 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.
5. The method of claim 4, wherein the service information comprises the location information, and wherein after generating and storing the service configuration data for the respective service servers, the method further comprises:
counting 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.
6. The method of claim 4, wherein after generating and storing the service configuration data for the respective traffic server, the method further comprises:
detecting the operation condition of each service server, and if detecting that a first service server in each service server has an operation fault, adjusting the preconfigured access weight of the first service server to 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 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;
and sending the updated service configuration data to the reverse proxy server.
7. The method according to claim 1, wherein the access weight corresponding to each service server is proportional to the forwarding amount of the reverse proxy server forwarding the access request to each service server.
8. A service updating device 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 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, and the service updating device 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.
9. A management server, characterized in that the management server comprises a processor and a storage device, the processor and the storage device being connected to each other, wherein the storage device is configured to store a computer program, the computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method according to any one of claims 1 to 7.
10. A computer storage medium having stored thereon program instructions for implementing a method according to any one of claims 1 to 7 when executed.
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 true CN111913732A (en) 2020-11-10
CN111913732B 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)

Cited By (1)

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

Citations (8)

* 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
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
CN109391512A (en) * 2018-09-28 2019-02-26 阿里巴巴集团控股有限公司 A kind of service issuing method, 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 (8)

* 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
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
CN109391512A (en) * 2018-09-28 2019-02-26 阿里巴巴集团控股有限公司 A kind of service issuing method, 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

Cited By (2)

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

Also Published As

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

Similar Documents

Publication Publication Date Title
EP3128420B1 (en) Service flow control method, controller and system in object-based storage system
EP3799392A1 (en) Method for obtaining service data and converged cdn system
CN111614736A (en) Network content resource scheduling method, domain name scheduling server and electronic equipment
CN108933829A (en) A kind of load-balancing method and device
CN109510878B (en) Long connection session keeping method and device
JP4205323B2 (en) Distribution system, distribution server and distribution method, distribution program
CN110557284A (en) data aggregation method and device based on client gateway
CN111641563B (en) Flow self-adaption method and system based on distributed scene
CN114024972B (en) Long connection communication method, system, device, equipment and storage medium
CN112615793A (en) Data current limiting method and device
CN109561054A (en) A kind of data transmission method, controller and access device
CN110247812A (en) A kind of more cluster management methods, device, system and associated component
CN104639546A (en) Multi-biometric feature comprehensive authentication method, device and system
CN110413918B (en) Data transmission method, device, equipment and storage medium
CN111913732A (en) Service updating method and device, management server and storage medium
CN112260933B (en) Communication method, communication device, electronic equipment and medium
CN113518013B (en) Processing method and device for realizing heartbeat mechanism
CN113177179A (en) Data request connection management method, device, equipment and storage medium
US20170223136A1 (en) Any Web Page Reporting and Capture
CN104731660A (en) Data distribution method, device and system
CN115250233B (en) Gray scale routing control method, gray scale routing assembly and computer equipment
CN116703071A (en) Resource sharing method, device and equipment and storage medium
CN114553786B (en) Network request fusing method and device, computer equipment and storage medium
CN115658745A (en) Data processing method, data processing device, computer equipment and computer readable storage medium
CN107203915B (en) Data storage method and device

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