CN114157666A - Load balancing system, method, medium and device based on intelligent cloud platform - Google Patents

Load balancing system, method, medium and device based on intelligent cloud platform Download PDF

Info

Publication number
CN114157666A
CN114157666A CN202111241808.5A CN202111241808A CN114157666A CN 114157666 A CN114157666 A CN 114157666A CN 202111241808 A CN202111241808 A CN 202111241808A CN 114157666 A CN114157666 A CN 114157666A
Authority
CN
China
Prior art keywords
server
abnormal
request
weight
service
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.)
Pending
Application number
CN202111241808.5A
Other languages
Chinese (zh)
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.)
Beijing China Transinfo Stock Co ltd
Original Assignee
Beijing China Transinfo Stock 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 Beijing China Transinfo Stock Co ltd filed Critical Beijing China Transinfo Stock Co ltd
Priority to CN202111241808.5A priority Critical patent/CN114157666A/en
Publication of CN114157666A publication Critical patent/CN114157666A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload

Abstract

The invention discloses a load balancing system, a method, a storage medium and a load balancing device based on an intelligent cloud platform, wherein the system comprises a service request end, a service cloud platform and a service end; when the server is arranged in the service cloud platform, the service cloud platform comprises a load balancer and a plurality of servers; the load balancer comprises a statistic module, a weight calculation module and a load selection module; the service request end generates a service request and sends the service request to the service cloud platform; after receiving the request, the load selection module acquires the weight value of each service end from the weight calculation module, and determines that the service end initiates calling according to the weight value; the statistical module records and calculates the abnormal request proportion of each server to determine fault information, sends the fault information and the proportion to the weight calculation module to calculate the weight value of each server, and adjusts the weight of the abnormal server according to the received fault information. The method and the device can reduce the flow distribution proportion of the abnormal server and improve the robustness of the system.

Description

