• 欢迎访问速搜资源吧,如果在网站上找不到你需要的资源,可以在留言板上留言,管理员会尽量满足你!

【速搜问答】负载均衡是什么

问答 admin 5天前 12次浏览 已收录 0个评论

汉英对照:
Chinese-English Translation:

负载均衡(Load Balance)是指将负载(工作任务)进行平衡、分摊到多个操作单元上进行运行,提供了一种廉价有效透明的方法扩展网络设备和服务器的带宽、增加吞吐量、加强网络数据处理能力、提高网络的灵活性和可用性。

Load balance is a kind of cheap, effective and transparent way to expand the bandwidth of network equipment and server, increase the throughput, strengthen the network data processing ability, and improve the flexibility and availability of the network.

负载均衡建立在现有网络结构之上,它提供了一种廉价有效透明的方法扩展网络设备和服务器的带宽、增加吞吐量、加强网络数据处理能力、提高网络的灵活性和可用性。

Load balancing is based on the existing network structure. It provides a cheap, effective and transparent way to expand the bandwidth of network devices and servers, increase the throughput, strengthen the network data processing capacity, and improve the flexibility and availability of the network.

负载均衡(Load Balance)其意思就是分摊到多个操作单元上进行执行,例如 Web 服务器、FTP 服务器、企业关键应用服务器和其它关键任务服务器等,从而共同完成工作任务。

Load balance means that it is allocated to multiple operation units for execution, such as web server, FTP server, enterprise key application server and other key task servers, so as to complete the work tasks together.

负载均衡,英文名称为 Load Balance,其含义就是指将负载(工作任务)进行平衡、分摊到多个操作单元上进行运行,例如 FTP 服务器、Web 服务器、企业核心应用服务器和其它主要任务服务器等,从而协同完成工作任务。

Load balance, the English name is load balance, which means to balance the load (work task) and allocate it to multiple operation units for running, such as FTP server, web server, enterprise core application server and other main task servers, so as to complete the work tasks cooperatively.

负载均衡构建在原有网络结构之上,它提供了一种透明且廉价有效的方法扩展服务器和网络设备的带宽、加强网络数据处理能力、增加吞吐量、提高网络的可用性和灵活性。

Load balancing is built on the original network structure. It provides a transparent, cheap and effective way to expand the bandwidth of servers and network devices, enhance the network data processing capacity, increase throughput, and improve the availability and flexibility of the network.

分类

classification

1、软/硬件负载均衡

1. Software / hardware load balancing

软件负载均衡解决方案是指在一台或多台服务器相应的操作系统上安装一个或多个附加软件来实现负载均衡,如 DNS Load Balance,CheckPoint Firewall-1 ConnectControl 等,它的优点是基于特定环境,配置简单,使用灵活,成本低廉,可以满足一般的负载均衡需求。

Software load balancing solution is to install one or more additional software on the corresponding operating system of one or more servers to achieve load balancing, such as DNS load balance, checkpoint Firewall-1, connectcontrol, etc. its advantages are simple configuration, flexible use and low cost, which can meet the general load balancing requirements.

软件解决方案缺点也较多,因为每台服务器上安装额外的软件运行会消耗系统不定量的资源,越是功能强大的模块,消耗得越多,所以当连接请求特别大的时候,软件本身会成为服务器工作成败的一个关键;软件可扩展性并不是很好,受到操作系统的限制;由于操作系统本身的 Bug,往往会引起安全问题。

Software solutions also have many disadvantages, because the installation of additional software on each server will consume the system’s indefinite resources. The more powerful the module is, the more consumed it will be. Therefore, when the connection request is particularly large, the software itself will become a key to the success or failure of the server. The software scalability is not very good, which is limited by the operating system. Due to the operation of As a bug in the system itself, it often causes security problems.

硬件负载均衡解决方案是直接在服务器和外部网络间安装负载均衡设备,这种设备通常称之为负载均衡器,由于专门的设备完成专门的任务,独立于操作系统,整体性能得到大量提高,加上多样化的负载均衡策略,智能化的流量管理,可达到最佳的负载均衡需求。

Hardware load balancing solution is to install load balancing equipment directly between the server and the external network. This device is usually called load balancer. Because the special equipment completes special tasks and is independent of the operating system, the overall performance is greatly improved. In addition, the diversified load balancing strategy and intelligent traffic management can achieve the best load balancing requirements.

负载均衡器有多种多样的形式,除了作为独立意义上的负载均衡器外,有些负载均衡器集成在交换设备中,置于服务器与 Internet 链接之间,有些则以两块网络适配器将这一功能集成到 PC 中,一块连接到 Internet 上,一块连接到后端服务器群的内部网络上。一般而言,硬件负载均衡在功能、性能上优于软件方式,不过成本昂贵。

