/ipv4/conf/lo/arp_ignore
echo "2" >/proc/sys/net/ipv4/conf/lo/arp_announce
echo "1" >/proc/sys/net/ipv4/conf/all/arp_ignore
echo "2" >/proc/sys/net/ipv4/conf/all/arp_announce
View route after execution to have a virtual IP route pointing lo Interface
[Root@web01 ~]# Route-n
Kernel IP Routing Table
Destination Gateway genmask Flags Metric Ref use Iface
192.168.40.6 0.0.0.0 255.255.255.255 UH 0 0 0 Lo
Four: Test LVs
Will IPVS01,IPVS02, keepalived service launch
Will web01,web02, HTTP service s
20capturerequestheaderrefererlen60default_backendserversbackend serversbalanceroundrobinserverweb1172.16.100.101:80checkmaxconn 3000serverweb2172.16.100.102:80checkmaxconn3000#haproxy-c -f/etc/haproxy/haproxy.cfg# Check configuration file #servicehaproxystart Access:/http 172.16.100.128 Two Web can poll the Toggle Access Monitoring Status page:http://172.16.100.128:1080/haproxyadmin?stats the following scheduling algorithm for Haproxy: Defining the load
/ipv4/conf/lo/arp_ignore
echo "2" >/proc/sys/net/ipv4/conf/lo/arp_announce
echo "1" >/proc/sys/net/ipv4/conf/all/arp_ignore
echo "2" >/proc/sys/net/ipv4/conf/all/arp_announce
View route after execution to have a virtual IP route pointing lo Interface
[Root@web01 ~]# Route-n
Kernel IP Routing Table
Destination Gateway genmask Flags Metric Ref use Iface
192.168.40.6 0.0.0.0 255.255.255.255 UH 0 0 0 Lo
Four: Test LVs
Will IPVS01,IPVS02, keepalived service launch
Will web01,web02, HTTP service s
If you have been paying attention to nginx, you must know what the nginx software is for. If your website traffic is getting higher and higher, one server can no longer withstand traffic pressure, let's increase the number of servers for load. Website load can be achieved by buying hardware devices, such as F5, but the price ranges from hundreds of thousands to m
A brief introduction of LVSLVS is the short name of Linux virtual server, the Linux VM, a free software project initiated by Dr. Zhangwensong, and its official site is www.linuxvirtualserver.org. Now that LVS is already part of the Linux standard kernel, Before the Linux2.4 kernel, the use of LVS must be recompiled to support the LVS function module, but from the Linux2.4 kernel, has been completely built in the LVS function modules, no need to make any patches to the kernel, you can directly us
Tags: save transparent IDE Another best character cat height Center1.What is Maxscale? After configuring MySQL 's master-slave replication structure, we want to implement read-write separation, spread the reads to the slave server, and load balance multiple slave servers. read-write separation and load balancing are the basic requirements of MySQL cluster, and M
:: 1/128 Scope HostValid_lft Forever Preferred_lft Forever2:eth0: Link/ether 00:0c:29:af:00:4e BRD FF:FF:FF:FF:FF:FFinet 192.168.0.130/24 BRD 192.168.0.255 Scope Global eth0inet 192.168.0.150/32 Scope Global eth0Inet6 FE80::20C:29FF:FEAF:4E/64 Scope linkValid_lft Forever Preferred_lft ForeverStop keepalived:/etc/init.d/keepalived stop on the primary server and then check from the server to see if it is alre
requires two features, the first being high performance, and the second being highly available.1. Test High PerformanceWhen the client uses the browser to open http://172.16.10.30/test.html, the browser displays information:Refresh and display the message:You can see that the cluster's load-balancing schedule takes effect to meet the high-performance requirements of the cluster.2. Test High AvailabilityDea
The company recently had a project because users are concerned that a single machine can not afford to use the maximum number of users, the application cluster requirements. We designed the application cluster architecture according to the application situation.
The architecture diagram is as follows:
Features for deploying application clusters:
1. Front-end Agent load balancing
Because the user envir
: 192.168.207.131 port 8080
2. customize the nginx configuration file
Operate on 192.168.207.130 and 192.168.207.131
[Plain] view plaincopy
Useradd nginx
Vi/usr/local/nginx/conf/nginx. conf
The content is as follows:
[Plain] view plaincopy
# Running user
User nginx;
# Start a process
Worker_processes 2;
# Global error logs and PID files
Error_log logs/error. log notice;
Pid
Use lvs keepalived to configure redis high availability and load balancing, lvsredisRequirement
We use elasticsearch for log service. The architecture is upstream data source => redis => logstash => ES
Redis is still a single point of use, and there is no high availability. Now there is more and more data. If downstream consumption is not a problem, it will take place if data in redis comes, but once the do
detectionHaproxy mode of operation; the default is TCP; There are three types: TCP, HTTP, healthOnly the client and frontend, the backend is HTTP communication to use HTTP modeLog can also be specified in the front segment:Frontend main *:80 Log global log 127.0.0.2 Local3Defining the latter segment with Use_backend and ACLsUse_backend Dynamic If Url_dynUse_backend static if Url_css url_img extension_imgParameters that can be added after the server s
server is ready, and can be seamlessly handed over to another instance/server. data may be lost. If there are high requirements for data reliability in the future, it will work with dump and master slave.
Server Load balancer. if you only consider high availability, you can actually use keepalived. When a redis-server/server crashes, the VIP will be transferred to another server, but the backup server will be idle, our company is small and cannot be
Description
Operating system: CentOS 5.X 64-bit
Web server: 192.168.21.127, 192.168.21.128
Sites: Bbs.111cn.net and Sns.111cn.net deployed on two Web servers
To achieve the purpose:
Add two servers (main main mode) to achieve Web server load balancing through haproxy+keepalived
Architecture Planning:
Haproxy server: 192.168.21.129, 192.168.
network server and kept inLocal memory. So what if you use load balancing in a web scope? (For more information about server load balancer, seeMsdn article 'asp and Web Session management '). For real load balancingWhen a user clicks a connection, it changes the status of the server, and may lose theirSession
/90/wKiom1Nkl9uBLSLkAAI7Nv82x7o994.jpg "title=" 111. PNG "alt=" wkiom1nkl9ublslkaai7nv82x7o994.jpg "/>Keepalived 2:650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/25/90/wKioL1Nkl--RJs-GAAHu-Fe95vg162.jpg "title=" 222. JPG "alt=" wkiol1nkl--rjs-gaahu-fe95vg162.jpg "/>Let's simulate the first haproxy stop, and then look at the VIP will be all the way to keepalived 2:[[Email protected] ~]# service haproxy stopstopping haproxy: [ OK ]View keepali
frequent exchanges, and the loss of response can only restart the server.L Low Costbuy F5 big-IP netscaler hardware load balancer switch Hundreds of thousands ofNginx based on BSD Open source protocol free, commercially availablel support rewrite rewrite rulesability to distribute HTTP requests to different back-end server groups based on domain names and URL differencesl built-in health check functionif a
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.