Load balancing system, method, medium and device based on intelligent cloud platform
Technical Field
The invention relates to the technical field of load balancing, in particular to a load balancing system and method based on an intelligent cloud platform, a storage medium and a load balancer.
Background
For intelligent traffic cloud services, the requirements on timeliness and accuracy are high, and especially when cloud services are provided for various traffic subjects (service request terminals) such as vehicle terminals, road sides, management sides and the like based on a traffic cloud platform, how to stably ensure response timeliness of service requests of various traffic subjects for a long time is one of the most concerned problems of intelligent traffic service providers.
Particularly, as the intelligent transportation service platform operates gradually, the data accumulation increases gradually, the scale of the service platform system is already very large, the system processing gradually becomes slow, and the like, the response timeliness of the service request can be directly influenced, and the user experience and the safety are seriously influenced.
Therefore, how to acquire an effective server and meet the actual service requirement becomes a technical problem to be solved urgently.
Disclosure of Invention
The embodiment of the application provides a load balancing system and method based on an intelligent cloud platform, a storage medium and a load balancer. The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview and is intended to neither identify key/critical elements nor delineate the scope of such embodiments. Its sole purpose is to present some concepts in a simplified form as a prelude to the more detailed description that is presented later.
In a first aspect, an embodiment of the application provides a load balancing system based on an intelligent cloud platform, and the system includes a service request end, a service cloud platform and a service end;
when the server is arranged inside the service cloud platform, the service cloud platform comprises a load balancer and a plurality of servers; the load balancer comprises a statistic module, a weight calculation module and a load selection module;
the service request terminal is used for generating a service request and sending the service request to the service cloud platform;
the load selection module is used for acquiring the weight value of each service end from the weight calculation module when a service request is received, determining a target service end according to the weight value and initiating calling aiming at the target service end;
the statistical module is used for recording service timeliness information of each server in a preset period in real time, determining an abnormal request of each server according to the service timeliness information of each server, determining abnormal server information according to the abnormal request of each server, and sending the abnormal server information and the abnormal request of each server to the weight calculation module;
and the weight calculation module is used for calculating the current weight value of each server according to the received abnormal request of each server and adjusting the current weight of the abnormal server corresponding to the abnormal server information to be target weight according to the received abnormal server information.
Optionally, determining the target server according to the weight value includes:
the weighted values of each server are arranged in a descending order to obtain the arranged weighted values;
selecting a server corresponding to the initial weight value from the arranged weight values;
and determining the server corresponding to the initial weight value as a target server.
Optionally, determining abnormal server information according to the abnormal request proportion of each server includes:
judging whether the abnormal request of each server is larger than a preset threshold value one by one to generate a plurality of judgment results;
selecting a judgment result of which the abnormal request is larger than a preset threshold value from the plurality of judgment results;
and determining the server corresponding to the judgment result that the abnormal request proportion is greater than the preset threshold value as an abnormal server.
Optionally, adjusting the current weight of the abnormal server corresponding to the abnormal server information to a target weight according to the received abnormal server information, includes:
when receiving the abnormal server information, determining an abnormal server based on the abnormal server information;
acquiring the current weight of the abnormal server;
acquiring a preset weight table, and determining a target weight corresponding to the current weight from the preset weight table;
and adjusting the current weight of the abnormal server to be the target weight.
Optionally, when the server is arranged outside the service cloud platform, the service cloud platform includes a load balancer and a service register; the service end is a plurality of edge service ends; the load balancer comprises a statistic module, a weight calculation module and a load selection module;
the service request terminal is used for generating a service request and sending the service request to the service cloud platform;
the load selection module is used for determining the identification information of the edge service end according to the service form registered in the service register when receiving a service request, acquiring the current weight value of each edge service end from the weight calculation module according to the identification information of the edge service end, determining a target edge service end according to the weight values, and calling the target edge service end;
the statistical module is used for recording the request normal times and the request abnormal times of each server in a preset period in real time, calculating the abnormal request proportion of each server according to the request normal times and the request abnormal times, determining abnormal server information according to the abnormal request proportion of each server, and sending the abnormal server information and the abnormal request proportion of each server to the weight calculation module;
and the weight calculation module is used for calculating the current weight value of each edge server according to the received abnormal request proportion of each edge server and adjusting the current weight of the abnormal edge server corresponding to the abnormal edge server information into a target weight according to the received abnormal edge server information.
Optionally, after calculating the current weight value of each edge server according to the received abnormal request proportion of each edge server, the method further includes:
when there are at least two edge servers with the same weight value,
calculating the distance between each edge server in the edge servers capable of providing the service and the service request end to obtain the distance value of each edge server;
determining a reference coefficient of the weight according to the distance value of each edge server, and calculating a first correction value of the current weight of each edge server by combining the abnormal request of each edge server, and recording the first correction value as a first weight value;
optionally, after calculating the current weight value of each edge server according to the received abnormal request proportion of each edge server, the method further includes:
acquiring the load rate of each edge server in the edge servers capable of providing services;
and determining a load reference coefficient of the weight according to the load rate of each edge service end, and calculating a second current weight correction value of each edge service end by combining the abnormal request of each edge service end, and recording the second current weight correction value as a second weight value. .
In a second aspect, an embodiment of the present application provides a load balancing method, where the method includes:
the statistical module records the normal request times and the abnormal request times of each server in a preset period in real time, calculates an abnormal request proportion based on the normal request times and the abnormal request times, and determines whether the server fails or not based on the abnormal request proportion;
when a fault occurs, generating fault server information and sending the fault server information to a weight calculation module;
the weight calculation module calculates the weight value of each server in real time according to the abnormal request proportion, and adjusts the weight of the fault server according to the received fault server information;
and the load selection module determines a target server according to the weight value of each server in the weight calculation module and initiates calling aiming at the target server. .
In a third aspect, embodiments of the present application provide a computer storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present application provides a load balancing apparatus, including:
one or more processors;
storage means for storing one or more programs;
the device comprises a statistic module, a weight calculation module and a load selection module;
when executed by one or more processors, cause the one or more processors to implement the load balancing method described above.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in the embodiment of the application, a counting module records the normal request times and the abnormal request times of each server in a preset period in real time, an abnormal request proportion is calculated based on the normal request times and the abnormal request times, whether the server fails or not is determined based on the abnormal request proportion, when the server fails, fault server information is generated and sent to a weight calculating module, then the weight calculating module calculates the weight value of each server in real time according to the abnormal request proportion, the weight of the fault server is adjusted according to the received fault server information, and finally a load selecting module determines a target server according to the weight value of each server in the weight calculating module and calls the target server. According to the method and the device, the flow distribution proportion of the fault service end is reduced by adjusting the weight of the service end, so that the robustness of the system is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a schematic diagram of a load balancing system based on an intelligent cloud platform according to an embodiment of the present application;
fig. 2 is a schematic diagram of another load balancing system based on a smart cloud platform according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a load balancing method according to an embodiment of the present application;
fig. 4 is a schematic diagram of a fault sensing method provided in an embodiment of the present application;
fig. 5 is a schematic diagram of a failover method provided in an embodiment of the present application;
fig. 6 is an intelligent transportation cloud control platform based on cloud-edge collaboration provided by an embodiment of the present application;
fig. 7 is a schematic structural diagram of a load balancing apparatus according to an embodiment of the present application;
fig. 8 is a schematic diagram of a storage medium according to an embodiment of the present application.
Detailed Description
The following description and the drawings sufficiently illustrate specific embodiments of the invention to enable those skilled in the art to practice them.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
In the description of the present invention, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The application provides a load balancing system, method, storage medium and load balancer based on an intelligent cloud platform, so as to solve the problems in the related technical problems. In the technical solution provided by the present application, the flow distribution ratio of the abnormal server is reduced by adjusting the weight of the server in the present application, so as to improve the robustness of the system, and the following description will be made in detail by using an exemplary embodiment.
Referring to fig. 1, fig. 1 is a schematic diagram of a load balancing system based on a smart cloud platform according to an embodiment of the present application, where the system includes: the system comprises a service request end, a service cloud platform and a service end; when the server is arranged inside the service cloud platform, the service cloud platform comprises a load balancer and a plurality of servers; the load balancer comprises a statistic module, a weight calculation module and a load selection module; the service request terminal is used for generating a service request and sending the service request to the service cloud platform; the load selection module is used for acquiring the weight value of each service end from the weight calculation module when a service request is received, determining a target service end according to the weight value and initiating calling aiming at the target service end; the statistical module is used for recording the request normal times and the request abnormal times of each server in a preset period in real time, calculating the abnormal request proportion of each server according to the request normal times and the request abnormal times, determining abnormal server information according to the abnormal request proportion of each server, and sending the abnormal server information and the abnormal request proportion of each server to the weight calculation module; and the weight calculation module is used for calculating the current weight value of each server according to the received abnormal request proportion of each server and adjusting the current weight of the abnormal server corresponding to the abnormal server information to be target weight according to the received abnormal server information.
In this embodiment, when determining a target server according to the weight values, the weight values of each server are arranged in a descending order to obtain the arranged weight values, then a server corresponding to an initial weight value (the value with the largest weight) is selected from the arranged weight values, and finally the server corresponding to the initial weight value is determined as the target server.
The descending order is arranged from large weight value to small weight value, and the initial weight is the first maximum weight value.
In this embodiment, the abnormal request proportion of each server is calculated according to the number of times of normal requests and the number of times of abnormal requests, and the ratio of the number of times of normal requests to the number of times of abnormal failures is determined as the abnormal request proportion of each server.
Specifically, the service request exception includes a service response aging exception, and when the service response time of a certain server is greater than a preset service response time threshold, the service request response is considered to be abnormal, and the abnormal service request is recorded as an exception request.
In addition, the service exception may also include that the server does not respond or responds with an error, etc.
In this embodiment, when determining the abnormal server information according to the abnormal request proportion of each server, first, it is determined whether the abnormal request proportion of each server is greater than a preset threshold one by one, a plurality of determination results are generated, then, a determination result that the abnormal request proportion is greater than the preset threshold is selected from the plurality of determination results, then, the server corresponding to the determination result that the abnormal request proportion is greater than the preset threshold is determined as the abnormal server, and finally, the abnormal server information is generated according to the parameter information of the abnormal server.
In this embodiment, when the current weight of the abnormal server corresponding to the abnormal server information is adjusted to the target weight according to the received abnormal server information, first, when the abnormal server information is received, the abnormal server is determined based on the abnormal server information, then, the current weight of the abnormal server is obtained, then, the preset weight table is obtained, the target weight corresponding to the current weight is determined from the preset weight table, and finally, the current weight of the abnormal server is adjusted to the target weight.
Specifically, the preset weight table mainly includes fields including a server identifier, an abnormal service request duration, an abnormal request proportion, a current weight corresponding to each abnormal request proportion, and a target weight adjusted in a next stage.
Further, please refer to fig. 2, fig. 2 is a schematic diagram of another load balancing system based on a smart cloud platform according to an embodiment of the present application, where the system includes a service request end, a service cloud platform, and a service end;
when the server is arranged outside the service cloud platform, the service cloud platform comprises a load balancer and a service register; the service end is a plurality of edge service ends; the load balancer comprises a statistic module, a weight calculation module and a load selection module; the service request terminal is used for generating a service request and sending the service request to the service cloud platform; the load selection module is used for determining the identification information of the edge service end according to the service form registered in the service register when receiving a service request, acquiring the current weight value of each edge service end from the weight calculation module according to the identification information of the edge service end, determining a target edge service end according to the weight values, and calling the target edge service end; the statistical module is used for recording the request normal times and the request abnormal times of each server in a preset period in real time, calculating the abnormal request proportion of each server according to the request normal times and the request abnormal times, determining abnormal server information according to the abnormal request proportion of each server, and sending the abnormal server information and the abnormal request proportion of each server to the weight calculation module; and the weight calculation module is used for calculating the current weight value of each edge server according to the received abnormal request proportion of each edge server and adjusting the current weight of the abnormal edge server corresponding to the abnormal edge server information into a target weight according to the received abnormal edge server information.
In an embodiment, a current weight value of each edge server is obtained by calculation according to a received abnormal request proportion of each edge server, when at least two edge servers which have the same weight value and can provide the edge servers exist, a distance between each edge server and a service request server is calculated to obtain a distance value of each edge server, a reference coefficient of a weight is determined according to the distance between the distance value of each edge server and the distance between the service request servers, and a first correction value of the current weight of each edge server is calculated by combining the abnormal request of each edge server and is recorded as a first weight value.
And adjusting the weight coefficient corresponding to each edge server according to the distance between each edge server and the request end. Specifically, when the current weight value of each edge server is calculated according to the received abnormal request proportion of each edge server, the distance between each edge server and the service request end in the edge servers capable of providing service is firstly calculated to obtain the distance value of each edge server, then a first reference coefficient for calculating the weight is determined according to the distance value of each edge server, and a first correction value of the current weight of each edge server is calculated by combining the abnormal request proportion of each edge server and is recorded as a first weight value;
in another embodiment, the weight of each edge server is adjusted according to the difference of the load rates of the edge servers, specifically, the load rate of each edge server in the edge servers capable of providing services is calculated first to obtain the load rate of each edge server, then a second reference coefficient for calculating the weight is determined according to the load rate of each edge server, and a second correction value of the current weight of each edge server is calculated by combining the abnormal request proportion of each edge server and is recorded as a second weight value.
In the embodiment of the application, a counting module records the normal request times and the abnormal request times of each server in a preset period in real time, an abnormal request proportion is calculated based on the normal request times and the abnormal request times, whether the server fails or not is determined based on the abnormal request proportion, when the server fails, abnormal server information is generated and sent to a weight calculating module, then the weight calculating module calculates the weight value of each server in real time according to the abnormal request proportion, the weight of the abnormal server is adjusted according to the received abnormal server information, and finally a load selecting module determines a target server according to the weight value of each server in the weight calculating module and calls the target server. According to the method and the device, the flow distribution proportion of the abnormal server is reduced by adjusting the weight of the server, so that the robustness of the system is improved.
The following describes the load balancing method provided by the embodiment of the present application in detail with reference to fig. 3 to fig. 6. The method may be implemented in dependence on a computer program, operable on a load balancing device based on the von neumann architecture. The computer program may be integrated into the application or may run as a separate tool-like application.
Please refer to fig. 3, which is a flowchart illustrating a load balancing method according to an embodiment of the present application. As shown in fig. 1, the method of the embodiment of the present application may include the following steps:
s101, a counting module records the normal request times and the abnormal request times of each server in a preset period in real time, calculates an abnormal request proportion based on the normal request times and the abnormal request times, and determines whether the server fails or not based on the abnormal request proportion;
the statistical module, the weight calculation module and the load selection module are arranged in a load balancer, and the load balancer is arranged on the service cloud platform.
Generally, when a service request of a service request end is received in a service cloud platform, the request is received through a load selection module, a weight value of each service end in a weight calculation module and a preset algorithm are obtained to determine that the service end with the largest weight responds, when the service request is responded normally, a normal response is recorded by a counting module, when the service request is responded abnormally, an abnormal response is recorded by the counting module, and the record of the normal response and the abnormal response comprises the time of the service request end, the abnormal service end, the normal/abnormal response and the like.
Further, the preset algorithm may be a round robin method, a random weighting algorithm.
In this embodiment of the application, as shown in fig. 4, when the server normally responds to a service request of the service request terminal once, the number of times of normal request of the statistics module is increased by 1, and every time of abnormality/timeout is increased by +1, in a statistics period, an abnormality request ratio is calculated according to the counted number of times, when the abnormality request ratio in the period exceeds a preset threshold, the statistics module sends information of the abnormal server terminal to the weighting module, and the weighting module adjusts the weighting value of the abnormal server terminal.
S102, when a fault occurs, generating abnormal server information and sending the abnormal server information to a weight calculation module;
s103, the weight calculation module calculates the weight value of each server in real time according to the abnormal request proportion, and adjusts the weight of the abnormal server according to the received abnormal server information;
and S104, the load selection module determines a target server according to the weight value of each server in the weight calculation module and initiates calling aiming at the target server.
In this embodiment of the application, the weight calculation module is responsible for calculating the weight value of each server, assuming that the weight is 100 when no fault occurs, when a server fails in the current statistical period (15 seconds), the weight is immediately adjusted to 1, that is, the traffic allocated by the server is 1% of other instances, and when the traffic is relatively small, the server hardly allocates the traffic. If no fault occurs in the next statistical period (15 seconds), the weight of the service end is increased to 4; if no fault occurs in the next 15 seconds, the weight of the service end is adjusted to 64; at the next 15 seconds, the weight is adjusted to 100, and normal is restored. If a failure occurs again within any one time window, the traffic weight is adjusted to 1.
In a possible implementation manner, for example, as shown in fig. 5, when the load selection module initiates a request to the server from the service request end, the load selection module calculates the weight of the server by obtaining the weight proportion of the abnormal request sent by the weight module according to the statistics module, and then selects a specific server by using a weight distribution algorithm to initiate a call.
Further, for example, as shown in fig. 2, when a service end is disposed outside the service cloud platform, that is, distributed and deployed in each edge node in a cluster form, a service requester initiates a service request (the service request may be a positioning or navigation service request) through the service requester, and after a load selection module located in the cloud service platform receives the service request, according to a service form registered in a service registry of the cloud service platform, an edge service segment number or a container number where the edge service end is located is determined, and weight values of a plurality of edge service ends are obtained from a weight calculation module through the edge service segment number or the container number.
When a plurality of edge servers exist, during initialization, the flow distribution proportion of each edge server is considered to be consistent by default and is 100 by default, the load selection module selects the server to respond to the service request according to a polling method, a hash algorithm, a weighted random algorithm and the like, when the server responds to the service request normally, a normal response record is added in the statistical module, when the server responds to the service request abnormally, an abnormal response record is added in the statistical module, the normal response record and the abnormal response record in each period are counted, and when the proportion of the abnormal response exceeds a preset threshold, the flow proportion of the edge server is adjusted (for example, the flow is adjusted from 100 to 1) through the weight calculation module so as to reduce the service request distributed to the edge server.
Further, when a plurality of edge servers can provide services for the same service request (i.e. a plurality of service ranges), but the service coverage areas of the plurality of edge servers are inconsistent (for example, the plurality of servers are distributed in an edge calculation module on the road side), when calculating the weight, the distance between the edge server and the request server is used as a reference coefficient of a weight calculation module and recorded as a first reference coefficient, and a first correction value of the current weight of each edge server is calculated by combining the abnormal request of each edge server and recorded as a first weight value. The closer the edge server side is to the request side, the shorter the service response time is, the stronger the timeliness is, and the weighted value of the edge server side is larger.
According to the weight value after the distance adjustment, namely a first weight value calculation formula is as follows:
Figure BDA0003319448110000101
wherein alpha is1To obtain the first weight, alpha, after adjustment according to the distance0The weight value distributed by the weight calculation module, namely the target weight, b is more than or equal to 1, d is the distance between the edge server and the request end, A is a distance influence constant, and beta1And d is a first reference coefficient, and b is an influence index of the first reference coefficient.
Due to the influence of load rate, the weight influence factor influenced by load
Figure BDA0003319448110000111
In another preferred embodiment, in the process of calculating the weight coefficient, the load condition of each edge server is also considered as an influencing factor of the whole weight distribution, and is referred to as a second reference coefficient, specifically, the load rate of each edge server in the edge servers capable of providing services is first calculated to obtain the load rate of each edge server, and then the second reference coefficient for calculating the weight is determined according to the load rate of each edge server. The higher the load of the edge server, the less the computing resources can be allocated, and when the load balancing module selects the load, the weight value allocated to the load balancing module is appropriately reduced to reduce the load pressure of the edge server.
The weight value after the load adjustment is as follows:
α2=α0-β*lx+ B, wherein, α2The weight value adjusted according to the load condition is recorded as a second weight value, alpha0The initial weight value is calculated by the weight calculation module, namely the target weight value is obtained by searching and calculating through a preset weight table based on the current weight, and x is the influence index of the load. Beta is the load coefficient of the edge service end, l is the current load of the edge service end, x is more than or equal to 1, and B is a load influence constant.
Is affected by the load rateWeight impact factor of an impact
Figure BDA0003319448110000112
In a preferred embodiment, when the distribution weight of a server is influenced by both the load rate and the distance, the adjusted weight value is recorded as a third weight value, and the third weight value α is recorded as the third weight value3=α12Or
α3=α21
In the embodiment of the application, a counting module records the normal request times and the abnormal request times of each server in a preset period in real time, an abnormal request proportion is calculated based on the normal request times and the abnormal request times, whether the server fails or not is determined based on the abnormal request proportion, when the server fails, abnormal server information is generated and sent to a weight calculating module, then the weight calculating module calculates the weight value of each server in real time according to the abnormal request proportion, the weight of the abnormal server is adjusted according to the received abnormal server information, and finally a load selecting module determines a target server according to the weight value of each server in the weight calculating module and calls the target server. According to the method and the device, the flow distribution proportion of the abnormal server is reduced by adjusting the weight of the server, so that the robustness of the system is improved.
Referring to fig. 6, a fault sensing and load balancing method based on cloud-edge coordination is provided for an embodiment of the present application, and is used for an intelligent transportation network cloud platform.
As shown in fig. 6, the intelligent transportation cloud platform and the plurality of edge terminals connected with the intelligent transportation cloud platform are provided with load balancers.
The load strategy of the load balancer arranged on the intelligent traffic cloud platform is as follows:
when a service request is received, firstly, according to the position and the area where the service request is located, searching a service example capable of providing equipment for the service request (according to the position where the intelligent terminal is located and the request service range, determining that one of the edge sides 1, 2 or 3 is a service providing end), when a plurality of service examples are located in the service providing end (edge end), selecting one service end to respond according to a polling method, a random method or a weighted random method by a load balancer located on an edge platform, recording a response result by the load balancer, adding 1 to a record of normal response when the response is normal, adding 1 to a record of abnormal response when the response is abnormal, counting an abnormal corresponding proportion of each period according to a preset period, and when the abnormal response proportion exceeds a preset threshold, adjusting the distribution weight and proportion of the service end, such as reducing the distribution weight from 100 to 1, if no fault occurs in the next statistical period, the weight of the service instance is increased to 4; if no fault has occurred during the next statistical period, the weight of the instance is adjusted to 64; in the next statistical period, the weight is adjusted to 100, and the normal state is recovered.
In another embodiment, when a service registry in an intelligent cloud platform finds out more than two edge computing terminals capable of providing service responses according to a service request, and a load balancer allocates corresponding terminals of the service, the service response time of the edge computing terminals needs to be considered, where the service response time refers to the time required by each edge computing terminal to process the service request with unit time as a reference, and is t1, t2, and t3, respectively, and the shorter the response time, the faster the response, and the higher the allocation weight.
In one embodiment, the weight may be adjusted according to response time based on the target weight obtained by the weight assignment module, and the adjusted weight may be calculated according to response implementation,
αt=α0+(β/tn)m+C
wherein α _ t is an adjustment coefficient of time, α _0 is an initial weight value, i.e., a target weight obtained by the weight distribution module, tn is a response time of the nth edge calculation end, C is a time influence constant, m is greater than or equal to 1, and m is a time influence index. In the embodiment of the present application, when the time adjustment weight can be determined, the response time adjustment weight is preferentially adopted as the weight of each edge server. And selecting a unique edge calculation end from the plurality of edge calculation ends by adopting a weighted random distribution method.
(1) When the edge computing side determines that only one service instance exists in the edge computing side, namely the service instance is determined as a service provider,
providing a response for the service request, and after the service response is completed, sending a response result (normal response or abnormal response) to the intelligent traffic cloud control platform;
(2) when the edge computing end has a plurality of service instances, selecting one embodiment to respond according to the weight distribution of each embodiment counted by the load balancer positioned at the edge computing end, recording the result of service response, and determining whether to adjust the distribution weight of the service end according to the proportion of abnormal response of the service end in a counting period. The adjustment strategy for assigning weights is as described in the above embodiments.
In the embodiment, the edge computing terminal is arranged at the road side, can receive intelligent sensing data at the road side, computes a service response result corresponding to the service request according to the service request, and sends the service response result to the intelligent transportation cloud control platform, or directly sends the response result of the edge computing terminal to the request terminal. But the result of whether the response is normal or not is fed back to the edge computing end and the load balancing module of the intelligent traffic platform.
In some preferred embodiments, the services in the edge computing side are deployed in the form of micro-services, either in a container or outside the container.
The embodiment of the present application further provides a load balancer corresponding to the load balancing method provided in the foregoing embodiment, so as to execute the load balancing method.
Please refer to fig. 7, which illustrates a schematic diagram of a load balancing apparatus according to some embodiments of the present application. As shown in fig. 7, the load balancer 2 includes: the system comprises a processor 200, a memory 201, a bus 202 and a communication interface 203, wherein the processor 200, the communication interface 203 and the memory 201 are connected through the bus 202; the memory 201 stores a computer program that can be executed on the processor 200, and the processor 200 executes the load balancing method provided in any of the foregoing embodiments when executing the computer program.
The Memory 201 may include a high-speed Random Access Memory (RAM) and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 203 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
Bus 202 can be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 201 is used for storing a program, and the processor 200 executes the program after receiving an execution instruction, and the load balancing method disclosed in any of the foregoing embodiments of the present application may be applied to the processor 200, or implemented by the processor 200.
The processor 200 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 200. The Processor 200 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 201, and the processor 200 reads the information in the memory 201 and completes the steps of the method in combination with the hardware thereof.
The load balancer provided by the embodiment of the application and the load balancing method provided by the embodiment of the application have the same inventive concept and have the same beneficial effects as the method adopted, operated or realized by the load balancer.
Referring to fig. 8, the computer-readable storage medium is an optical disc 30, on which a computer program (i.e., a program product) is stored, and when the computer program is executed by a processor, the computer program executes the load balancing method provided in any of the foregoing embodiments.
It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory, or other optical and magnetic storage media, which are not described in detail herein.
The computer-readable storage medium provided by the above-mentioned embodiment of the present application and the load balancing method provided by the embodiment of the present application have the same beneficial effects as the method adopted, operated or implemented by the application program stored in the computer-readable storage medium.
The above description is only for the preferred embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A load balancing system based on an intelligent cloud platform is characterized by comprising a service request end, a service cloud platform and a service end;
when the server is arranged inside the service cloud platform, the service cloud platform comprises a load balancer and a plurality of servers; the load balancer comprises a statistic module, a weight calculation module and a load selection module;
the service request terminal is used for acquiring a service request and sending the service request to the service cloud platform;
the load selection module is used for acquiring a weight value of each server from the weight calculation module when a service request is received, determining a target server according to the weight value, and initiating calling aiming at the target server;
the statistical module is used for recording the request normal times and the request abnormal times of each server in a preset period in real time, calculating the abnormal request proportion of each server according to the request normal times and the request abnormal times, determining abnormal server information according to the abnormal request proportion of each server, and sending the abnormal server information and the abnormal request proportion of each server to the weight calculation module;
the weight calculation module is used for calculating the current weight value of each server according to the received abnormal request proportion of each server, and adjusting the current weight of the abnormal server corresponding to the abnormal server information to be target weight according to the received abnormal server information.
2. The system according to claim 1, wherein the determining the target server according to the weight value comprises:
the weighted values of each server are arranged in a descending order to obtain the arranged weighted values;
selecting a server corresponding to the maximum weight value from the arranged weight values;
and determining the server corresponding to the maximum weight value as a target server.
3. The system according to claim 1, wherein said determining abnormal server information according to said abnormal request of each server comprises:
judging whether the abnormal request proportion of each server is larger than a preset threshold value one by one, and generating a plurality of judgment results;
selecting a judgment result with the abnormal request proportion larger than a preset threshold value from the plurality of judgment results;
and determining the server corresponding to the judgment result that the abnormal request proportion is greater than the preset threshold value as an abnormal server.
4. The system according to claim 1, wherein the adjusting, according to the received abnormal server information, a current weight of an abnormal server corresponding to the abnormal server information to a target weight comprises:
when receiving abnormal server information, determining an abnormal server based on the abnormal server information;
acquiring the current weight of the abnormal server;
acquiring a preset weight table, and determining a target weight corresponding to the current weight from the preset weight table;
and adjusting the current weight of the abnormal server to be the target weight.
5. The system of claim 1,
when the server is arranged outside the service cloud platform, the service cloud platform comprises a load balancer and a service register; the service end is a plurality of edge service ends; the load balancer comprises a statistic module, a weight calculation module and a load selection module;
the service request end is used for generating a service request and sending the service request to the service cloud platform;
the load selection module is used for determining identification information of edge service ends according to a service form registered in the service register when a service request is received, acquiring a current weight value of each edge service end from the weight calculation module according to the identification information of the edge service ends, determining a target edge service end according to the weight value, and initiating calling aiming at the target edge service end;
the statistical module is used for recording the request normal times and the request abnormal times of each server in a preset period in real time, calculating the abnormal request proportion of each server according to the request normal times and the request abnormal times, determining abnormal server information according to the abnormal request proportion of each server, and sending the abnormal server information and the abnormal request proportion of each server to the weight calculation module;
the weight calculation module is configured to calculate a current weight value of each edge server according to the received exception request of each edge server, and adjust a current weight of an exception edge server corresponding to the exception edge server information to a target weight according to the received exception edge server information.
6. The system according to claim 5, wherein said calculating a current weight value of each edge server according to the received abnormal request proportion of each edge server comprises:
when there are at least two edge servers with the same weight value,
calculating the distance between each edge server in the edge servers capable of providing the service and the service request end to obtain the distance value of each edge server;
and determining a reference coefficient of the weight according to the distance value of each edge server, and calculating a first correction value of the current weight of each edge server by combining the abnormal request of each edge server, and recording the first correction value as a first weight value.
7. The system according to claim 5, wherein after calculating the current weight value of each edge server according to the received abnormal request proportion of each edge server, further comprising:
acquiring the load rate of each edge server in the edge servers capable of providing services;
and determining a load reference coefficient of the weight according to the load rate of each edge service end, and calculating a second current weight correction value of each edge service end by combining the abnormal request of each edge service end, and recording the second current weight correction value as a second weight value.
8. A load balancing method for a service cloud platform, the method comprising:
the statistical module records the normal request times and the abnormal request times of each server in a preset period in real time, calculates an abnormal request proportion based on the normal request times and the abnormal request times, and determines whether the server fails or not based on the abnormal request proportion;
when a fault occurs, generating fault server information and sending the fault server information to a weight calculation module;
the weight calculation module calculates the weight value of each server in real time according to the abnormal request proportion, and adjusts the weight of the fault server according to the received fault server information;
and the load selection module determines a target server according to the weight value of each server in the weight calculation module and initiates calling aiming at the target server.
9. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method steps of claim 8.
10. A load balancing apparatus comprising:
one or more processors;
storage means for storing one or more programs;
the device comprises a statistic module, a weight calculation module and a load selection module;
when executed by the one or more processors, cause the one or more processors to implement the method of claim 8.
CN202111241808.5A 2021-10-25 2021-10-25 Load balancing system, method, medium and device based on intelligent cloud platform Pending CN114157666A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111241808.5A CN114157666A (en) 2021-10-25 2021-10-25 Load balancing system, method, medium and device based on intelligent cloud platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111241808.5A CN114157666A (en) 2021-10-25 2021-10-25 Load balancing system, method, medium and device based on intelligent cloud platform