There are various forms of load balancers. In addition to being independent load balancers, some load balancers are integrated in the switching equipment between the server and the Internet link. Some load balancers integrate this function into the PC with two network adapters, one connected to the Internet and the other connected to the internal network of the back-end server group. Generally speaking, hardware load balancing is better than software in function and performance, but it is expensive.

2、本地/全局负载均衡

2. Local / global load balancing

负载均衡从其应用的地理结构上分为本地负载均衡(Local Load Balance)和全局负载均衡(Global Load Balance,也叫地域负载均衡),本地负载均衡针对本地范围的服务器群做负载均衡,全局负载均衡针对不同地理位置、不同网络结构的服务器群做负载均衡。

Load balancing can be divided into local load balance and global load balance according to the geographical structure of its application. Local load balancing does load balancing for local server groups, and global load balancing is used for server groups with different geographical locations and network structures.

本地负载均衡不需要花费高额成本购置高性能服务器,只需利用现有设备资源,就可有效避免服务器单点故障造成数据流量的损失,通常用来解决数据流量过大、网络负荷过重的问题。同时它拥有形式多样的均衡策略把数据流量合理均衡的分配到各台服务器。如果需要在现在服务器上升级扩充,不需改变现有网络结构、停止现有服务,仅需要在服务群中简单地添加一台新服务器。

Local load balancing does not need to spend a high cost to purchase high-performance servers. It only needs to use the existing equipment resources to effectively avoid the loss of data traffic caused by server single point failure. It is usually used to solve the problem of excessive data flow and heavy network load. At the same time, it has a variety of balanced strategies to distribute data traffic to each server reasonably and evenly. If you need to upgrade and expand the current server, you don’t need to change the existing network structure and stop the existing services, just add a new server to the service group.

全局负载均衡主要解决全球用户只需一个域名或 IP 地址就能访问到离自己距离最近的服务器获得最快的访问速度,它在多区域都拥有自己的服务器站点,同时也适用于那些子公司站点分布广的大型公司通过企业内部网(Intranet)达到资源合理分配的需求。

Global load balancing is mainly to solve the problem that global users can access the server nearest to them with only one domain name or IP address to obtain the fastest access speed. It has its own server sites in multiple regions. At the same time, it is also suitable for large companies with widely distributed subsidiary sites to achieve reasonable resource allocation through intranet.

全局负载均衡具备的特点:

The features of global load balancing are as follows:

1、提高服务器响应速度,解决网络拥塞问题,达到高质量的网络访问效果。

1. Improve the response speed of the server, solve the problem of network congestion, and achieve high-quality network access effect.

2、能够远距离为用户提供完全的透明服务,真正实现与地理位置无关性

2. It can provide completely transparent service for users from a long distance, and truly realize the independence of geographical location

3、能够避免各种单点失效,既包括数据中心、服务器等的单点失效,也包括专线故障引起的单点失效。

3. It can avoid all kinds of single point failure, including data center, server and so on, as well as the single point failure caused by special line fault.

部署方式

Deployment mode

负载均衡有三种部署方式:路由模式、桥接模式、服务直接返回模式。路由模式部署灵活,约 60%的用户采用这种方式部署;桥接模式不改变现有的网络架构;服务直接返回(DSR)比较适合吞吐量大特别是内容分发的网络应用。约 30%的用户采用这种模式。

There are three deployment modes of load balancing: routing mode, bridging mode and service direct return mode. Routing mode deployment is flexible, about 60% of users use this way to deploy; bridge mode does not change the existing network architecture; service direct return (DSR) is more suitable for network applications with high throughput, especially content distribution. About 30% of users use this mode.

1、路由模式(推荐)

1. Routing mode (recommended)

路由模式的部署方式,服务器的网关必须设置成负载均衡机的 LAN 口地址,且与 WAN 口分署不同的逻辑网络。因此所有返回的流量也都经过负载均衡。这种方式对网络的改动小,能均衡任何下行流量。

For the deployment mode of routing mode, the gateway of the server must be set to the LAN port address of the load balancing machine, and different logical networks should be deployed with WAN port. Therefore, all returned traffic is also load balanced. This method has little change to the network and can balance any downstream traffic.

2、桥接模式

2. Bridging mode

桥接模式配置简单,不改变现有网络。负载均衡的 WAN 口和 LAN 口分别连接上行设备和下行服务器。LAN 口不需要配置 IP(WAN 口与 LAN 口是桥连接),所有的服务器与负载均衡均在同一逻辑网络中。

The bridge mode configuration is simple and does not change the existing network. The WAN port and LAN port of load balancing are connected to the uplink device and the downlink server respectively. The LAN port does not need to be configured with IP (WAN port and LAN port are bridge connection), and all servers and load balancing are in the same logical network.

