that both master and slave MySQL need to turn on the remote access function and set the same username and password!!#设置主从的ip地址, note: This machine is also replaced by IP address.Start AmoebaBin/launcher View LogsTail-f Logs/net.logClient testing:Mysql-h 192.168.137.3-p8066-uroot-prootConfigure Nginx Proxy#serversUpstream test.com { Ip_hash; server 127.0.0.1:8080; server 127.0.0.1:8081;}#以上是每个请求按访问ip的hash结果分配, so that each visitor fixed access to a back-end
}After the modification, also modify the server listening port, the original content is as follows:server {Listen 80;server_name localhost;......The following changes are completed:server {Listen 8086;server_name 10.0.2.136;......In this way, Nginx starts listening for the local IP (10.0.2.136) 8086 port request after booting, then turns its request to the two IIS sites specified in mylocalsite and forwards the results to the client. If everything is configured correctly, then you can run C:/ngi
The structure of an online architecture is basically as follows:650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/8B/wKioL1WfnYXzALyeAApDtOPL5Sg960.jpg "title=" GSDG Gdg.png "alt=" Wkiol1wfnyxzalyeaapdtopl5sg960.jpg "/>Basic Schema Description:The front-end uses lvs+keepalived to do load balancing and high availability to forward the client's request
Linux Server Load balancer cluster system solution-Linux Enterprise Application-Linux server application information. For details, refer to the following section.
1. Introduction to Linux virtual servers
Linux Virtual Server (LVS) is a high-availability Server Load balancer cluster system. The system can provide
Considering the shortcomings of LVS and Nginx (because LVS uses synchronous request forwarding policy and Nginx is the asynchronous forwarding policy, combined with the disadvantage of both: as the Load Balancer server nginx and LVS processing the same request, all requests and response traffic will go through the Nginx server, However, when using LVS, only request traffic through the LVS network, the respo
and do the following:[[Email protected] ~] #ipvsadmThis way, the LVS configuration on the director server is complete.Second, the Real server configurationIn the LVS DR and Tun mode, when the user's access request arrives at the real server, it is returned to the user directly,Instead of passing through the front-end director Server, you need to increase the virtual VIP address on each real Server node,So
Keepalived Master/Slave Server Load balancer, based on the LAMP Platform1. Introduction to the basic principles of keepalived
Keepalived was initially designed to achieve high availability and lightweight lvs front-end ctor. Vrrp protocol.
VRRP is a fault tolerance protocol that ensures that when the next hop router of
1. Introduction to the basic principles of keepalived
Keepalived was initially designed to achieve high availability and lightweight LVS front-end ctor. Vrrp protocol.
Vrrp is a fault tolerance protocol that ensures that when the next hop router of the host fails, another router is used to replace the faulty router, this ensures the continuity and reliability of network communication.Vrrp has the following
different back-end server in chronological order, and can be automatically rejected if the backend server is down. 2), weight specifies the polling probability, the weight value is proportional to the access ratio, and is used in cases where the performance of the backend server is uneven. 2), ip_hash each request according to the hash result of the access IP allocation, so that each visitor fixed access to a back-
For Web application cluster learning, I started from tomcat5.5. Below are some of my practical operations and experiences.
Section 1 Environment
Server Load balancer
*
Operating System: Windows XP
IP Address: 192.168.1.200
Apache: apache_2.2.13-win32-x86-openssl-0.9.8k.msi
Mod_jk: mod_jk-1.2.28-httpd-2.2.3.so (for Windows)
Cluster Environment tomcat1
*
Operating System: SuSE linuxe Server 10
IP Address: 192
.png "" 532 "Height =" 242 "/>
VCL. Load first6./Default. VCL
VCL. Use first6
Then let the client start to initiate a request and give it a try:
650) This. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px "Title =" image "border =" 0 "alt =" image "src =" http://img1.51cto.com/attachment/201409/25/6249823_1411657818Ub2f.png "" 537 "Height =" 251 "/> web1 hard to refresh at this time will still be cach
}After the modification, also modify the server listening port, the original content is as follows:server {Listen 80;server_name localhost;......The following changes are completed:server {Listen 8086;server_name 10.0.2.136;......In this way, Nginx starts listening for the local IP (10.0.2.136) 8086 port request after booting, then turns its request to the two IIS sites specified in mylocalsite and forwards the results to the client. If everything is configured correctly, then you can run C:/ngi
; Proxy_set_header X-real-ip $remote _addr; Proxy_set_header x-forwarded-for $proxy _add_x_forwarded_for; Proxy_buffering off; Proxy_passHttp://wwwbackend; }}3. Testing./ is is successful4. Reload the configuration file/etc/init.d/nginx ReloadIf you restart the report PID error, under the installation path-C reload the configuration file.5, about the parameter description of Nginx configurationA, polling each request according to the Nginx configuration file in order, distributed
#---------------------------------------------------------------------# Global settings#---------------------------------------------------------------------Global # to has these messages end upinch/var/log/Haproxy.log You'll # need to: # #1) Configure Syslog to accept network log events. This is Done# by adding the'- R'Option to the Syslogd_optionsinch # /etc/sysconfig/Syslog # #2) Configure Local2 events to go to the/var/log/Haproxy.log #file.
Prepare thingsTomcatApache ServerMod_jk-1.2.31-httpd-2.2.3.soCan not go to the Internet to download a lot of this is not to say how to downloadInstall Apache FirstOneLocate the installation directory modules and rename the downloaded mod_jk-1.2.31-httpd-2.2.3.so mod_jk.soExample: D:\Program files\apache\modulesAnd put mod_jk.so in the Modules folder.TwoLocate the Conf folderAdd File: workers.properties If you have one, you don't have to. Create a newAdd a new Mod_jk.log in the Logs folder to log
1. Introduction to Linux virtual serversLinux virtual server (LVS) is a high-availability server Load balancer cluster system. The system can provide Load Capacity proportional to the number and performance of server nodes, effectively improving service throughput, reliability, redundancy, adaptability, and high performance and price ratio. At the same time, LVS
The Lvs NAT mode is the full name of virtual server via network address translation (Vs/nat), which rewrites the destination address of the request message via the Net-addressing translation, and assigns the request to the backend's real server according to the scheduled scheduling algorithm. When the response message of the real server passes through the scheduler, the source address of the message is rewritten and returned to the client to complete the loa
html; index index.html index.htm; proxy_pass http://nginxDemo; #配置方向代理地址 }Such as:3. Start Nginx and Tomcat to accessI am a Windows system, so just double-click Nginx.exe in the nginx-1.10.1 directory.can be viewed in Task ManagerFinally enter the address in the browser: http://localhost:8080/nginxDemo/index.jsp, each visit will take turns to access Tomcat (if F5 refresh is not used, it is recommended to try to put the mouse pointer to the address bar, click the Enter key).H
Nginx Load Balancer monitoring node status v plug-in (ngx_http_upstream_check_module)
Upstream_check_module Introduction:
The module can provide Tengine with proactive backend server health checks.The module is not enabled by default before the Tengine-1.4.0 version, it can be opened when the compile option is configured:./configure--with-http_upstream_check_module
Upstream_check_mo
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.