Publications (1)

Publication Number Publication Date
CN114157666A true CN114157666A (en) 2022-03-08

Family

ID=80458817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111241808.5A Pending CN114157666A (en) 2021-10-25 2021-10-25 Load balancing system, method, medium and device based on intelligent cloud platform

Country Status (1)

Country Link
CN (1) CN114157666A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979157A (en) * 2022-05-17 2022-08-30 南昌智能新能源汽车研究院 Load balancing method, system, storage medium and computer based on SOME/IP protocol
CN115150400A (en) * 2022-07-05 2022-10-04 普联技术有限公司 Service fault processing method and device, cloud service platform and storage medium
CN115174686A (en) * 2022-07-12 2022-10-11 江苏苏宁银行股份有限公司 Method and device for dynamically adjusting weights of multiple service channels based on service efficiency
CN115174586A (en) * 2022-09-02 2022-10-11 常州尊尚信息科技有限公司 Automatic load balancing system and method based on cloud platform
CN115190066A (en) * 2022-06-02 2022-10-14 武汉众邦银行股份有限公司 Method for calculating routing weight proportion based on weighted random algorithm
CN115242793A (en) * 2022-07-05 2022-10-25 杭州萤石软件有限公司 Streaming media load balancing method, device and system
CN115309561A (en) * 2022-10-11 2022-11-08 中诚华隆计算机技术有限公司 Method and system for performing task cooperative processing based on task cooperative processing chip
CN116016675A (en) * 2022-11-29 2023-04-25 北京奇艺世纪科技有限公司 Service request processing method and device, gateway equipment and storage medium
CN117097621A (en) * 2023-10-18 2023-11-21 易方信息科技股份有限公司 Method, system, device and storage medium for discovering dynamic weights based on services

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105262841A (en) * 2015-11-06 2016-01-20 浪潮软件集团有限公司 CDN network load balancing implementation method and CDN scheduling server
US20170279877A1 (en) * 2016-03-28 2017-09-28 Industrial Technology Research Institute Load balancing method, load balancing system, load balancing device and topology reduction method
CN110022227A (en) * 2019-03-07 2019-07-16 阿里巴巴集团控股有限公司 Method for processing business, device, equipment and storage medium
CN110602254A (en) * 2019-10-08 2019-12-20 腾讯科技(深圳)有限公司 Method, device and system for realizing load balance
CN112583895A (en) * 2020-11-27 2021-03-30 北京智芯微电子科技有限公司 TCP communication method, system and device
CN113242301A (en) * 2021-05-11 2021-08-10 鸬鹚科技(深圳)有限公司 Method and device for selecting real server, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105262841A (en) * 2015-11-06 2016-01-20 浪潮软件集团有限公司 CDN network load balancing implementation method and CDN scheduling server
US20170279877A1 (en) * 2016-03-28 2017-09-28 Industrial Technology Research Institute Load balancing method, load balancing system, load balancing device and topology reduction method
CN110022227A (en) * 2019-03-07 2019-07-16 阿里巴巴集团控股有限公司 Method for processing business, device, equipment and storage medium
CN110602254A (en) * 2019-10-08 2019-12-20 腾讯科技(深圳)有限公司 Method, device and system for realizing load balance
CN112583895A (en) * 2020-11-27 2021-03-30 北京智芯微电子科技有限公司 TCP communication method, system and device
CN113242301A (en) * 2021-05-11 2021-08-10 鸬鹚科技(深圳)有限公司 Method and device for selecting real server, computer equipment and storage medium

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979157A (en) * 2022-05-17 2022-08-30 南昌智能新能源汽车研究院 Load balancing method, system, storage medium and computer based on SOME/IP protocol
CN114979157B (en) * 2022-05-17 2024-03-22 南昌智能新能源汽车研究院 Load balancing method, system, storage medium and computer based on SOME/IP protocol
CN115190066A (en) * 2022-06-02 2022-10-14 武汉众邦银行股份有限公司 Method for calculating routing weight proportion based on weighted random algorithm
CN115190066B (en) * 2022-06-02 2023-07-07 武汉众邦银行股份有限公司 Routing weight proportion calculating method based on weighted random algorithm
CN115150400A (en) * 2022-07-05 2022-10-04 普联技术有限公司 Service fault processing method and device, cloud service platform and storage medium
CN115242793A (en) * 2022-07-05 2022-10-25 杭州萤石软件有限公司 Streaming media load balancing method, device and system
CN115150400B (en) * 2022-07-05 2024-04-30 普联技术有限公司 Service fault processing method and device, cloud service platform and storage medium
CN115242793B (en) * 2022-07-05 2023-08-25 杭州萤石软件有限公司 Streaming media load balancing method, device and system
CN115174686B (en) * 2022-07-12 2024-03-15 江苏苏宁银行股份有限公司 Method and device for dynamically adjusting weights of multiple service channels based on service efficiency
CN115174686A (en) * 2022-07-12 2022-10-11 江苏苏宁银行股份有限公司 Method and device for dynamically adjusting weights of multiple service channels based on service efficiency
CN115174586A (en) * 2022-09-02 2022-10-11 常州尊尚信息科技有限公司 Automatic load balancing system and method based on cloud platform
CN115309561A (en) * 2022-10-11 2022-11-08 中诚华隆计算机技术有限公司 Method and system for performing task cooperative processing based on task cooperative processing chip
CN116016675A (en) * 2022-11-29 2023-04-25 北京奇艺世纪科技有限公司 Service request processing method and device, gateway equipment and storage medium
CN117097621A (en) * 2023-10-18 2023-11-21 易方信息科技股份有限公司 Method, system, device and storage medium for discovering dynamic weights based on services
CN117097621B (en) * 2023-10-18 2024-03-19 易方信息科技股份有限公司 Method, system, device and storage medium for discovering dynamic weights based on services

