A platform management system and method based on microservice architecture
By analyzing user access history, determining the expected communication traffic and available time of microservices, reserving communication interface resources, and forwarding data when API interface is congested, solving the problem of performance bottleneck in microservice architecture under high concurrency , improves the system's processing power and user experience.
Patent Information
- Application Number
- CN202411179077.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-08-27
AI Technical Summary
Under high concurrent traffic, microservice architectures are prone to performance bottlenecks and delays due to busy interfaces or insufficient resources, and the resource utilization value of communication ports is not high, affecting processing capabilities.
By analyzing user access history, determining the expected communication traffic and available communication time of each micro server, reserving communication interface resources is realized, and forwarding the call data from the ports of other micro servers to the target micro server when the API interface is congested. Extend the API interface traffic limit.
Improves the system's processing capability and user experience under high concurrent traffic, reduces interface response time, avoids performance bottlenecks and delays, and improves overall performance.
Smart Images

Figure CN118694811B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of platform management of microservice architecture, and in particular to a platform management system and method based on microservice architecture. Background Art
[0002] Microservice architecture is a software architecture pattern that splits an application into multiple small, independent service units. Each unit is responsible for implementing specific business functions. Microservices communicate with each other through lightweight communication mechanisms and can be deployed, expanded, and updated independently. There are also a fixed number of API interfaces in the microservice, which are responsible for receiving service call requests and returning processed data.
[0003] Since the application platform faces different users, the access traffic of each microserver varies greatly. When the access interface of some microservers is congested with traffic, in order to ensure the processing capacity of the server, it is necessary to rely on the circuit breaker mechanism to interrupt the service, thereby freeing up time to expand the microservices. This limits the processing capacity of the microservice architecture to some extent.
[0004] In addition, there are many ports in the microserver for communicating with other microservers. Due to the lightweight communication of the microservice architecture, the communication resource utilization value of these ports is not high, so most of them are not used. However, for some platforms with a large number of microservers, the communication resources of these interfaces can undertake certain communication tasks when the server is congested, and effective management methods are needed to allocate resources. Summary of the invention
[0005] In view of this, the present invention provides a platform management system and method based on a microservice architecture, which can accelerate the request processing speed, reduce the interface response time, and at the same time avoid performance bottlenecks and delays caused by busy interfaces or insufficient resources, improve the performance when processing high concurrent traffic, and improve the user experience.
[0006] According to one aspect of the present invention, an embodiment of the present invention provides a platform management method based on a microservice architecture, the method comprising:
[0007] Obtain historical service requests of users for accessing the platform, and determine access call sequences of the historical service requests to at least one micro-server;
[0008] Determining historical access parameters of the user accessing each of the micro servers based on the access call sequence;
[0009] Determine the expected communication flow corresponding to each of the micro servers according to the historical access parameters;
[0010] Obtaining the historical actual communication traffic of each of the microservers and the historical cross-service communication traffic between the microservers, fitting the functional relationship between the historical actual communication traffic and the historical cross-service communication traffic between the microservices, and determining the target communication traffic corresponding to each of the microservers based on the functional relationship and the expected communication traffic;
[0011] Determine the available communication duration of each of the micro servers according to the target communication traffic and the preset communication service period;
[0012] The current call congestion situation of the API interface in each of the monitored micro servers is obtained, and the communication traffic of the platform is managed according to the current call congestion situation and the available communication duration.
[0013] According to another aspect of the present invention, an embodiment of the present invention further provides a platform management system based on a microservice architecture, the platform management system based on the microservice architecture, the system comprising: a request parsing module, a call analysis module, an expected traffic determination module, a communication traffic determination module, a communication duration determination module and a communication management module;
[0014] The request parsing module is used to obtain historical service requests of users for accessing the platform, and determine the access call sequence of the historical service requests to at least one micro-server;
[0015] A call analysis module, used to determine the historical access parameters of the user accessing each of the micro servers based on the access call sequence;
[0016] An expected traffic determination module, used to determine the expected communication traffic corresponding to each of the micro servers according to the historical access parameters;
[0017] A communication traffic determination module is used to obtain the historical actual communication traffic of each of the microservers and the historical cross-service communication traffic between the microservers, and fit the functional relationship between the historical actual communication traffic and the historical cross-service communication traffic between the microservices, and determine the target communication traffic corresponding to each of the microservers based on the functional relationship and the expected communication traffic;
[0018] A communication duration determination module, used to determine the available communication duration of each micro server according to the target communication flow and a preset communication service period;
[0019] The communication management module is used to obtain the call congestion situation of the API interface in each of the monitored micro servers, and manage the communication traffic of the platform according to the call congestion situation and the available communication time.
[0020] The technical solution of the embodiment of the present invention marks the microserver that calls the API interface the most times as the main microserver according to the historical records of user access, determines the stability of the user calling the server and the number of calling servers, and determines the expected traffic of each microserver according to the historical access parameters, so that the microservices can be expanded in advance to improve the overall performance and response speed of the system; based on the expected communication traffic, the historical actual communication traffic and the historical cross-service communication traffic, the target communication traffic corresponding to each microserver is determined, and the available communication time of each microserver is determined according to the target communication traffic, so that the communication interface resources can be reserved, and the performance bottleneck and delay caused by busy interface or insufficient resources can be avoided, so that the system can process communication requests more efficiently and improve the overall performance and user experience; the communication traffic of the platform is managed according to the current call congestion situation and the available communication time. When the API interface call of the microserver is congested, the call data pointing to the congested API is decomposed and forwarded from the communication ports of other microservers to the target microserver, so as to expand the upper limit of the API interface traffic, which can accelerate the request processing speed, reduce the interface response time, and improve the performance of the system when processing high concurrent traffic.
[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 A flowchart of a platform management method based on a microservice architecture provided by an embodiment of the present invention;
[0024] Figure 2 A flowchart of another platform management method based on microservice architecture provided by an embodiment of the present invention;
[0025] Figure 3 A structural block diagram of a platform management system based on a microservice architecture provided by an embodiment of the present invention;
[0026] Figure 4 An architectural diagram of another platform management system based on a microservice architecture provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] In one embodiment, Figure 1 A flowchart of a platform management method based on a microservice architecture is provided for an embodiment of the present invention. This embodiment is applicable to situations when platform traffic in a microservice architecture is managed. The method can be executed by a platform management system based on a microservice architecture.
[0030] like Figure 1 As shown, the platform management method based on the microservice architecture in this embodiment, the specific steps of the platform management method based on the microservice architecture include:
[0031] S110: Obtain historical service requests of users for accessing the platform, and determine access call sequences of the historical service requests to at least one micro-server.
[0032] Among them, the platform can be understood as a computer network platform, focusing on a user-oriented network platform built on microservers. Historical service requests can be understood as operation requests made by one or more users to one or more microservers in the microservice architecture. For example, the function clicked by the user is a service request for the click function made by the user to the microserver. In this embodiment, the historical service request includes one or more service requests, and each service request corresponds to a corresponding Uniform Resource Locator (URL) address. The URL address may include but is not limited to the microserver name corresponding to the current service request, the port number used by the microserver, and the path to specify the access resource, that is, the host name, port number and request path in the URL.
[0033] In this embodiment, the historical service requests for users to access the platform are historical service requests corresponding to multiple users' access to the platform, for example, the historical service requests corresponding to user 1's access to the platform; the historical service requests corresponding to user 1; the historical service requests corresponding to user 3, etc. Of course, each historical service request includes one or more service requests, and each historical service request corresponds to an access call sequence of a corresponding microserver. In some embodiments, the access call sequence includes: the total number of microservers accessed by each service request in the historical service request, the identifier of the accessed microserver, and the number of application programming interfaces (Application Programming Interface, API) called in the accessed microserver. It can be understood that each historical service request can correspond to the total number of corresponding accessed microservers, which microservers are accessed and the unique identifier of the accessed microservice, and the number of API interfaces called in the accessed microserver.
[0034] In this embodiment, each user enters identity information to log in to the platform and makes a service request to the platform. After receiving the user's service request, the identity of the user making the service request is verified. After the identity verification is passed, the user's service request to access the platform is obtained. Of course, each visit by the user will generate a corresponding service request, thereby forming m historical service requests. For the m historical service requests, the historical service requests can be parsed to obtain the corresponding uniform resource locator URL address, the URL address can be analyzed, and the host name, port number and request path in the URL can be extracted to obtain all the API interface addresses that need to be called in the service request, and the total number of micro servers accessed by each service request, the identifier of the accessed micro server and the number of APIs called in the accessed micro server are counted to form a corresponding access call sequence.
[0035] S120: Determine historical access parameters of users accessing each micro-server based on the access call sequence.
[0036] Among them, the historical access parameters refer to user access, including: the main microserver selected from each microserver, the call ratio coefficient of the main microserver, and the access stability of accessing each microserver. It should be noted that the access stability of accessing each microserver includes the access stability of the selected main microserver and other microservers except the main microserver.
[0037] In this embodiment, for each user accessing the platform, since the service requests accessed by the user may be the same or different, the historical access parameters of the user accessing each microserver may also be the same or different; in this embodiment, the access call sequence corresponding to the service request includes the total number of microservers accessed by the service request, the identification of the accessed microservers, and the number of API interfaces called in the accessed microservers. Therefore, each service request can correspond to the main microserver, non-main microserver, the call ratio coefficient of the main microserver, the call ratio coefficient of the non-main microserver, and the access stability of accessing each microserver of the service request. It should be noted that the non-main microserver is a microserver other than the main microserver. The main microserver in this embodiment is a main microserver selected from the various microservers accessed by the user. The selected microserver is named the main microserver, that is, the main microserver is one of the microservers.
[0038] In this embodiment, the historical access parameters of the user's access to each microserver can be determined by the access call sequence of the historical service requests to one or more microservers. In some embodiments, for the access call sequence corresponding to each service request in the historical service request, the microserver with the largest number of API interface calls can be selected from each access call sequence and recorded as a feature microserver; the feature microserver with the largest number of times recorded as the feature microserver is used as the main microserver visited by the user this time. On this basis, the call coefficient of the main microserver called by each service request is determined, and the call ratio coefficient of the user calling the main microserver is determined based on each call coefficient, and the access stability of the user's access to each microserver is determined, and the user's main microserver, the call ratio coefficient of the main microserver and the access stability of each microserver are used as historical access parameters; it can be understood that extracting The platform obtains an access call sequence when parsing the user's previous m service requests. For each access call sequence, the microserver corresponding to the largest element in the access call sequence is recorded as the characteristic microserver of the current request, and the microserver that has been used as the characteristic microserver the most times in the previous m requests is recorded as the user's main microserver. It should be noted that in this embodiment, the characteristic microserver recorded as the characteristic microserver the most times may be a characteristic microserver that appears the same number of times. At this time, when there are multiple microservers that have the same number of characteristic microservers, one of the microservers can be randomly designated as the main microserver. Of course, one of the microservers with the earliest appearance time can also be selected as the main microserver according to the appearance time of multiple microservers that have the same number of characteristic microservers. In addition, the selection can also be made according to demand, and this embodiment does not limit this.
[0039] S130. Determine the expected communication traffic corresponding to each micro server according to the historical access parameters.
[0040] The expected communication traffic can be understood as the traffic that each microserver expects to communicate. Of course, each microserver corresponds to a corresponding expected communication traffic and a maximum carrying traffic, wherein the maximum carrying traffic can be obtained through the hardware parameters corresponding to each microserver. It can be understood that since the hardware parameters corresponding to each server may be different, the maximum carrying traffic of each microserver is generally different.
[0041] In this embodiment, the expected communication traffic corresponding to each microserver can be determined by the main microserver selected from each microserver, the call ratio coefficient of the main microserver, and the access stability of each microserver. Specifically, the total number of users logging into the platform is obtained, and the number of users whose main microserver is microserver i among the users logging into the platform is determined; the total number of users whose main microserver is microserver i calling all server API interfaces in historical m service requests is determined, and the call ratio coefficient of users whose main microserver is microserver i is determined from historical access parameters; wherein k represents the identifier of the main microserver as the selected server; the number of users whose main microserver is not microserver i calling all server API interfaces in historical m service requests is determined. The total number of PI interfaces, and determine the access stability corresponding to the user whose ath main microserver is not microserver i from the historical access parameters; wherein a represents the identification that the main microserver is not the selected server; based on the total number of users logging into the platform, the number of users whose main microserver is microserver i among the users logging into the platform, the total number of all server API interfaces called by the user whose kth main microserver is microserver i in the historical m service requests, the call ratio coefficient of the user whose kth main microserver is microserver i, the total number of all server API interfaces called by the user whose ath main microserver is not microserver i in the historical m service requests, and the access stability corresponding to the user whose ath main microserver is not microserver i, the expected communication traffic is determined.
[0042] It should be noted that the expected communication traffic obtained may be less than or equal to the maximum carrying traffic corresponding to each microserver, or may be greater than the maximum carrying traffic corresponding to each microserver. Therefore, in the event that the expected communication traffic is greater than the maximum carrying traffic corresponding to the microserver, the service of one or more microservers where this situation occurs can be expanded in advance so that the maximum carrying traffic of the microserver after the service expansion is greater than the expected communication traffic obtained by calculation. In this embodiment, the methods for expanding the service of one or more microservers where this situation occurs may include but are not limited to providing more channels, accessing more computing resources, and other methods.
[0043] S140, obtaining the historical actual communication traffic of each microserver and the historical cross-service communication traffic between each microserver, and fitting the functional relationship between the historical actual communication traffic and the historical cross-service communication traffic between each microservice, and determining the target communication traffic corresponding to each microserver based on the functional relationship and the expected communication traffic.
[0044] The historical actual communication traffic can be understood as the actual communication data volume between micro servers; the historical cross-service communication traffic can be understood as the communication data volume between micro servers predicted in advance; and the target communication traffic can be understood as the communication traffic corresponding to each micro server determined in the end.
[0045] In this embodiment, the actual communication traffic can be obtained from the log of the user access platform, the cross-service communication traffic can be obtained from the computer operation log, and the functional relationship between the historical actual communication traffic and the historical cross-service communication traffic between each microserver can be fitted. The target communication traffic is determined through the functional relationship, the expected communication traffic, and the channel capacity of the microserver cross-service communication interface. Among them, the channel capacity of the microserver cross-service communication interface refers to the hardware parameters of the microserver, which can be directly obtained; in some embodiments, the traffic weight of each microserver can also be increased according to certain rules, and the target communication traffic corresponding to each microserver can be determined according to the traffic weight, the historical actual communication traffic and the historical cross-service communication traffic. In other embodiments, the target communication traffic can also be determined by other methods, and this embodiment is not limited here.
[0046] S150: Determine the available communication duration of each micro server according to the target communication flow and the preset communication service period.
[0047] The available communication duration refers to the available communication duration corresponding to the micro server.
[0048] In this embodiment, each microserver corresponds to a corresponding preset communication service cycle, which is a preset period of time, which can be one minute or a few seconds, and can be set according to the platform function. The available communication time of each microserver can be determined by the preset communication service cycle and the expected communication traffic corresponding to each microserver. It can be understood that each microserver corresponds to a corresponding preset service cycle. In this embodiment, the available communication time of each microserver can be divided from the preset service cycle to obtain the available communication time of the microserver.
[0049] S160: Obtain the current call congestion status of the API interface in each monitored micro-server, and manage the communication traffic of the platform according to the current call congestion status and the available communication time.
[0050] The current call congestion situation refers to whether the API interface in each monitored microserver is blocked.
[0051] In this embodiment, the API interface call congestion can be monitored by automatic monitoring software or the like. When congestion occurs in the API interface of each monitored microserver, the microserver corresponding to the API interface where the interface congestion occurs is used as the target microserver, and the task allocation of other microservers is calculated based on the available communication time of other microservers and the available communication time of the target microserver. The call data pointing to the congested API is decomposed, and the decomposed data is forwarded to the target microserver through the cross-service communication port of other microservers according to the task allocation, and recombined into complete call information. Specifically, the microserver with interface call congestion is used as the target microserver, and the microserver without interface call congestion is used as the forwarding microserver, the service request directed to the target microserver is suspended, and the request data corresponding to the suspended service request is stored in the temporary stack of the forwarding microserver; the forwarding data volume of each forwarding microserver is determined by the data communication rate and available communication time tested between the microservers respectively, the service request of the target microserver is split to obtain the split service request, and every service cycle, the data is taken out from the temporary stack according to the forwarding data volume of each forwarding microserver and forwarded to the target microserver until all the split service requests are sent, so that the target microserver reassembles the data and restores the service request.
[0052] The technical solution of the embodiment of the present invention marks the microserver that calls the API interface the most times as the main microserver according to the historical records of user access, determines the stability of the user calling the server and the number of calling servers, and determines the expected traffic of each microserver according to the historical access parameters, so that the microservices can be expanded in advance to improve the overall performance and response speed of the system; based on the expected communication traffic, the historical actual communication traffic and the historical cross-service communication traffic, the target communication traffic corresponding to each microserver is determined, and the available communication time of each microserver is determined according to the target communication traffic, so that the communication interface resources can be reserved, and the performance bottleneck and delay caused by busy interface or insufficient resources can be avoided, so that the system can process communication requests more efficiently and improve the overall performance and user experience; the communication traffic of the platform is managed according to the current call congestion situation and the available communication time. When the API interface call of the microserver is congested, the call data pointing to the congested API interface is decomposed and forwarded from the communication ports of other microservers to the target microserver, so as to expand the upper limit of the API interface traffic, which can accelerate the request processing speed, reduce the interface response time, and improve the performance of the system when processing high concurrent traffic.
[0053] In one embodiment, the method further includes:
[0054] When the expected communication traffic exceeds the maximum carrying traffic of the micro server, traffic expansion is performed on the micro server so that the maximum carrying traffic of the micro server after traffic expansion is greater than the expected communication traffic of the micro server.
[0055] Among them, the maximum carrying traffic can be determined by the hardware parameters of the server.
[0056] In this embodiment, when the expected communication traffic exceeds the maximum carrying traffic of the microserver, the traffic expansion is performed on the microserver so that the maximum carrying traffic of the microserver after the traffic expansion is greater than the expected communication traffic of the microserver. It can be understood that when the expected traffic of microserver i is greater than the maximum carrying traffic of microserver i, the service space of the maximum carrying traffic of microserver i is expanded in advance so that the maximum carrying traffic of microserver i after the expansion is greater than the expected traffic of server i.
[0057] In one embodiment, Figure 2 A flowchart of another platform management method based on microservice architecture provided for one embodiment of the present invention, based on the above embodiments, this embodiment determines the access call sequence of historical service requests to at least one microserver; determines the historical access parameters of users accessing each microserver based on the access call sequence; determines the expected communication traffic corresponding to each microserver according to the historical access parameters; fits the functional relationship between the historical actual communication traffic and the historical cross-service communication traffic between each microservice, and determines the target communication traffic corresponding to each microserver based on the functional relationship and the expected communication traffic; determines the available communication time of each microserver according to the target communication traffic and the preset communication service cycle, and manages the communication traffic of the platform according to the current call congestion situation and the available communication time.
[0058] like Figure 2 As shown, the platform management method based on the microservice architecture in this embodiment may specifically include the following steps:
[0059] S210: Obtain historical service requests of users accessing the platform, and parse the historical service requests to obtain corresponding URL addresses.
[0060] In this embodiment, the user enters identity information to log in to the platform and makes a service request to the platform. After receiving the user's service request, the identity of the user making the request is verified. After the verification is passed, the URL address of the service request is parsed and the URL address is analyzed.
[0061] S220. Extract the microserver name, the port number used by the microserver, and the path to the specified resource access corresponding to each service request in the historical service request from the URL address to obtain the microserver called by each service request and the number of API interfaces corresponding to the microserver.
[0062] In this embodiment, the microserver name corresponding to each service request in the historical service request, the port number used by the microserver, and the path to the specified access resource are extracted from the URL address, that is, the host name, port number, and request path in the URL are extracted, so as to obtain all the API interface addresses that need to be called in the service request, and each API interface address corresponds to a corresponding microserver, so as to obtain all the microservers called by each service request, and the number of API interfaces corresponding to all the called microservers. Among them, each microserver corresponds to one or more API addresses. Exemplarily, for a service request in the user's historical service request, the microservices corresponding to API interface 1 and API interface 2 called by the service request are microserver 1; the microservices corresponding to API interface 3, API interface 4, and API interface 5 are microserver 2; the microservice corresponding to API interface 6 is microserver 3, etc., so that the total number of microservers accessed by each service request (that is, the total number of microservers accessed), the identifier of the accessed microserver, and the number of APIs called in the accessed microserver can be counted.
[0063] S230: Count the total number of micro servers accessed by each service request, the identifiers of the accessed micro servers, and the number of APIs called in the accessed micro servers to form a corresponding access call sequence.
[0064] In this embodiment, the total number of microservers accessed by each service request, the identification of the accessed microservers, and the number of APIs called in the accessed microservers are counted to form a corresponding access call sequence. Specifically, according to the microserver corresponding to the API interface address, the number of API interfaces called in each microserver is counted, and the total number of microservers accessed by the service request, the identification of the accessed microservers, and the number of APIs called in the accessed microservers are counted to form a corresponding access call sequence. The call sequence can be expressed in the form of [W1, W2, ..., Wi, ..., Wn], where n represents the total number of microservers accessed, i represents the number of the microserver accessed, and Wi represents the number of API interfaces called by the accessed microserver i.
[0065] S240. For the access call sequence corresponding to each service request in the historical service requests, select the microserver with the largest number of API interface calls from each access call sequence and record it as a feature microserver, and use the feature microserver with the largest number of times recorded as a feature microserver as the user's main microserver.
[0066] In this embodiment, a main microserver determination method is executed for each user registered on the platform to obtain the user's main microserver. The main microserver determination method includes: according to the user's first m service request records, extracting the call sequence obtained by the platform when parsing the user's first m service requests, for each call sequence, recording the microserver corresponding to the largest element in the call sequence as the characteristic microserver of the current request, and taking the microserver with the largest number of times as the characteristic microserver in the first m requests as the user's main microserver. When there are multiple microservers that have the same number of times as the characteristic microserver, randomly designate one of the microservers as the main microserver. Exemplarily, the microservers called in the previous request include microserver 1, microserver 2 and microserver 3, wherein microserver 1 calls 5 API interfaces, microserver 2 calls 4 API interfaces, and microserver 3 calls 8 API interfaces, then microserver 3 is the feature server of the previous request; the microservers called in the first two requests include microserver 1, microserver 2 and microserver 3, wherein microserver 1 calls 8 API interfaces, microserver 2 calls 3 API interfaces, and microserver 3 calls 5 API interfaces, then microserver 1 is the feature server of the first two requests; the microservers called in the first three requests include microserver 1, microserver 2 and microserver 3, wherein microserver 1 calls 10 API interfaces, microserver 2 calls 4 API interfaces, and microserver 3 calls 6 API interfaces, then microserver 1 is the feature server of the previous request; then the user's main microserver is microserver 1.
[0067] S250: Determine a call coefficient of a main micro server called by each service request, and determine a call ratio coefficient of a user calling the main micro server according to each call coefficient.
[0068] In this embodiment, the calling coefficient of the main micro server called by each service request is determined, and the calling proportion coefficient of the user calling the main micro server is determined according to each calling coefficient.
[0069] Specifically, according to the user's main micro server, the call coefficient P of calling the main micro server is calculated, P=Wy / (W1+W2+…+Wn), where Wy represents the number of API interfaces called in the main micro server, and the average value of the historical m service request ratio coefficients is recorded as the call ratio coefficient of the user calling the main micro server. Exemplary: when the first service request is made, the call coefficient of calling the main micro server is called; when the second service request is made, the call coefficient of calling the main micro server is called; the three average values are calculated to obtain the call ratio coefficient of the user calling the main micro server.
[0070] S260: Determine the access stability of the user to each micro server, and use the user's main micro server, the call ratio coefficient of the main micro server, and the access stability of each micro server as historical access parameters.
[0071] In this embodiment, the number of APIs called by microserver i in the user's historical c-th service request and the number of APIs called by microserver i in the user's historical c+1-th service request are obtained, and the access stability of the user's access to each microserver is determined by the number of APIs called by microserver i in the user's historical c-th service request and the number of APIs called by microserver i in the user's historical c+1-th service request, and the user's main microserver, the call ratio coefficient of the main microserver and the access stability of each microserver are used as historical access parameters.
[0072] Specifically, the access stability of each microserver is determined by the formula: , where R represents the access stability of users to each micro-server, It is represented by the number of APIs called by microserver i in the user’s c-th service request in history, It is represented by the number of APIs called by microserver i in the user's c+1th service request in history.
[0073] S270. Determine the expected communication traffic corresponding to each micro server according to the historical access parameters.
[0074] In this embodiment, the identity information of all users currently logged into the platform is obtained, and the expected traffic of each microserver is calculated based on the user's access record. The access record includes: the user's main microserver, call coefficient and access stability, and the expected communication traffic corresponding to each microserver is determined.
[0075] In one embodiment, the expected communication flow of each micro server is determined by the formula: , where Q i is the expected communication traffic of microserver i, U is the total number of users logging into the platform, Ui is the number of users whose main microserver is microserver i among the users logging into the platform, It is represented by the total number of calls to all server API interfaces by users whose kth main microserver is microserver i in the historical m service requests. Pk represents the call ratio coefficient of users whose kth main microserver is microserver i. Pa represents the call ratio coefficient of users whose ath main microserver is not microserver i. It is represented by the total number of users whose a-th master microserver is not microserver i calling all server API interfaces in the historical m service requests. Ra represents the access stability corresponding to users whose a-th master microserver is not microserver i.
[0076] S280: Input the historical actual communication traffic and the historical cross-service communication traffic into a preset neural network to output a functional relationship between the historical actual communication traffic and the historical cross-service communication traffic between each microservice.
[0077] In this embodiment, the historical actual communication traffic of each microserver and the historical cross-service communication traffic between each microserver are obtained, the historical actual communication traffic and the historical cross-service communication traffic are input into a preset neural network model, and the functional relationship F(Q) between the cross-service communication traffic between each microservice and the microserver traffic is output, where Q represents the historical actual communication traffic of the microserver, and F(Q) represents the historical cross-service communication traffic of the microserver. The preset neural network model in this embodiment can be a deep convolutional neural network, a BP neural network, a RBF neural network, a perceptron network, etc. in the prior art. Exemplarily, machine learning algorithms, such as support vector machines (SVM) and decision trees, can be used for function fitting, which fit nonlinear relationships by learning patterns from data.
[0078] S290. Substitute the expected communication traffic into the functional relationship to obtain the expected cross-service communication traffic.
[0079] In this embodiment, the expected communication traffic is substituted into the functional relationship to obtain the expected cross-service communication traffic. For example, F(Qi) represents the expected cross-service communication traffic obtained by substituting the expected traffic Qi into the function F(Q); i refers to microserver i above, which is an unspecified microserver, and all servers can execute according to i.
[0080] S2100. Obtain the channel capacity of the micro server's inter-service communication interface, and determine the target communication flow according to the ratio of the expected inter-service communication flow to the channel capacity.
[0081] In this embodiment, the channel capacity QR of the microserver inter-service communication interface is obtained, and the ratio H of the expected inter-service communication traffic to the channel capacity is calculated, H=F(Qi) / QR, where F(Qi) represents the expected inter-service communication traffic obtained by substituting the expected traffic Qi into the function F(Q).
[0082] S2110: Determine a preset communication service period for each micro server, and determine the product of each preset communication service period and the expected communication flow corresponding to each micro server, and use the product as the available communication duration of each micro server.
[0083] In this embodiment, each microserver corresponds to a corresponding preset communication service cycle, which is a preset period of time, exemplarily, it can be one minute or a few seconds, and the product of each preset communication service cycle and the expected communication traffic corresponding to each microserver is determined, and the product is used as the available communication time of each microserver. Exemplarily, the service cycle T is preset, and the available communication time TG is divided from the service cycle, TG=T*H, and the data communication speed between each microserver is tested.
[0084] S2120: When the current call congestion situation is interface call congestion, the microserver with interface call congestion is used as the target microserver, and the microserver without interface call congestion is used as the forwarding microserver.
[0085] In this embodiment, the API interface call congestion is monitored, and the server where the interface congestion occurs is used as the target microserver. The task allocation of other microservers is calculated according to the available communication time of other microservers and the available communication time of the target microserver, and the call data pointing to the congested API is decomposed. The decomposed data is forwarded to the target microserver through the cross-service communication port of other microservers according to the task allocation, and reassembled into complete call information; it can be understood that the API interface call congestion is monitored, and when the API interface is found to be congested, the microserver corresponding to the congested API is found according to the address of the congested API, and the microserver is marked as the target microserver, and the service request pointing to the target microserver is suspended, and the suspended service request data is stored in a temporary stack, and the data volume G of all suspended service requests is parsed.
[0086] S2130, suspending the service request directed to the target microserver, splitting the service request of the target microserver to obtain split service requests, and storing the request data corresponding to the suspended service request in a temporary stack of the forwarding microserver.
[0087] In this embodiment, the service request directed to the target micro server is suspended, and the request data corresponding to the suspended service request is stored in a temporary stack of the forwarding micro server.
[0088] S2140: Obtain the data communication rates tested between the micro servers respectively, and determine the forwarding data volume of each forwarding micro server according to the data communication rate and the available communication time.
[0089] In this embodiment, the data communication rate can be obtained by testing the speed using network speed test software, and each one needs to be tested once.
[0090] In this embodiment, the forwarding data volume of each forwarding micro server is determined according to the data communication rate and the available communication time, that is, the traffic allocation method is executed for each forwarding micro server to calculate the data forwarding volume of each forwarding micro server. Specifically, the calculation formula of the forwarding data volume of each forwarding micro server can be expressed as: , where It is represented as the data forwarding amount allocated to the b-th forwarding micro server, It is represented as the available communication duration of the b-th forwarding micro server, It is represented as the data communication rate between the b-th forwarding micro server and the target micro server, It is represented as the available communication duration of the d-th forwarding micro server, It is represented as the data communication rate between the dth forwarding micro server and the target micro server, and G is represented as the amount of data requested by the storage service in the temporary stack.
[0091] S2150, taking out the service request from the temporary stack according to the preset service cycle and the forwarding data volume, and forwarding the data to the target micro server until all the split service requests are sent, so that the target micro server reassembles the data and restores the service request.
[0092] In this embodiment, the service request of the target microserver is split to obtain the split service requests, and every service cycle, data is taken out from the temporary stack and forwarded to the target microserver according to the forwarding data amount of each forwarding microserver, until all the split service requests are sent, so that the target microserver reassembles the data and restores the service request. It can be understood that all service requests pointing to the target microserver are split, and the data forwarding amount of each forwarding microserver calculated in step S2140 is distributed to each forwarding microserver, and every service cycle, the cross-service communication interface of the forwarding microserver forwards data to the target microserver once, until all the data are sent, the data is reassembled in the target microserver to restore the service request. Exemplarily, there are three microservers in the microservice architecture platform. At a certain moment, it is detected that the API interface of microserver 1 is congested, so the service requests directed to microserver 1 are suspended. All suspended service requests have a total data volume of 20Mb. The cross-service communication speeds between microserver 2, microserver 3 and microserver 1 are calculated to be 100kb / s and 200kb / s respectively. The available communication time is 10s and 15s respectively, and the preset communication cycle is 60s; then the data forwarding volume of microserver 2 and microserver 3 is 5Mb and 15Mb respectively. Microserver 2 sends 10s of data to microserver 1 every 50s, and microserver 2 sends 15s of data to microserver 1 every 40s, until 5 cycles, that is, after 300s, all data transmission is completed at the same time, and the original service request is restored in microserver 1.
[0093] The above technical scheme in this embodiment counts the total number of microservers accessed by each service request, the identifiers of the accessed microservers, and the number of APIs called in the accessed microservers to form a corresponding access call sequence, selects the microserver with the largest number of API interface calls from each access call sequence as a characteristic microserver, and uses the characteristic microserver with the largest number of times recorded as the characteristic microserver in historical service requests as the user's main microserver, calculates the stability of the user's server calls and the number of server calls, and predicts the expected traffic of each microserver based on the identities of all users who log in to the platform, so as to expand the microservices in advance and improve the overall performance and response speed of the system; by fitting the historical actual communication traffic between each microservice and the historical cross-service The functional relationship of communication traffic is established, and the expected cross-service communication traffic is determined based on the functional relationship and the expected communication traffic. The target communication traffic is determined based on the ratio of the expected cross-service communication traffic to the channel capacity, and the available communication time corresponding to each microserver is determined to reserve communication interface resources, avoid performance bottlenecks and delays caused by busy interfaces or insufficient resources, and enable the system to process communication requests more efficiently, thereby improving overall performance and user experience. When the API interface call of the microserver is congested, the call data pointing to the congested API is decomposed and forwarded from the communication ports of other microservers to the target microserver to expand the upper limit of the API interface traffic, which can speed up the request processing speed, reduce the interface response time, and improve the performance of the system when processing high concurrent traffic.
[0094] In one embodiment, Figure 3 A structural block diagram of a platform management system based on a microservice architecture provided by an embodiment of the present invention, which is suitable for managing platform traffic in a microservice architecture.
[0095] like Figure 3 As shown, the system includes: a request parsing module 310, a call analysis module 320, an expected traffic determination module 330, a communication traffic determination module 340, a communication duration determination module 350 and a communication management module 360;
[0096] The request parsing module 310 is used to obtain historical service requests of users for accessing the platform, and determine the access call sequence of the historical service requests to at least one micro-server;
[0097] A call analysis module 320, configured to determine historical access parameters of the user accessing each of the micro servers based on the access call sequence;
[0098] An expected traffic determination module 330, configured to determine the expected communication traffic corresponding to each of the micro servers according to the historical access parameters;
[0099] The communication traffic determination module 340 is used to obtain the historical actual communication traffic of each of the micro servers and the historical cross-service communication traffic between the micro servers, and fit the functional relationship between the historical actual communication traffic and the historical cross-service communication traffic between the micro services, and determine the target communication traffic corresponding to each of the micro servers based on the functional relationship and the expected communication traffic;
[0100] A communication duration determination module 350, configured to determine the available communication duration of each of the micro servers according to the target communication flow and a preset communication service period;
[0101] The communication management module 360 is used to obtain the call congestion status of the API interface in each of the monitored micro servers, and manage the communication traffic of the platform according to the call congestion status and the available communication time.
[0102] In the embodiment of the present invention, the call analysis module and the expected traffic determination module mark the microserver that calls the API interface the most times as the main microserver based on the historical records of user access, and determine the stability of user calls to the server and the number of called servers. According to the historical access parameters, the expected traffic of each microserver is determined, so that the microservices can be expanded in advance to improve the overall performance and response speed of the system; the communication traffic determination module and the communication duration determination module determine the target communication traffic corresponding to each microserver based on the expected communication traffic, the historical actual communication traffic and the historical cross-service communication traffic, and determine the available communication of each microserver according to the target communication traffic. The communication duration can be used to reserve communication interface resources, avoid performance bottlenecks and delays caused by busy interfaces or insufficient resources, enable the system to process communication requests more efficiently, and improve overall performance and user experience; the communication management module manages the platform's communication traffic according to the current call congestion situation and available communication duration. When the API interface call of the microserver is congested, the call data pointing to the congested API will be decomposed and forwarded from the communication ports of other microservers to the target microserver, thereby expanding the API interface traffic limit, accelerating request processing, reducing interface response time, and improving the system's performance when processing high concurrent traffic.
[0103] In one embodiment, the system further comprises:
[0104] The traffic expansion module is used to expand the traffic of the micro server when the expected communication traffic exceeds the maximum carrying traffic of the micro server, so that the maximum carrying traffic of the micro server after traffic expansion is greater than the expected communication traffic of the micro server.
[0105] In one embodiment, the access call sequence includes: the total number of microservers accessed by each service request in the historical service request, the identifier of the accessed microserver, and the number of application programming interfaces API called in the accessed microserver; accordingly, the request parsing module 310 includes:
[0106] A parsing unit, used for parsing the historical service request to obtain a corresponding uniform resource locator URL address;
[0107] The extraction unit is used to extract the microserver name, the port number used by the microserver and the path to specify the access resource corresponding to each service request in the historical service request from the URL address, so as to obtain the microserver called by each service request and the number of API interfaces corresponding to the microserver.
[0108] The sequence determination unit is used to count the total number of micro servers accessed by each service request, the identifiers of the accessed micro servers, and the number of APIs called in the accessed micro servers to form a corresponding access call sequence.
[0109] In one embodiment, the historical access parameters include: a main microserver selected from each of the microservers, a call ratio coefficient of the main microserver, and access stability of each of the microservers; accordingly, the call analysis module 320 includes:
[0110] A main microserver determination unit is used to select, for each access call sequence corresponding to each service request in the historical service request, a microserver with the largest number of API interface calls from each access call sequence as a feature microserver, and select the feature microserver with the largest number of times recorded as the feature microserver in the historical service request as the main microserver of the user;
[0111] A call ratio determination unit, used to determine the call coefficient of the main micro server called by each service request, and determine the call ratio coefficient of the user calling the main micro server according to each call coefficient;
[0112] The access stability determination unit is used to determine the access stability of the user accessing each of the micro servers, and use the user's main micro server, the call ratio coefficient of the main micro server and the access stability of each of the micro servers as the historical access parameters.
[0113] In one embodiment, the access stability of each micro-server is determined by the formula: , where R represents the access stability of the user to each micro-server, It is represented by the number of APIs called by microserver i in the cth service request of the user in history, It is represented by the number of APIs called by the micro server i in the user's historical c+1th service request.
[0114] In one embodiment, the determination of the expected communication flow of each of the micro servers is expressed by the formula: , where Q i is the expected communication traffic of microserver i, U is the total number of users logging into the platform, Ui is the number of users whose main microserver is microserver i among the users logging into the platform, It is represented by the total number of calls to all server API interfaces by users whose kth main microserver is microserver i in the historical m service requests. Pk represents the call ratio coefficient of users whose kth main microserver is microserver i. Pa represents the call ratio coefficient of users whose ath main microserver is not microserver i. It is represented by the total number of users whose a-th master microserver is not microserver i calling all server API interfaces in the historical m service requests. Ra represents the access stability corresponding to users whose a-th master microserver is not microserver i.
[0115] In one embodiment, the communication flow determination module 340 includes:
[0116] A functional relationship fitting unit is used to input the historical actual communication traffic and the historical cross-service communication traffic into a preset neural network to output a functional relationship between the historical actual communication traffic and the historical cross-service communication traffic between each microservice.
[0117] In one embodiment, the communication flow determination module 340 includes:
[0118] an expected inter-service traffic determining unit, configured to substitute the expected communication traffic into the functional relationship to obtain the expected inter-service communication traffic;
[0119] The target traffic determination unit is used to obtain the channel capacity of the micro-server inter-service communication interface and determine the target communication traffic according to the ratio of the expected inter-service communication traffic to the channel capacity.
[0120] In one embodiment, the communication duration determination module 350 includes:
[0121] The communication duration determination unit is used to determine the preset communication service period of each micro server, and determine the product of each preset communication service period and the expected communication flow corresponding to each micro server, and use the product as the available communication duration of each micro server.
[0122] In one embodiment, the communication management module 360 includes:
[0123] A forwarding server determination unit, configured to, when the current call congestion situation is interface call congestion, use the microserver with interface call congestion as a target microserver, and use the microserver without interface call congestion as a forwarding microserver;
[0124] A data storage unit, used to suspend the service request directed to the target micro server, split the service request of the target micro server to obtain split service requests, and store the request data corresponding to the suspended service request in a temporary stack of the forwarding micro server;
[0125] A forwarding data volume determination unit, configured to obtain the data communication rates tested between the micro servers respectively, and determine the forwarding data volume of each forwarding micro server according to the data communication rate and the available communication duration;
[0126] The forwarding unit is used to take out the service request from the temporary stack according to the preset service cycle and the forwarding data volume, and forward the data to the target micro server until all the split service requests are sent, so that the target micro server reassembles the data and restores the service request.
[0127] In one embodiment, the calculation formula for the forwarding data volume of each forwarding micro-server can be expressed as: , where It is represented as the data forwarding amount allocated to the b-th forwarding micro server, It is represented as the available communication duration of the b-th forwarding micro server, It is represented as the data communication rate between the b-th forwarding micro server and the target micro server, It is represented as the available communication duration of the d-th forwarding micro server, It is represented as the data communication rate between the dth forwarding micro server and the target micro server, and G is represented as the amount of data requested by the storage service in the temporary stack.
[0128] The platform management system based on microservice architecture provided in the embodiment of the present invention can execute the platform management method based on microservice architecture provided in any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method.
[0129] In one embodiment, in order to better understand the platform management system based on the microservice architecture, Figure 4 An architectural diagram of another platform management system based on a microservice architecture provided in an embodiment of the present invention.
[0130] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0131] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A platform management method based on microservice architecture, characterized in that: Applied to a platform management system based on a microservice architecture, the method comprises: Obtain historical service requests of users for accessing the platform, and determine an access call sequence of the historical service requests to at least one micro-server; Determine the historical access parameters of the user accessing each of the micro servers based on the access call sequence; Determine the expected communication flow corresponding to each of the micro servers according to the historical access parameters; Obtaining the historical actual communication traffic of each of the microservers and the historical cross-service communication traffic between the microservers, fitting the functional relationship between the historical actual communication traffic and the historical cross-service communication traffic between the microservices, and determining the target communication traffic corresponding to each of the microservers based on the functional relationship and the expected communication traffic; Determine the available communication duration of each of the micro servers according to the target communication traffic and the preset communication service period; Obtaining the current call congestion of the API interface in each of the monitored micro-servers, and managing the communication traffic of the platform according to the current call congestion and the available communication duration; The access call sequence includes: the total number of microservers accessed by each service request in the historical service request, the identifier of the accessed microserver, and the number of API interfaces called in the accessed microserver; The historical access parameters include: a main micro-server selected from each of the micro-servers, a call ratio coefficient of the main micro-server, and access stability of each of the micro-servers; The determination of the expected communication flow of each of the micro servers is expressed by the formula: , where Q i is the expected communication traffic of microserver i, U is the total number of users logging into the platform, Ui is the number of users whose main microserver is microserver i among the users logging into the platform, It is represented by the total number of calls to all server API interfaces by users whose kth main microserver is microserver i in the historical m service requests. Pk represents the call ratio coefficient of users whose kth main microserver is microserver i. Pa represents the call ratio coefficient of users whose ath main microserver is not microserver i. It is represented by the total number of users whose a-th main microserver is not microserver i calling all server API interfaces in the historical m service requests. Ra represents the access stability corresponding to users whose a-th main microserver is not microserver i, where k represents the identification of the main microserver as the selected server, and a represents the identification of the main microserver not being the selected server.
2. The platform management method based on microservice architecture according to claim 1, characterized in that: The method further comprises: When the expected communication traffic exceeds the maximum carrying traffic of the micro server, traffic expansion is performed on the micro server so that the maximum carrying traffic of the micro server after traffic expansion is greater than the expected communication traffic of the micro server.
3. The platform management method based on microservice architecture according to claim 1, characterized in that: The determining of the access call sequence of the historical service request to at least one micro-server includes: Parsing the historical service request to obtain a corresponding uniform resource locator URL address; Extract the microserver name, the port number used by the microserver, and the path to the specified access resource corresponding to each service request in the historical service request from the URL address to obtain the microserver called by each service request and the number of API interfaces corresponding to the microserver; The total number of microservers accessed by each service request, the identifiers of the accessed microservers, and the number of API interfaces called in the accessed microservers are counted to form a corresponding access call sequence.
4. The platform management method based on microservice architecture according to claim 1, characterized in that: The determining, based on the access call sequence, the historical access parameters of the user accessing each of the micro servers comprises: Select the microserver with the most API interface calls from each of the access call sequences and record it as a feature microserver, and use the feature microserver with the most number of times recorded as a feature microserver as the main microserver of the user; Determine the calling coefficient of the main micro server called by each service request, and determine the calling proportion coefficient of the user calling the main micro server according to each calling coefficient; Determine the access stability of the user to each of the micro servers, and use the user's main micro server, the call ratio coefficient of the main micro server, and the access stability of each of the micro servers as the historical access parameters; The access stability of each micro-server is determined by the formula: , where R represents the access stability of the user to each micro-server, It is represented by the number of API interfaces called by micro server i in the cth service request of the user in the historical service requests, It is represented by the number of API interfaces called by the microserver i in the c+1th service request of the user in the historical service requests, where n represents the total number of microservers, m is the total number of service requests in the historical service requests, and c is one of the service requests in m.
5. The platform management method based on microservice architecture according to claim 1, characterized in that: The fitting of the functional relationship between the historical actual communication traffic and the historical cross-service communication traffic between the microservices includes: The historical actual communication traffic and the historical cross-service communication traffic are input into a preset neural network to output a functional relationship between the historical actual communication traffic and the historical cross-service communication traffic between each microservice.
6. The platform management method based on microservice architecture according to claim 1, characterized in that: The determining the target communication flow corresponding to each of the micro-servers based on the functional relationship and the expected communication flow includes: Substituting the expected communication traffic into the functional relationship to obtain the expected cross-service communication traffic; The channel capacity of the micro-server inter-service communication interface is obtained, and the target communication flow is determined according to the ratio of the expected inter-service communication flow to the channel capacity.
7. The platform management method based on microservice architecture according to claim 1, characterized in that: The determining the available communication duration of each micro-server according to the target communication flow and the preset communication service period includes: Determine a preset communication service period of each micro server, and determine the product of each preset communication service period and the expected communication flow corresponding to each micro server, and use the product as the available communication duration of each micro server.
8. The platform management method based on microservice architecture according to claim 1, characterized in that: The managing the communication traffic of the platform according to the current call congestion situation and the available communication duration includes: In the case where the current call congestion situation is interface call congestion, the microserver with interface call congestion is used as the target microserver, and the microserver without interface call congestion is used as the forwarding microserver; Suspending the service request directed to the target microserver, splitting the service request of the target microserver to obtain split service requests, and storing the request data corresponding to the split service requests in a temporary stack of the forwarding microserver; Acquire the data communication rates tested between the micro servers respectively, and determine the forwarding data volume of each forwarding micro server according to the data communication rate and the available communication time; Taking out the service request from the temporary stack according to the preset service cycle and the forwarding data volume, and forwarding the data to the target micro server until all the split service requests are sent, so that the target micro server reassembles the data and restores the service request; The calculation formula for the amount of forwarding data of each forwarding micro-server can be expressed as: , where It is represented as the data forwarding amount allocated to the b-th forwarding micro server, It is represented as the available communication duration of the b-th forwarding micro server, It is represented as the data communication rate between the b-th forwarding micro server and the target micro server, It is represented as the available communication duration of the d-th forwarding micro server, It is represented as the data communication rate between the dth forwarding micro server and the target micro server, and G is represented as the amount of data requested by the storage service in the temporary stack.
9. A platform management system based on microservice architecture, characterized in that: The system comprises: a request parsing module, a call analysis module, an expected flow determination module, a communication flow determination module, a communication duration determination module and a communication management module; The request parsing module is used to obtain historical service requests of users for accessing the platform, and determine the access call sequence of the historical service requests to at least one micro-server; A call analysis module, used to determine the historical access parameters of the user accessing each of the micro servers based on the access call sequence; An expected traffic determination module, used to determine the expected communication traffic corresponding to each of the micro servers according to the historical access parameters; A communication traffic determination module is used to obtain the historical actual communication traffic of each of the microservers and the historical cross-service communication traffic between the microservers, and fit the functional relationship between the historical actual communication traffic and the historical cross-service communication traffic between the microservices, and determine the target communication traffic corresponding to each of the microservers based on the functional relationship and the expected communication traffic; A communication duration determination module, used to determine the available communication duration of each micro server according to the target communication flow and a preset communication service period; A communication management module, used to obtain the call congestion of the API interface in each of the monitored micro servers, and manage the communication traffic of the platform according to the call congestion and the available communication time; The access call sequence includes: the total number of microservers accessed by each service request in the historical service request, the identifier of the accessed microserver, and the number of API interfaces called in the accessed microserver; The historical access parameters include: a main micro-server selected from each of the micro-servers, a call ratio coefficient of the main micro-server, and access stability of each of the micro-servers; The determination of the expected communication flow of each of the micro servers is expressed by the formula: , where Q i is the expected communication traffic of microserver i, U is the total number of users logging into the platform, Ui is the number of users whose main microserver is microserver i among the users logging into the platform, It is represented by the total number of calls to all server API interfaces by users whose kth main microserver is microserver i in the historical m service requests. Pk represents the call ratio coefficient of users whose kth main microserver is microserver i. Pa represents the call ratio coefficient of users whose ath main microserver is not microserver i. It is represented by the total number of users whose a-th main microserver is not microserver i calling all server API interfaces in the historical m service requests. Ra represents the access stability corresponding to users whose a-th main microserver is not microserver i, where k represents the identification of the main microserver as the selected server, and a represents the identification of the main microserver not being the selected server.
Citation Information
Patent Citations
Automatic expansion method based on micro-service
CN112448848A
Server management system, method and equipment based on micro-service architecture and medium
CN116886704A
Traffic scheduling method and device
CN118233462A
Manage a network of microservices
US20200296172A1
Dynamic management of network policies between microservices within a service mesh
US20230259415A1
