Alibabacloud.com offers a wide variety of articles about round robin load balancing, easily find your round robin load balancing information here online.
1. Polling
Polling is round Robin, which distributes the client's Web requests to different back-end servers sequentially, according to the order in the Nginx configuration file.Examples of configurations are as follows:
http{
upstream SampleApp {
Server
Only 1 DNS portals were inserted into the upstream section, the SampleApp, which was also recalled in the Proxy_pass section later.
2, the least connection
Web requests are forw
idea is to use the Server Load balancer function of the reverse proxy server. The varnish mentioned in the previous article supports this function and view the configuration file:
Backend web1 {. Host = "192.168.0.77 ";. Port = "8081 ";}Backend web2 {. Host = "192.168.0.77 ";. Port = "8082 ";}Director lb round-robin {{. Backend = web1;}{. Backend = web2;}}Sub vcl_recv {Set req. backend = lb;Return (pass );
. xml introduces the jar packages of Dubbo and Zookeeper and the jar packages of test-maven-api. Because the jar package of test-maven-api is introduced, we call the package in the project as if it were called locally. The Code is as follows:
(2) the specific implementation of the test-maven-server-console project is as follows:
@Controllerpublic class IndexController {@Autowiredprivate TestRegistryService testRegistryService;@RequestMapping("/hello")public String index(Model model){
Lvswith theNginxload Balancing scheduling algorithm1th Chapter LVSof the10Type scheduling algorithm1.1Static Algorithms: 1.1.1 RR (round robin):Polling scheduling algorithm:the principle of polling scheduling algorithm is to put the user's access request , the average allocation to each Web service node , starting from 1 , to the end of the last server node , and then at the beginning of a new round of loo
18.6 Load Balancing Cluster introduction
Main open source software LVs, keepalived, Haproxy, Nginx, etc.
The LVS belong to 4 layer (network OSI 7 layer model), Nginx belongs to 7 layer, Haproxy can be considered as 4 layer, can be used as 7 layer
The Keepalived load balancing function is actually the L
Ifcfg-bond0 File
#vi ifcfg-bond0
The original configuration file is as follows
After modification, you need to add a static IP address (NIC bindings do not recommend using dynamic IP), subnet masks, and gateways are as follows
(Note: In addition to BOND0 set IP and other information outside the real card can not set IP address)
Edit Ifcfg-eth0 File#vi Ifcfg-eth0The original configuration file is as follows
After modification
Three network adapters are prepared.
This environment uses Cent
This article references: Dragon Fruit College: Http://www.roncoo.com/details?cid=85d6008fe77c4199b0cdd2885eaeee53
During cluster load Balancing, Dubbo provides a variety of equalization policies, which are randomly called by default.
You can extend your own load balancing policies, see:
message;Note: The first three types are standard, the fourth is the post-add type, the kernel may not be supported by default, and the kernel must be self-compiled(1) The VIP is the public network address, RIP and dip is the private network address, and can not be in the same IP network, but need to communicate with each other through routing;(2) The source IP of the request message received by RS is a dip, so its response message will be sent to the dip;(3) The request message and the response
Tag: Address file path shell script uses Evel Aliyun try directory 127.0.0.1Preparatory workEnvironment: WIN10 under Centos6.4 virtual machine.Load Balancing: Two units (one master and one standby) LVS + keepalived.HTTP Server: 3 units.Configure IP for each server1. VIP (virtual IP): The IP address used to provide the virtual Server service. are bound on the director of a physical network card (external receiving request packet) and the loopback devic
Nginx's load balancing strategy can be divided into two categories: built-in policies and extension strategies. Built-in policies include weighted polling and IP hashes, which, by default, are compiled into the Nginx kernel, simply by specifying the parameters in the Nginx configuration. There are many extension strategies, such as fair, universal hash, consistent hash, etc., by default not compiled into th
Abstract: This article discusses the Server Load balancer technology and load allocation strategies used by distributed network servers, and implements the Server Load balancer gateway on FreeBSD Based on Network Address Translation, it is applied to our internet server and distributes the load to multiple servers to s
Load Balancing(+) (#)
During cluster load Balancing, Dubbo provides a variety of equalization policies, which are randomly called by default.
You can extend your own load balancing
Software load balancing is generally implemented in two ways: software load implementation based on the operating system and software load implementation based on third-party applications. LVS is a kind of soft load based on the Linux operating system. HAProxy is an open-sou
Load Balancing problems in multi-core programmingAuthor: Zhou weiming related article links: Lock competition in multi-core programming several difficulties of multi-core programming and their countermeasures (problem 1) OpenMP parallel programming (2) OpenMP parallel programming (1) fast sorting efficiency on dual-core CPU the lock competition problem in multi-core programming mentioned in this article is
analysis of RR and Ip_hash strategy in Nginx load Balancing
Nginx upstream currently supports the distribution of load balancing methods 1, RR (default)
Each request is assigned to a different backend server in chronological order, and can be automatically removed if the backend server is down.
For example:
Generally, the load balancing method can be classified into two types: static load Balancing algorithm and dynamic load balancing algorithm. Static load
service to incoming client requests.
If site traffic increases, NLB can easily add more WEB servers to the NLB cluster to increase capacity for additional load. To extend a Web server farm, more than 32 nodes, NLB can be used in conjunction with other load balancing technologies, such as Round-robin DNS (RRDNS). In f
Nginx do reverse proxy, the back-end host has more than one, you can use upstream to define a back-end host pool, in the reverse proxy directly using the host pool name. In upstream, we can define load balancing scheduling algorithm, weight, health status detection and other parameters.
For example:
Upstream backend {
server 172.16.0.1:80 weight=1 max-fails=3 fail_timeout=10;
Server 172.16.0.2:
Abstract: This article discusses the Server Load balancer technology and load allocation strategies used by distributed network servers, and implements the Server Load balancer gateway on FreeBSD Based on Network Address Translation, it is applied to our Internet server and distributes the load to multiple servers to s
This is a creation in
Article, where the information may have evolved or changed.
Part VII: Go microservices-service discovery and load balancing
This section deals with two basic parts of a robust microservices architecture-service discovery and load balancing-as well as how they facilitate the horizontal scaling of i
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.