Similar Documents

Publication Publication Date Title
CN114157666A (en) Load balancing system, method, medium and device based on intelligent cloud platform
CN110768912B (en) API gateway current limiting method and device
CN109040190B (en) Scheduling method, device and computer readable storage medium
CN111262795B (en) Service interface-based current limiting method and device, electronic equipment and storage medium
CN110188990B (en) Resource request and fund request splitting method, device and equipment
CN108306874B (en) Service interface access current limiting method and device
US11107079B2 (en) Methods, systems, apparatuses and devices for verifying credibility of consortium blockchain
CN111367651A (en) Service current limiting system, method and device and electronic equipment
CN113220483A (en) Switching method and system for block chain consensus main node
CN107645456B (en) Flow control method and flow control system
CN113242297A (en) Service system and service state adjusting method
CN110933136A (en) Service node selection method, device, equipment and readable storage medium
CN111767142A (en) Current limiting threshold setting method of service node and server side equipment
CN107733805B (en) Service load scheduling method and device
CN116149846A (en) Application performance optimization method and device, electronic equipment and storage medium
CN108647102B (en) Service request processing method and device of heterogeneous system and electronic equipment
CN116382892B (en) Load balancing method and device based on multi-cloud fusion and cloud service
US11030024B2 (en) Assigning a severity level to a computing service using tenant telemetry data
CN116010450A (en) Method, apparatus, electronic device and computer readable medium for resource allocation
CN110278241B (en) Registration request processing method and device
CN114285903B (en) Request processing method, device and system and electronic equipment
KR101719724B1 (en) Resource management system and method, and method for deciding resource price by the same system
CN109522118B (en) Service processing method, device, server and readable storage medium
CN110719306B (en) Network request limiting method, computer equipment and storage medium
CN111191891A (en) Evaluation accuracy calibration method and device, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination