WO2023207189A1 - Procédé et système d'équilibrage de charge, support de stockage informatique et dispositif électronique - Google Patents

Procédé et système d'équilibrage de charge, support de stockage informatique et dispositif électronique Download PDF

Info

Publication number
WO2023207189A1
WO2023207189A1 PCT/CN2022/142981 CN2022142981W WO2023207189A1 WO 2023207189 A1 WO2023207189 A1 WO 2023207189A1 CN 2022142981 W CN2022142981 W CN 2022142981W WO 2023207189 A1 WO2023207189 A1 WO 2023207189A1
Authority
WO
WIPO (PCT)
Prior art keywords
cloud host
load balancing
target
domain name
idle
Prior art date
Application number
PCT/CN2022/142981
Other languages
English (en)
Chinese (zh)
Inventor
刘凯
赵建星
樊建刚
Original Assignee
京东科技信息技术有限公司
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 京东科技信息技术有限公司 filed Critical 京东科技信息技术有限公司
Publication of WO2023207189A1 publication Critical patent/WO2023207189A1/fr

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
    • H04L67/1023Server selection for load balancing based on a hash applied to IP addresses or costs
    • 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

Definitions

  • the present disclosure relates to the technical field of cloud computing, and in particular to a load balancing method, a load balancing system, a computer storage medium and an electronic device.
  • Kubernetes clusters deployed on private cloud bare metal architecture usually cannot use LoadBalancer type services. Because Kubernetes itself does not provide an implementation of a network load balancer (a service of type LoadBalancer) for bare metal clusters. If the Kubernetes cluster is not running on the IaaS (Infrastructure as a Service, Infrastructure as a Service) platform of the public cloud, LoadBalancers will remain in the "suspended" state indefinitely when created, which means that only the public cloud vendor's own Kubernetes Support LoadBalancer.
  • IaaS Infrastructure as a Service, Infrastructure as a Service
  • MetalLB load balancers are generally used to solve the problem that private bare metal clusters cannot use LoadBalancer type services.
  • MetalLB supports two methods, namely Layer2 mode and BGP (Border Gateway Protocol) mode.
  • Layer2 mode has the problem of limited network bandwidth due to single-point forwarding.
  • BGP mode cannot effectively respond to node failures. When a node goes down, all nodes will stop working.
  • One or more embodiments of the present disclosure provide a load balancing method, a load balancing system, a computer storage medium, and an electronic device, thereby overcoming, at least to a certain extent, the problem in related technologies that a load balancing device is required to implement the load balancing function. .
  • a load balancing method which pre-configures a cloud host resource pool.
  • the cloud host resource pool includes multiple cloud hosts, and each cloud host is associated with a pre-allocated IP segment.
  • the method includes: in response to a load balancing instance creation request, scheduling at least two candidate cloud hosts from a cloud host resource pool; the load balancing instance is used to provide external client access; and selecting the IP segment corresponding to each of the candidate cloud hosts.
  • Select an idle IP call the domain name server to store at least two domain names corresponding to the idle IP; wherein, at least two of the idle IPs correspond to the same domain name; return the domain name to the client, so that the client starts from Obtain the target IP corresponding to the domain name from the domain name server; the target IP is any one of the at least two idle IPs; create the load balancing instance based on the target IP so that the client can pass the The load balancing instance establishes a connection with the target cloud host; the target IP is the IP corresponding to the load balancing instance, and the target cloud host is the candidate cloud host corresponding to the target IP.
  • a load balancing method is provided, which is applied to a target cloud host.
  • the method includes: receiving a business request sent by a client through a pre-created load balancing instance; based on the load balancing instance associated with the load balancing instance.
  • Load balancing strategy forwards the service request to the specified backend service.
  • a load balancing system including: a cloud host management module and a cloud host resource pool; the cloud host management module is used to manage a preconfigured cloud host resource pool, and the cloud host resource pool including a plurality of cloud hosts, each cloud host associated with a pre-allocated IP segment; the cloud host management module is used to respond to a load balancing instance creation request, dispatch at least two candidate cloud hosts from the cloud host resource pool ;
  • the load balancing instance is used to provide external client access; select an idle IP from the IP segment corresponding to each of the candidate cloud hosts, and call the domain name server to store at least two domain names corresponding to the idle IP; wherein, at least The two idle IPs correspond to the same domain name; the domain name is returned to the client, so that the client obtains the target IP corresponding to the domain name from the domain name server; the target IP is the at least two idle IP addresses.
  • any of the IPs create the load balancing instance based on the target IP, so that the client establishes a connection with the target cloud host through the load balancing instance;
  • the target IP is the IP corresponding to the load balancing instance,
  • the target cloud host is a candidate cloud host corresponding to the target IP;
  • the target cloud host is used to receive a service request sent by the client through the load balancing instance; based on the load balancing policy associated with the load balancing instance, Forward the service request to the designated backend service.
  • a computer storage medium is provided, a computer program is stored thereon, and when the computer program is executed by a processor, the load balancing method described in the first and second aspects is implemented.
  • an electronic device including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the operation via executing the executable instructions.
  • the load balancing method described in the first aspect and the second aspect is executed.
  • At least two candidate cloud hosts are scheduled from the cloud host resource pool, and one is selected from the IP segment corresponding to each cloud host.
  • Idle IP and call the domain name server to store the domain names corresponding to at least two idle IPs, and return the domain names to the client, which can avoid the technical problems of business interruption caused by calling a single cloud host for request forwarding each time when the cloud host fails. , improve the system’s emergency handling capabilities.
  • the target IP is associated with the load balancing instance, so that the client can establish a connection with the target cloud host through the load balancing instance, providing a new solution that can realize the load balancing function without using load balancing equipment, reducing operation and maintenance. Invest.
  • Figure 2 shows a schematic flow chart of the cloud host management module performing fault monitoring on the target cloud host in the embodiment of the present disclosure
  • Figure 3 shows a schematic flow chart of how to update the status of the backup cloud host so that the backup cloud host takes over the target cloud host in an embodiment of the present disclosure
  • Figure 4 shows a schematic flow chart of adding a cloud host to the cloud host resource pool in an embodiment of the present disclosure
  • Figure 5 shows a schematic flowchart of removing faulty cloud hosts from the cloud host resource pool in an embodiment of the present disclosure
  • Figure 6 shows a schematic flowchart of creating a load balancing instance in an embodiment of the present disclosure
  • Figure 7 shows a schematic flowchart of deleting a load balancing instance in an embodiment of the present disclosure
  • Figure 8 shows a schematic flow chart of how to manage a cloud host in an embodiment of the present disclosure
  • Figure 9 shows a schematic structural diagram of a load balancing system in a cloud environment in an embodiment of the present disclosure
  • FIG. 10 shows a schematic structural diagram of an electronic device in an exemplary embodiment of the present disclosure.
  • Example embodiments will now be described more fully with reference to the accompanying drawings.
  • Example embodiments may, however, be embodied in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concepts of the example embodiments.
  • the described features, structures or characteristics may be combined in any suitable manner in one or more embodiments.
  • numerous specific details are provided to provide a thorough understanding of embodiments of the disclosure.
  • those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details described, or other methods, components, devices, steps, etc. may be adopted.
  • well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the disclosure.
  • IaaS is a cloud computing delivery model that delivers computing resources in the form of virtualized operating systems, workload management software, hardware, network and storage services. It can also include the delivery of operating systems and virtualization technologies to managed resources.
  • a load balancer is a method that distributes network requests to available servers in a server cluster by managing incoming Web (World Wide Web, Global Wide Area Network) data traffic and increasing effective network bandwidth.
  • LoadBalancer used to allocate tasks to less busy servers when the traffic is heavy
  • Kubernetes clusters cannot use LoadBalancer type services.
  • MetalLB is usually used to solve the problem that bare metal Kubernetes clusters cannot use LoadBalancer type services.
  • MetalLB is a load balancer that specifically solves the pain point of being unable to use LoadBalancer type services in bare metal Kubernetes clusters.
  • MetalLB uses a standardized routing protocol so that external services on bare metal Kubernetes clusters also work as well as possible. That is, MetalLB can help you create LoadBalancer-type Kubernetes services in bare metal Kubernetes clusters.
  • MetalLB supports publishing allocated External IP in two ways, namely Layer2 mode and BGP mode.
  • Layer2 mode the assigned External IP will be bound to a Node node machine network card, and the External IP will be announced through ARP (Address Discovery Protocol) to make it reachable in the local network.
  • ARP Address Discovery Protocol
  • BGP mode can achieve load balancing across multiple nodes and can also implement fine-grained traffic control based on the BGP policy mechanism.
  • MetalLB's Layer 2 mode will have a single point problem. All traffic of the service is forwarded through a single point, and its network bandwidth may also become a bottleneck. In addition, Layer 2 mode requires the cooperation of the ARP client. When a failover occurs, MetalLB will send an ARP packet to announce changes in IP and MAC address mapping, and the address allocation process is slightly cumbersome.
  • MetalLB's BGP mode cannot handle failover gracefully.
  • all active connected clients will receive a "communication peer closes the connection" notification.
  • the BGP router performs a simple hash on the source IP (Internet Protocol), destination IP, and protocol type of the data packet, and determines which node to send it to based on the hash value.
  • Kubernetes cluster nodes are unstable. When a node holding an External IP goes down, most of the active links will become unavailable due to rehash.
  • a load balancing method is first provided, which overcomes, at least to a certain extent, the problem in related technologies that a load balancing device is required to implement the load balancing function.
  • FIG. 1 shows a schematic flowchart of a load balancing method in an embodiment of the present disclosure.
  • the execution subject of the load balancing method may be a server deploying a cloud host management module.
  • a load balancing method includes the following steps:
  • Step S110 In response to the load balancing instance creation request, schedule at least two candidate cloud hosts from the cloud host resource pool; the load balancing instance is used to provide external client access;
  • Step S120 select an idle IP from the IP segment corresponding to each candidate cloud host, and call the domain name server to store the domain names corresponding to at least two idle IPs; wherein, at least two idle IPs correspond to the same domain name;
  • Step S130 return the domain name to the client, so that the client obtains the target IP corresponding to the domain name from the domain name server;
  • the target IP is any one of at least two idle IPs;
  • Step S140 Create a load balancing instance based on the target IP so that the client establishes a connection with the target cloud host through the load balancing instance; the target IP is the IP of the load balancing instance, and the target cloud host is the candidate cloud host corresponding to the target IP.
  • At least two candidate cloud hosts are scheduled from the cloud host resource pool, and one is selected from the IP segment corresponding to each cloud host.
  • Idle IP and call the domain name server to store the domain names corresponding to at least two idle IPs, and return the domain names to the client, which can avoid the technical problems of business interruption caused by calling a single cloud host for request forwarding each time when the cloud host fails. , improve the system’s emergency handling capabilities.
  • the target IP is associated with the load balancing instance, so that the client can establish a connection with the target cloud host through the load balancing instance, which provides a new solution that can realize the load balancing function without resorting to load balancing equipment, reducing operation and maintenance. Invest.
  • Load Balance refers to balancing and allocating loads (work tasks) to multiple units to improve concurrent processing capabilities.
  • the role of load balancing is: first, to solve concurrency pressure and improve application processing performance (increase throughput and strengthen network processing capabilities); second, to provide failover and achieve high availability; third, to provide high availability by adding or reducing the number of servers. Website scalability (expansibility); fourth, security protection.
  • a cloud host resource pool may be pre-configured. For example, multiple cloud hosts may be pre-created to form a cloud host resource pool (that is, the cloud host resource pool includes multiple cloud hosts).
  • an IP segment can be assigned to each cloud host (each IP segment contains multiple IP addresses, for example: from 192.168.0.1 to 192.168.255.255, this is an IP segment), And start the load balancing service on each cloud host. Further, a notification message can be sent to the IaaS so that the IssS points the next hop of the IP segment to the cloud host.
  • step S110 After configuring the cloud host resource pool, if a load balancing instance creation request is received, step S110 can be entered. In step S110, in response to the load balancing instance creation request, at least two candidate cloud hosts are scheduled from the cloud host resource pool. ; The load balancing instance is used to provide external client access.
  • the cloud host management module when it receives the load balancing instance creation request, it can schedule at least two candidate cloud hosts from the cloud host resource pool. By scheduling at least two candidate cloud hosts, it can be ensured that when any candidate cloud host fails, there will be a backup cloud host to ensure the normal operation of the business.
  • the load balancing instance is a running load balancing service that is used to provide external client access.
  • At least two candidate cloud hosts can be scheduled from the cloud host resource pool according to a random algorithm, or at least two candidate cloud hosts can be scheduled from the cloud host resource pool using a preset round robin scheduling algorithm.
  • the situation is set by oneself, and this disclosure does not impose special restrictions on this.
  • step S120 an idle IP is selected from the IP segments corresponding to each candidate cloud host, and the domain name server is called to store domain names corresponding to at least two idle IPs; wherein at least two idle IPs correspond to the same domain name.
  • the cloud host management module may select an idle IP from the IP segment corresponding to each candidate cloud host. Furthermore, the above-mentioned idle IP can be bound to the loopback address of the candidate cloud host.
  • the loopback address is the IP inside the host IP stack. It is mainly used for network software testing and local machine inter-process communication, regardless of the program. , once data is sent using the loopback address, the protocol software returns it immediately without any network transmission.
  • the domain name corresponding to the above-mentioned idle IP can be generated according to the domain name rules (all idle IPs correspond to the same domain name). Furthermore, the DNS domain name server can be called to store the mapping relationship between the above-mentioned idle IP and the domain name, and will generate The domain name is returned to the Kubernetes cluster. For example, the selected free IPs are IP_1 and IP_2, and the generated domain name is dn1. Refer to Table 1. Table 1 shows the mapping relationship between the free IPs and domain names stored in the DNS domain name server.
  • IP_1 dn1 IP_2 dn1
  • the DNS domain name server By using the DNS domain name server to store the mapping relationship between free IPs and domain names, users only need to know the easy-to-remember domain name addresses without having to memorize a long list of IPs (which is not intuitive and very inconvenient for users to remember). For example, when a user enters a domain name in a browser, the browser can forward the domain name to the DNS domain name server so that the DNS domain name server determines the IP corresponding to the domain name. When the DNS domain name server returns the IP to the browser, the browser Requests can be made based on IP.
  • a domain name can be registered for the above-mentioned idle IP based on the following naming rules: $lbname.$lbnamespace.$suffix.
  • lbname is the load balancing identifier, for example, it can be a serial number or nickname
  • lbnamespace is the group to which the load balancing belongs.
  • the cloud hosts in the cloud host resource pool can be divided into multiple groups, and each group corresponds to a group identifier, then lbnamespace can be the group identifier to which the candidate cloud host belongs
  • suffix is the private network subdomain name agreed by the user, which can be set according to the actual situation. This disclosure does not impose special restrictions on this.
  • step S130 the domain name is returned to the client, so that the client obtains the target IP corresponding to the domain name from the domain name server; the target IP is any one of at least two idle IPs.
  • the registered domain name can be returned to the client, and then the client can send a domain name resolution request to the DNS domain name server to obtain the target IP corresponding to the above domain name from the DNS domain name server.
  • the domain name server can select a target IP from the idle IPs corresponding to the above domain name in a random or polling manner (for example: select IP_1 from IP_1 and IP_2 in Table 1 as the target IP) , and return the above target IP to the above client.
  • step S140 a load balancing instance is created based on the target IP, so that the client establishes a connection with the target cloud host through the load balancing instance; the target cloud host is a candidate cloud host corresponding to the target IP.
  • a load balancing instance can be created based on the above target IP (since the load balancing instance can provide external client access, when the target IP corresponding to the domain name is determined, it is equivalent to determining the target IP corresponding to the domain name.
  • the load balancing instance corresponding to the domain name the client can establish a connection with the target cloud host corresponding to the target IP through the load balancing instance.
  • the client After establishing a connection with the target cloud host, the client can send a service request to the above target IP. After receiving the above-mentioned business request, the target cloud host can forward the above-mentioned business request to the designated back-end service according to the load balancing policy contained in the above-mentioned load balancing instance to implement the load balancing function.
  • the above-mentioned business request is issued by the client and is used to request access to the Internet or request network resources.
  • the business request can also be called a service request message, an access request message, an access request packet, a service request packet, and an access request. Requests, etc. can be set according to the actual situation, and this disclosure does not impose special restrictions on this.
  • the above load balancing strategy can be any of the following:
  • Least Connections is an algorithm for communicating with the server that handles the least number of connections (number of sessions) among multiple servers. Even if the processing capabilities of each server are different and the processing volume of each business is also different, the load of the server can be reduced to a certain extent.
  • Weighted Least Connection is an algorithm that adds a weight to each server in the least connection algorithm. This algorithm allocates the number of connections to each server in advance and transfers business requests to the server with the smallest number of connections.
  • Random set random probability according to weight. The probability of collision on a section is high, but the larger the call volume, the more even the distribution will be, and the weight will be more even after using the weight according to probability, which is conducive to dynamically adjusting the provider weight.
  • 4IP hashing An algorithm that uniformly forwards packets from the same sender (or packets sent to the same destination) to the same server by managing the hashes of the sender IP and destination IP.
  • this algorithm can use flow (session) as a unit to ensure that communications from the same client can always be processed in the same server.
  • 5URL Uniform Resource Locator, Uniform Resource Locator
  • hash An algorithm that forwards requests sent to the same URL to the same server by managing the hash of the client request URL information.
  • the above-mentioned target cloud host can also periodically monitor the running status of each back-end service.
  • the CPU Central Processing Unit, central processing
  • the CPU occupancy rate of each back-end service can be obtained.
  • Parameters such as memory usage and disk usage, among which the above parameters can be obtained through the task manager that comes with the backend service.
  • the running status of the backend service can be determined based on the above parameters. For example, when the CPU occupancy/memory occupancy/disk occupancy is greater than or equal to the preset threshold, it can be determined that the running status of the above backend service is abnormal. When the above CPU occupancy/memory occupancy/disk occupancy are all less than When the above preset threshold is reached, it can be determined that the running status of the above backend service is normal.
  • the data stored on the above-mentioned back-end service can be backed up, and then the back-end service with abnormal running status can be eliminated.
  • the above-mentioned cloud host management module can also perform fault monitoring on the target cloud host.
  • Figure 2 shows the cloud host management module in the embodiment of the present disclosure monitoring the target cloud host.
  • step S201 the operating status of the target cloud host is periodically monitored.
  • the cloud host management module can periodically monitor the operating status of the target cloud host. For example, the cloud host management module can send a heartbeat detection message to the target cloud host every 2 seconds (the specific duration can be set according to the actual situation, and this disclosure does not specifically limit this).
  • the heartbeat response message of the cloud host is used to determine whether the operating status of the target cloud host is normal. For example, if the heartbeat response message returned by the target cloud host is received within a preset time period, it can be determined that the operating status of the target cloud host is normal; otherwise, it can be determined that the operating status of the target cloud host is abnormal.
  • step S202 in response to detecting abnormal operating status of the target cloud host, the target cloud host is marked as unschedulable.
  • step S203 if the abnormal running status of the target cloud host is detected, it can be determined whether the IP segments bound to the target cloud host have been released (that is, none of the multiple IPs included in the IP segment at the current moment have been released). occupied), if so, the following step S203 can be performed, otherwise, the waiting logic can be executed, and after each IP in the above IP segment is released, the following step S203 can be performed.
  • step S203 a backup cloud host of the target cloud host is selected from the cloud host resource pool to replace the target cloud host with the backup cloud host.
  • the cloud host management module may select a backup cloud host of the target cloud host from the cloud host resource pool to replace the target cloud host through the backup cloud host.
  • the cloud host management module can select the above-mentioned backup cloud host from the cloud host resource pool according to the following conditions: first, filter out all cloud hosts in normal operating status (hereinafter referred to as the first set), and then determine the first set of cloud hosts.
  • the number of idle IPs of each cloud host is selected from the first set to select cloud hosts whose number of idle IPs meets the preset number conditions (hereinafter referred to as the second set).
  • a cloud host can be randomly selected from the second set. As the above backup cloud host.
  • the backup cloud host After selecting the above-mentioned backup cloud host, you can first mark the backup cloud host as unschedulable, that is, lock the backup cloud host to avoid the backup cloud host from being used during the preparation period before the backup cloud host officially takes over the target cloud host.
  • the host's free IP is occupied, resulting in a shortage of free IPs.
  • the above-mentioned cloud host management module can also update the status of the backup cloud host after migrating the data on the target cloud host to the backup cloud host, thereby controlling The backup cloud host takes over the above target cloud host.
  • Figure 3 shows a schematic flow chart of how to update the status of the backup cloud host so that the backup cloud host takes over the target cloud host in an embodiment of the present disclosure, including steps S301 to S303:
  • step S301 data stored on the target cloud host is migrated to the backup cloud host.
  • the data stored on the target cloud host can be migrated to the above backup cloud host.
  • step S302 select an idle IP from the IP segment associated with the backup cloud host, and send the idle IP to the domain name server, so that the domain name server changes the mapping relationship between the idle IP of the target cloud host and the domain name to that of the backup cloud host. Mapping relationship between IP and domain name.
  • you can randomly select an idle IP for example: IP_3 from the above-mentioned backup cloud host, and send the idle IP to the domain name server, so that the domain name server changes the mapping relationship between the idle IP and the domain name of the target cloud host to the backup one.
  • IP_3 for example: IP_3
  • IP_2 dn1 IP_3 dn1
  • the present disclosure can take over the target cloud host through the backup cloud host without the client being aware of it, so that the client can still connect to the backup cloud host through the domain name, that is, the client's access The form remains unchanged.
  • step S303 the backup cloud host is marked as a schedulable state so that the backup cloud host can take over the target cloud host.
  • the backup cloud host can be marked as schedulable, so that the backup cloud host can take over the target cloud host.
  • an alarm notification can be sent to the manager of the application.
  • the alarm content can be "The target cloud host has failed, and the backup cloud host has taken over the target.” Cloud Host" to explain the fault and fault response to the above-mentioned managers. It should be noted that the specific alarm content can be set according to the actual situation, and this disclosure does not impose special restrictions on this.
  • Figure 4 shows a schematic flow chart of adding a cloud host to a cloud host resource pool in an embodiment of the present disclosure, including steps S401 to S405:
  • step S401 the cloud host management module creates a cloud host
  • IPAM IP Management Module
  • Etcd is a highly consistent distributed key-value store that provides a reliable way to store data that needs to be accessed by a distributed system or machine cluster
  • the unbound IP segment is sent to the cloud host management module, so that the cloud host management module binds an IP segment to the cloud host; and stores the corresponding relationship between the cloud host and the IP segment in Etcd;
  • step S403 the cloud host management module initializes the load balancing service
  • step S404 the cloud host management module adds the created cloud host to the cloud host resource pool
  • step S405 the cloud host management module sends a notification message to IaaS, so that IaaS uses the newly created cloud host as the next hop of the IP segment to which it is bound.
  • FIG. 5 shows a schematic flowchart of removing faulty cloud hosts from the cloud host resource pool in an embodiment of the present disclosure, including steps S501 to S505:
  • step S501 start;
  • step S502 the cloud host management module sends a message to IPAM, so that IPAM reads Etcd to determine whether the IP segment bound to the cloud host is released; if not, the waiting logic is executed;
  • step S503 if the cloud host management module determines that the IP segment is released, it terminates the operation of the cloud host;
  • step S504 the cloud host management module terminates the load balancing service
  • step S505 the cloud host management module updates the cloud host to an unschedulable state
  • step S506 the cloud host management module sends a notification message to IaaS, so that IaaS revokes the next hop configuration of the IP segment bound to the cloud host.
  • the present disclosure can quickly remove a certain cloud host when it fails, and use the backup cloud host to replace it, ensuring stable load balancing performance.
  • Figure 6 shows a schematic flowchart of creating a load balancing instance in an embodiment of the present disclosure, including steps S601 to S606:
  • step S601 the scheduler traverses the cloud host resource pool (sends a message to the cloud host management module so that the cloud host management module obtains cloud host information);
  • step S602 the scheduler selects at least two cloud hosts with the most idle IPs and two candidate cloud hosts;
  • step S603 the scheduler selects an idle IP from the IP segments bound to each cloud host (sends a message to the cloud host management module to determine the unoccupied idle IP);
  • step S604 the scheduler sends a status update notification to the cloud host management module, so that the cloud host management module updates the status of the cloud host to be schedulable;
  • step S605 the scheduler creates a load balancing instance and stores it in the load balancing instance pool;
  • step S606 the scheduler calls the DNS domain name server to register a domain name for the idle IP.
  • the management module updates the load balancing configuration to reload the load balancing service.
  • Figure 7 shows a schematic flowchart of deleting a load balancing instance in an embodiment of the present disclosure, including steps S701 to S705:
  • step S701 the scheduler updates the status of the load balancing instance to delete
  • step S702 the scheduler cancels the domain name
  • step S703 the scheduler releases what is bound to the cloud host (sends a message to IPAM to cause IPAM to release what is bound to the cloud host);
  • step S704 the scheduler deletes the load balancing instance
  • step S705 the scheduler sends a status update notification to the cloud host management module, so that the cloud host management module updates the status of the cloud host to unschedulable.
  • the load balancing service management module can unbind the idle IP from the local loopback address, and then the load balancing service management module can update the load balancing configuration to reload the load balancing service.
  • Figure 8 shows a schematic flow chart of how to manage a cloud host in an embodiment of the present disclosure, including steps S801 to S810:
  • step S801 the cloud host management module periodically traverses each cloud host
  • step S802 the cloud host management module detects whether each cloud host is in a normal state
  • step S803 If the cloud host is in a normal state, proceed to step S803, and the cloud host management module detects whether the load balancing service is in a normal state; if the load balancing service is in a normal state, proceed to step S804, with no action; otherwise, proceed to step S805, Trigger the mechanism to eliminate cloud hosts;
  • step S806 the cloud host management module traverses the cloud hosts and obtains cloud host information through the scheduler to determine the backup cloud host of the faulty cloud host;
  • step S807 the cloud host management module locks the backup cloud host
  • step S808 the cloud host management module migrates the load balancing instance corresponding to the failed target cloud host through the scheduler;
  • step S809 the cloud host management module marks the backup cloud host as schedulable
  • step S810 the cloud host management module sends an alarm notification to relevant managers.
  • the alarm notification includes information about the faulty cloud host, the backup cloud host, and the backup load balancing instance.
  • the present disclosure provides a universally applicable load balancing solution.
  • a kubernetes cluster is deployed in the cloud host resource pool, and the client can communicate with the cloud host resource pool through the load balancing instance.
  • Establish a connection with the target cloud host and then forward the business request through the target cloud host. It can be seen that this solution provides a new solution that can access the kubernetes cluster from the outside to achieve the load balancing function without resorting to relevant load balancing equipment. It is suitable for the network environment of all IaaS vendors and reduces operation and maintenance investment.
  • FIG. 9 shows a schematic structural diagram of the load balancing system in an embodiment of the present disclosure.
  • the load balancing system 900 may include a cloud host management module 910 and a cloud host resource pool 920.
  • the cloud host resource pool includes multiple cloud hosts 9201, and each cloud host is associated with a pre-allocated IP segment. in:
  • the cloud host management module 910 is used to respond to a load balancing instance creation request and schedule at least two candidate cloud hosts from the cloud host resource pool; the load balancing instance is used to provide external client access; and the IP corresponding to each candidate cloud host is obtained from Select an idle IP in the segment, call the domain name server to store the domain names corresponding to at least two idle IPs; among them, at least two idle IPs correspond to the same domain name; return the domain name to the client, so that the client obtains the domain name corresponding to the domain name server
  • the target IP; the target IP is any one of at least two idle IPs; create a load balancing instance based on the target IP so that the client can establish a connection with the target cloud host through the load balancing instance; the target cloud host is the candidate cloud corresponding to the target IP host;
  • Target cloud host 9201 is used to receive business requests sent by the client through the load balancing instance; based on the load balancing policy associated with the load balancing instance, forward the business request to the specified back-end service.
  • the cloud host management module 910 is configured as:
  • the backup cloud host satisfies the following conditions:
  • the running status of the backup cloud host is normal, and the number of idle IPs in the backup cloud host meets the preset number conditions.
  • the cloud host management module 910 is configured as:
  • the target cloud host 9201 is configured as:
  • the data stored on the backend service is deleted and the backend service is marked as unschedulable.
  • the running status of the backend service is determined by one or more of the following parameters: CPU occupancy, memory occupancy, and disk occupancy.
  • the example embodiments described here can be implemented by software, or can be implemented by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , including several instructions to cause a computing device (which may be a personal computer, a server, a mobile terminal, a network device, etc.) to execute a method according to an embodiment of the present disclosure.
  • a computing device which may be a personal computer, a server, a mobile terminal, a network device, etc.
  • This application also provides a computer-readable storage medium.
  • the computer-readable storage medium may be included in the electronic device described in the above embodiments; it may also exist independently without being assembled into the electronic device.
  • the computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of computer readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), removable Programmd read-only memory (EPROM or flash memory), fiber optics, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
  • Computer-readable storage media may transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
  • Program code embodied on a computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
  • the computer-readable storage medium carries one or more programs.
  • the electronic device implements the method described in the above embodiments.
  • an electronic device capable of implementing the above method is also provided in an embodiment of the present disclosure.
  • FIG. 10 An electronic device 1000 according to this embodiment of the present disclosure is described below with reference to FIG. 10 .
  • the electronic device 1000 shown in FIG. 10 is only an example and should not bring any limitations to the functions and usage scope of the embodiments of the present disclosure.
  • electronic device 1000 is embodied in the form of a general computing device.
  • the components of the electronic device 1000 may include, but are not limited to: the above-mentioned at least one processing unit 1010, the above-mentioned at least one storage unit 1020, a bus 1030 connecting different system components (including the storage unit 1020 and the processing unit 1010), and the display unit 1040.
  • the storage unit stores program code, which can be executed by the processing unit 1010, so that the processing unit 1010 performs the steps according to various exemplary embodiments of the present disclosure described in the "Exemplary Method" section of this specification.
  • the processing unit 1010 can perform as shown in Figure 1: Step S110, in response to a load balancing instance creation request, schedule at least two candidate cloud hosts from the cloud host resource pool; the load balancing instance is used to provide external client access Entrance; Step S120, select an idle IP from the IP segment corresponding to each candidate cloud host, and call the domain name server to store the domain names corresponding to at least two idle IPs; among which, at least two idle IPs correspond to the same domain name; Step S130, return the domain name to the client, so that the client obtains the target IP corresponding to the domain name from the domain name server; the target IP is any one of at least two idle IPs; step S140, create a load balancing instance based on the target IP so that the client can pass the load
  • the storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 10201 and/or a cache storage unit 10202, and may further include a read-only storage unit (ROM) 10203.
  • RAM random access storage unit
  • ROM read-only storage unit
  • Storage unit 1020 may also include a program/utility 10204 having a set of (at least one) program modules 10205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples, or some combination, may include the implementation of a network environment.
  • program/utility 10204 having a set of (at least one) program modules 10205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples, or some combination, may include the implementation of a network environment.
  • Bus 1030 may be a local area representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or using any of a variety of bus structures. bus.
  • Electronic device 1000 may also communicate with one or more external devices 1100 (e.g., keyboard, pointing device, Bluetooth device, etc.), may also communicate with one or more devices that enable a user to interact with electronic device 1000, and/or with Any device that enables the electronic device 1000 to communicate with one or more other computing devices (eg, router, modem, etc.). This communication may occur through input/output (I/O) interface 1050.
  • the electronic device 1000 may also communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 1060. As shown, network adapter 1060 communicates with other modules of electronic device 1000 via bus 1030.
  • network adapter 1060 communicates with other modules of electronic device 1000 via bus 1030.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Hardware Redundancy (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

La présente divulgation se rapporte au au domaine technique de l'informatique en nuage. L'invention concerne un procédé et un système d'équilibrage de charge, un support et un dispositif. Le procédé consiste : à préconfigurer un groupe de ressources d'hôte en nuage, le groupe de ressources d'hôte en nuage comprenant une pluralité d'hôtes en nuage, et chaque hôte en nuage étant associé à un segment IP préattribué ; en réponse à une demande de création d'instance d'équilibrage de charge, à planifier deux hôtes en nuage candidats ou plus à partir du groupe de ressources d'hôte en nuage ; à sélectionner un IP inactif à partir d'un segment IP correspondant à chaque hôte en nuage candidat, et à appeler un serveur de nom de domaine pour stocker un nom de domaine correspondant à deux IP inactifs ou plus, les deux IP inactifs ou plus correspondant au même nom de domaine ; à renvoyer le nom de domaine à un client, de telle sorte que le client acquiert, à partir du serveur de nom de domaine, un IP cible correspondant au nom de domaine ; et à créer une instance d'équilibrage de charge sur la base de l'IP cible, de telle sorte que le client établit une connexion avec un hôte en nuage cible au moyen de l'instance d'équilibrage de charge. La présente divulgation concerne une solution d'équilibrage de charge ayant une plage d'application plus large.
PCT/CN2022/142981 2022-04-28 2022-12-28 Procédé et système d'équilibrage de charge, support de stockage informatique et dispositif électronique WO2023207189A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210470381.4A CN114900526B (zh) 2022-04-28 2022-04-28 负载均衡方法及系统、计算机存储介质、电子设备
CN202210470381.4 2022-04-28

Publications (1)

Publication Number Publication Date
WO2023207189A1 true WO2023207189A1 (fr) 2023-11-02

Family

ID=82720543

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/142981 WO2023207189A1 (fr) 2022-04-28 2022-12-28 Procédé et système d'équilibrage de charge, support de stockage informatique et dispositif électronique

Country Status (2)

Country Link
CN (1) CN114900526B (fr)
WO (1) WO2023207189A1 (fr)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900526B (zh) * 2022-04-28 2024-04-16 京东科技信息技术有限公司 负载均衡方法及系统、计算机存储介质、电子设备
US11909819B1 (en) * 2022-11-28 2024-02-20 Hewlett Packard Enterprise Development Lp Synchronization of client IP binding database across extended networks leveraging BGP control plane

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108055314A (zh) * 2017-12-08 2018-05-18 锐捷网络股份有限公司 一种集群系统的管理方法与集群系统
US20210084537A1 (en) * 2018-05-29 2021-03-18 Huawei Technologies Co., Ltd. Load balance method and apparatus thereof
CN112995247A (zh) * 2019-12-12 2021-06-18 阿里巴巴集团控股有限公司 数据发送或处理的方法、装置和系统
CN114900526A (zh) * 2022-04-28 2022-08-12 京东科技信息技术有限公司 负载均衡方法及系统、计算机存储介质、电子设备

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9071609B2 (en) * 2012-10-08 2015-06-30 Google Technology Holdings LLC Methods and apparatus for performing dynamic load balancing of processing resources
US9032081B1 (en) * 2014-05-29 2015-05-12 Signiant, Inc. System and method for load balancing cloud-based accelerated transfer servers
US9838482B1 (en) * 2014-12-18 2017-12-05 Amazon Technologies, Inc. Maintaining client/server session affinity through load balancers
CN107590001B (zh) * 2017-09-08 2020-12-22 北京京东尚科信息技术有限公司 负载均衡方法及装置、存储介质、电子设备
CN108200218B (zh) * 2018-03-09 2021-11-26 北京奇艺世纪科技有限公司 一种实现负载均衡的方法、装置及电子设备
CN108494868A (zh) * 2018-03-30 2018-09-04 三盟科技股份有限公司 一种基于云业务系统下的负载均衡方法及系统
CN109831524B (zh) * 2019-03-11 2023-04-18 平安科技(深圳)有限公司 一种负载均衡处理方法及装置
CN111800458B (zh) * 2020-05-22 2021-04-23 浙商银行股份有限公司 一种Kubernetes容器云平台的动态负载均衡方法及系统
CN112162819B (zh) * 2020-09-18 2023-12-22 北京浪潮数据技术有限公司 跨虚拟机和Kubernetes集群的应用部署方法
CN112437136A (zh) * 2020-11-12 2021-03-02 浪潮云信息技术股份公司 一种实现云原生负载均衡服务的方法及系统
CN113783922A (zh) * 2021-03-26 2021-12-10 北京沃东天骏信息技术有限公司 负载均衡的方法、系统和装置
CN113127199B (zh) * 2021-04-22 2023-10-20 康键信息技术(深圳)有限公司 负载均衡配置方法、装置、设备及存储介质
CN113949707B (zh) * 2021-09-30 2024-04-30 上海浦东发展银行股份有限公司 基于OpenResty和K8S的容器云服务发现和负载均衡方法
CN114153592A (zh) * 2021-10-29 2022-03-08 郑州云海信息技术有限公司 云平台的物理主机负载调度方法、装置、电子设备及介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108055314A (zh) * 2017-12-08 2018-05-18 锐捷网络股份有限公司 一种集群系统的管理方法与集群系统
US20210084537A1 (en) * 2018-05-29 2021-03-18 Huawei Technologies Co., Ltd. Load balance method and apparatus thereof
CN112995247A (zh) * 2019-12-12 2021-06-18 阿里巴巴集团控股有限公司 数据发送或处理的方法、装置和系统
CN114900526A (zh) * 2022-04-28 2022-08-12 京东科技信息技术有限公司 负载均衡方法及系统、计算机存储介质、电子设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ANONYMOUS: "[Transfer] Domain Name Load Balancing ---- Combined with cloud resolution to achieve cross-regional load balancing", CSDN BLOG, 5 July 2017 (2017-07-05), XP093102653, Retrieved from the Internet <URL:https://blog.csdn.net/weixin_33973600/article/details/85921427?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522167598969516800186582090%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=167598969516800186582090&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm-1-85921427-null-null.142v73insert_down3,201v4add_ask,239v1control&utm_term=%E5%9F%9F%E5%90%8D%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1%20----%E7%BB%93%E5%90%88%E4%BA%91%E8%A7%A3%E6%9E%90%E5%AE%9E%E7%8E%B0%E8%B7%A8%E5%9C%B0%E5%9F%9F%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1&spm=1018.2226.3001.4187> [retrieved on 20231117] *

Also Published As

Publication number Publication date
CN114900526A (zh) 2022-08-12
CN114900526B (zh) 2024-04-16

Similar Documents

Publication Publication Date Title
CN111464592B (zh) 基于微服务的负载均衡方法、装置、设备及存储介质
US11765110B2 (en) Method and system for providing resiliency in interaction servicing across data centers
CN107078969B (zh) 实现负载均衡的计算机设备、系统和方法
US20210328858A1 (en) Communications methods and apparatus for migrating a network interface and/or ip address from one pod to another pod in a kubernetes system
WO2023207189A1 (fr) Procédé et système d&#39;équilibrage de charge, support de stockage informatique et dispositif électronique
CN111615066B (zh) 一种基于广播的分布式微服务注册及调用方法
JP5381998B2 (ja) クラスタ制御システム、クラスタ制御方法、及びプログラム
EP2993838B1 (fr) Procédés de configuration d&#39;identité de membre de dispositif formant passerelle, et dispositifs formant passerelle de gestion correspondants
US8321862B2 (en) System for migrating a virtual machine and resource usage data to a chosen target host based on a migration policy
JP2017084406A (ja) ファブリック分散リソースのスケジューリング
WO2012122812A1 (fr) Procédé et système de gestion de ressources, et gestionnaire de ressources
CN108833462A (zh) 一种面向微服务的自注册服务发现的系统及方法
WO2021120633A1 (fr) Procédé d&#39;équilibrage de charge et dispositif associé
Xie et al. Supporting seamless virtual machine migration via named data networking in cloud data center
CN113709220B (zh) 虚拟负载均衡器的高可用实现方法、系统及电子设备
JP2013090072A (ja) サービス提供システム
US11799948B2 (en) Cloud service datacenter selection based on data sovereignty policies
US9760370B2 (en) Load balancing using predictable state partitioning
JP2013206112A (ja) 計算機システム及びサブシステム管理方法
Hu et al. v-bundle: Flexible group resource offerings in clouds
KR101382177B1 (ko) 동적 메시지 라우팅 시스템 및 방법
US12015521B2 (en) Using an application programming interface (API) gateway to manage communications in a distributed system
WO2020063251A1 (fr) Procédé de communication, et dispositif associé
WO2023032105A1 (fr) Système de commande de tâche et procédé de commande associé
WO2023032103A1 (fr) Système de commande de tâche et procédé de commande de tâche

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22939995

Country of ref document: EP

Kind code of ref document: A1