Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Load balancing method, apparatus, device and storage medium

A load balancing and server-side technology, applied in the field of network communication, can solve problems such as sudden increase in traffic on the server side, sudden increase in visits, hot spots on the server side, etc.

Active Publication Date: 2021-05-11
BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF8 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, these solutions are prone to server hot spots. For example, a sudden increase in the number of requests for a certain request will cause all upstreams to access a single server according to the modulo algorithm, causing the server to be instantly overwhelmed by the sudden increase in traffic.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Load balancing method, apparatus, device and storage medium
  • Load balancing method, apparatus, device and storage medium
  • Load balancing method, apparatus, device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0025] figure 1 It is a flowchart of a load balancing method provided by Embodiment 1 of the present invention. This embodiment is used in network communication to prevent the situation that a sudden increase in the traffic of a certain request causes the service party to be instantly overwhelmed by the sudden increase in traffic. The method can be executed by the load balancing device provided by the embodiment of the present invention, and the device can be integrated into a device for network communication. see figure 1 , the method specifically includes:

[0026] S101. Determine a candidate server of a target request to be sent based on a hash algorithm.

[0027] Among them, the hash algorithm is also called the hash algorithm, which maps a binary value of any length to a shorter fixed-length binary value. Like a fingerprint, it is a sign that uses shorter information to ensure the uniqueness of a file. Flags are associated with every byte of the file, and it's hard to...

Embodiment 2

[0038] image 3 It is a schematic structural diagram of a load balancing device provided in Embodiment 2 of the present invention. The device can execute the load balancing method provided in any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method. Such as image 3 As shown, the device may include:

[0039] Candidate service party determination module 21, for determining the candidate service party of the target request to be sent based on the hash algorithm;

[0040] An authority determination module 22, configured to determine whether the local request initiator has the authority to access the candidate server;

[0041] A target server selection module 23, configured to select a target server from the servers with which the local requester has access authority, and send the target request to the target server.

[0042] On the basis of the above-mentioned embodiments, the target server selection modu...

Embodiment 3

[0047] Figure 4 A schematic structural diagram of a load balancing device provided by Embodiment 3 of the present invention, as shown in Figure 4 As shown, the load balancing device includes a processor 30, a memory 31, an input device 32 and an output device 33; the number of processors 30 in the load balancing device may be one or more, Figure 4 Take a processor 30 as an example; the processor 30, memory 31, input device 32 and output device 33 in the load balancing device can be connected by bus or other methods, Figure 4 Take connection via bus as an example.

[0048] The memory 31, as a computer-readable storage medium, can be used to store software programs, computer-executable programs and modules, such as program instructions / modules corresponding to the load balancing method in the embodiment of the present invention (for example, the candidate server determination module 21, Authority determination module 22 and target server selection module 23). The processo...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention discloses a load balancing method, device, equipment and storage medium, and relates to the field of network communication. The method includes: determining the candidate server of the target request to be sent based on a hash algorithm; determining whether the local request initiator has the authority to access the candidate server; A target server is selected from the server, and the target request is sent to the target server. The embodiment of the present invention ensures that the access speed of the requester will not exceed the maximum carrying capacity of the server by configuring the access authority of the server for the request initiator.

Description

technical field [0001] The embodiments of the present invention relate to the field of network communication, and in particular, to a load balancing method, device, equipment and storage medium. Background technique [0002] Load balancing means that in network communication, when the number of downstream service instances exceeds one, traffic needs to be divided to ensure that each server can carry requests from upstream. In network communication, it is often necessary to concentrate requests that meet certain characteristics on individual service instances. For example, in the data reading service, when the stand-alone cache cannot store all the data, we will segment the data according to the identity and cache it in a distributed manner to reduce the access pressure on the back-end storage service (such as mysql). [0003] Traditional data sharding scheme: use the hash algorithm to shard the request. For example, a hash algorithm is used for the specified information of...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/50
CPCG06F9/505G06F9/5083G06F2209/5013
Inventor 杜鑫
Owner BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products