由于这种安装方式容错性差,网络架构缺乏弹性,对广播风暴及其他生成树协议循环相关联的错误敏感,因此一般不推荐这种安装架构。

Due to its poor fault tolerance, inflexibility of network architecture and sensitivity to broadcast storm and other errors associated with spanning tree protocol cycles, this installation architecture is generally not recommended.

3、服务直接返回模式

3. Service direct return mode

这种安装方式负载均衡的 LAN 口不使用,WAN 口与服务器在同一个网络中,互联网的客户端访问负载均衡的虚 IP(VIP),虚 IP 对应负载均衡机的 WAN 口,负载均衡根据策略将流量分发到服务器上,服务器直接响应客户端的请求。因此对于客户端而言,响应他的 IP 不是负载均衡机的虚 IP(VIP),而是服务器自身的 IP 地址。也就是说返回的流量是不经过负载均衡的。因此这种方式适用大流量高带宽要求的服务。

In this installation method, the LAN port of load balancing is not used. The WAN port and the server are in the same network. The Internet client accesses the virtual IP (VIP) of the load balancing machine, and the virtual IP corresponds to the WAN port of the load balancing machine. The load balancing distributes the traffic to the server according to the policy, and the server directly responds to the client’s request. Therefore, for the client, the IP address of the server itself is not the virtual IP (VIP) of the load balancing machine, but the IP address of the server itself. In other words, the returned traffic is not load balanced. Therefore, this method is suitable for large traffic and high bandwidth services.

负载均衡算法

Load balancing algorithm

介绍

introduce

现有的负载均衡算法主要分为静态和动态两类。静态负载均衡算法以固定的概率分配任务,不考虑服务器的状态信息,如轮转算法、加权轮转算法等;动态负载均衡算法以服务器的实时负载状态信息来决定任务的分配,如最小连接法、加权最小连接法等。

The existing load balancing algorithms are mainly divided into static and dynamic. Static load balancing algorithm allocates tasks with fixed probability without considering server state information, such as rotation algorithm and weighted rotation algorithm; dynamic load balancing algorithm determines task allocation by real-time load state information of server, such as minimum connection method and weighted minimum connection method.

分类

classification

1、轮询法

1. Polling method

轮询法,就是将用户的请求轮流分配给服务器,就像是挨个数数,轮流分配。这种算法比较简单,他具有绝对均衡的优点,但是也正是因为绝对均衡它必须付出很大的代价,例如它无法保证分配任务的合理性,无法根据服务器承受能力来分配任务。

Polling method is to distribute the user’s requests to the server in turn, just like counting one by one and distributing them in turn. This algorithm is relatively simple, it has the advantage of absolute equilibrium, but also because of absolute equilibrium, it has to pay a great price, for example, it can not guarantee the rationality of task allocation, and can not allocate tasks according to the server’s affordability.

2、随机法

2. Random method

随机法,是随机选择一台服务器来分配任务。它保证了请求的分散性达到了均衡的目的。同时它是没有状态的不需要维持上次的选择状态和均衡因子。但是随着任务量的增大,它的效果趋向轮询后也会具有轮询算法的部分缺点。

Random method is to select a server randomly to assign tasks. It ensures the dispersion of requests and achieves the goal of balance. At the same time, it does not need to maintain the last selection state and equilibrium factor. However, with the increase of the amount of tasks, it tends to have some disadvantages of polling algorithm after polling.

3、最小连接法

3. Minimum connection method

最小连接法,将任务分配给此时具有最小连接数的节点,因此它是动态负载均衡算法。一个节点收到一个任务后连接数就会加 1,当节点故障时就将节点权值设置为 0,不再给节点分配任务。

The minimum connection method allocates tasks to the nodes with the minimum number of connections, so it is a dynamic load balancing algorithm. When a node receives a task, the number of connections will be increased by 1. When the node fails, the node weight is set to 0, and no task is assigned to the node.

最小连接法适用于各个节点处理的性能相似时。任务分发单元会将任务平滑分配给服务器。但当服务器性能差距较大时,就无法达到预期的效果。因为此时连接数并不能准确表明处理能力,连接数小而自身性能很差的服务器可能不及连接数大而自身性能极好的服务器。所以在这个时候就会导致任务无法准确的分配到剩余处理能力强的机器上。

The minimum connection method can be used when the performance of each node is similar. The task distribution unit distributes tasks smoothly to the server. But when the server performance gap is large, it can not achieve the desired effect. Because the number of connections can not accurately indicate the processing capacity, the server with small connection number and poor performance may not be as good as the server with large connection number and excellent performance. Therefore, at this time, the task can not be accurately allocated to the machine with strong residual processing capacity.


速搜资源网 , 版权所有丨如未注明 , 均为原创丨转载请注明原文链接:【速搜问答】负载均衡是什么
喜欢 (0)
[361009623@qq.com]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址