I know what server load balancer and high concurrency should be used to solve this problem, but I don't know how to do it even though I have no experience in the concept of server load balancer and high concurrency, I searched for nginx to achieve load balancing and high con
I. Concepts of reverse proxy and Server Load balancer
Before understanding the concepts of reverse proxy and Server Load balancer, we must first understand the concept of a cluster. Simply put, a cluster is a server that does the same thing, such as a web cluster, database cluster, and storage cluster, the cluster has
database-based session persistence. To overcome the above problems, you can use the IP address hash-based load balancing solution. In this way, the continuous Web requests of the same client are distributed to the same server for processing.
The configuration example is as follows:
Http {
Upstream sampleapp {
Ip_hash;
Server
>;
Server }
....
Server {
Listen 80;
...
Location
0.0 112680 976 pts/0 R+ 18:25 0:00 grep --color=auto keepAlso need to be performed on two RSsh /usr/local/sbin/lvs_dr_rs.sh4. TestingTest Method 1:Enter the VIP in the browser 192.168.242.110 and then deliberately stop an RS nginx service, then refresh the browser to see the results.Test Method 2:In the scheduler, execute the relevant command to view the number of connections:[[emailprotected] ~]# ipvsadm -lnIP Virtual Server version 1.2.1 (size=4096)Prot LocalAddress:Port Scheduler F
Web server.(2) The Load Balancer (control side) failure can cause the entire database system to be paralyzed.Third, database split (distributed)By a certain condition, the data stored in the same database is distributed to multiple databases, distributed storage, routing rules to access a specific database, so that each access is not a single server, but the n server, which can reduce the
;Create mod. conf in the/usr/local/apache/conf/directory:LoadModule jk_module modules/mod_jk-1.2.31-httpd-2.2.x.soJkWorkersFile conf/workers. properties# JkMount/*. jsp lbcontroller# JkMount/*. do lbcontrollerJkMount/* lbcontroller # you can configure multiple apache distributors as needed./* indicates that apache distributes all files by lbcontroller. You can set it by yourself *. jsp ,*. do and so on2.2 workers. properties fileCreate the workers. properties file in the conf directory under apa
: This article mainly introduces several methods for nginx server load balancer to process session sharing. For more information about PHP tutorials, see.
1) use cookie instead of sessionBy changing the session into a cookie, you can avoid some drawbacks of the session. in a previously read J2EE book, it also indicates that the session cannot be used in the clust
/local/nginx/sbin: $PATH------------------------SOURCE!$EffectStart NginxNginx----------------Enter ip\\\\\\\\\\\\\\\\\\\\\\ on the browser and do not conflict with HTTP portAppear"Welcome to nginx! ”Installation SuccessfulWhen you are going to change the configuration fileUpstream App1 {Ip_hash;Server 192.168.1.51:80;Server 192.168.1.52:80;Server 192.168.1.53:80;}server {Listen 80;server_name localhost;#charset Koi8-r;#access_log Logs/host.access.log Main;Location/{Proxy_set_header x-forwarded-
The server Load balancer of the Oracle RAC server distributes new connection requests to the node with the smallest load based on the number of connection loads of each node in the RAC. When the database is running, the PMON process of each node in RAC updates the connection load of each node to service_register every
Example of an nginx load balancer configuration. The configuration examples for load balancing are as follows:Http{upstreamserver{server192.168.10.100:80 weight=3max_fails=3fail_timeout=25s;server 192.168.10.101:80weight=1max_fails=3fail_timeout=25s;server 192.168.10.102:80weight=4max_fails=3fail_timeout=25s; server192.168.10.103:80weight=2max_fails=3fail_timeout
3. Start Stop commandStart:/opt/nginx/sbin/nginxQuick Stop:/opt/nginx/sbin/nginx-s stopComplete ordered stop:/opt/nginx/sbin/nginx-s quitReload:/opt/nginx/sbin/nginx-s ReloadNginx Load Balancer Two,Let's say we have 3 servers and the IP addresses are:192.168.0.1/192.168.0.2/192.168.0.3We use 192.168.0.1 as the front-end primary server, 192.168.0.2 and
Microsoft Azure's Load balancer is a Layer-4 load balancer. The Microsoft Azure load balancer distributes the load between a set of available servers (virtual machines) by calculating t
First, load Balancing introduction
Main open source software LVs, keepalived, Haproxy, Nginx and so on;
The LVS belongs 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;
Keepalived load balancing function is in fact LVS;
LVS This 4-layer load
Lvs-nat model: Similar to Dnat, but supports multi-target forwarding, which is multi-objective DnatIt is forwarded by modifying the destination address of the request message to a certain RS rip selected by the scheduling algorithm.Architectural Features:(1) RS should use a private address, that is, RIP should be a private address, each RS gateway must point to the dip(2) The request message and the response message are forwarded through the Director;
Apache Load BalancerApache can also achieve load balancing. The load balancing of Apache is mainly mod_proxy_balancer achieved by implementation. So, what is the configuration method for Apache load Balancing?In the Apache configuration file, httpd.conf addProxyPass / balancer
corresponds to upstream localhost{}.After the above steps, the load Balancer configuration is completed, the following to start Tomcat_1, tomcat_2, and then double-click the nginx root directory Nginx.exe file or use start Nginx boot (shutdown is: nginx-s stop), open the browser, Enter Address: http://localhost will be able to see the first page of Tomcat.Learn
Introduction to load Balancing clusters
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 also be used as 7 layer
The Keepalived load balancing function is actually the LVS
LVS This 4-tier load
The previous article written the Nginx load balancer, this article realizes the high Availability (HA). The overall design of the system is to use Nginx to do load balancing, if there is an nginx single-machine failure, the whole system will not function properly. For the high-availability requirements of system archit
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.