1998 by Dr. Zhangwensong, this project is one of the earliest free software projects in China. LVS is mainly used for multi-server load balancing for the network layer. In a server cluster system built by LVS, the load balancing layer of the front end is called the director server, and the server group layer that serves the backend is called real server. Get an overview of the LVS infrastructure.LVS has three modes of operation, namely Dr (direct Routing), TUN (tunneling IP Tunneling), NAT (net
because all request packages and reply packets require the Director Server to parse and regenerate, affecting efficiency. At the same time, LVS load balancer has 10 scheduling algorithms, namely RR, WRR, LC, WLC, LBLC, LBLCR, dh, sh, sed, NQFor detailed LVS instructions, see PortalIn this paper, we will use LVS to realize MySQL read-write load balancing, keepalived Avoid single point of failure of nodes.Lvs+keepalived Configuring the Environment prep
, Regardless of the actual load condition and connection status on the server.? Weighted round call scheduling: WRR (Weighted Round Robin) The "Weighted round call" scheduling algorithm dispatches access requests based on the different processing capabilities of real server. You can set different scheduling weights for each real server, and for a relatively good real server, you can set a higher weight, and for a less powerful real server, you can set
: 192.168.150.173 (write)R-VIP: 192.168.150.174 (responsible for reading)Client: any. You only need to access the above three IP addresses.3.2 architecture DiagramThe architecture diagram is as follows:3.3 design principles (Exceptions)1. server A and server B use binlog to synchronize data through the mysql slave process.2. enable two virtual IP addresses through keepalived: W-VIP/R-VIP, one responsible for writing, one responsible for reading, to achieve read/write separation.3. When both A an
the same time)
You can also modify the source IP address (cip --> dip) and target IP address (vip --> rip) of the Request Message for forwarding;
Note: The first three types are standard, and the fourth type is post-added. The kernel may not be supported by default, and you need to compile the kernel automatically.
(1) VIP is a public IP address; RIP and DIP are private IP addresses, which may not be in the same IP network, but must communicate with each other through routes;
(2) The source IP
situation of each server, dynamically select a real server to respond to user requests, then the dynamic selection is how to implement, in fact, we are here to say the load scheduling algorithm, according to different network service requirements and server configuration, Ipvs implements the following eight kinds of load scheduling algorithms, here we detail the most commonly used four scheduling algorithms, the remaining four scheduling algorithms please refer to other information.A)RR Polling
theLetter3, each internal RS node gateway address, must be configured as the scheduler lb private LAN within the physical network card address。。。Omitted####################### #IPVS调度器实现了如下十种负载调度算法: LVs scheduling algorithm10 Kinds of scheduling algorithmsFixed scheduling algorithm: Rr,wrr,dh,shDynamic scheduling algorithm: Wlc,lc,lblc,lblcr,sed,nq.Three most commonly used RR WRR WLC10 scheduling algorithm
Kerugaki-Blog Parkhttp://www.cnblogs.com/kailugaji/Software that needs to be prepared:Jdk,eclipse,exe4j,inno Setup CompilerFirst, the Java source program--Personal income tax:Package Math;import Javax.swing.JOptionPane;Kerugaki Http://www.cnblogs.com/kailugaji/public class Wrrtax {public static void main (string args[]) {string Mone Y Enter your income double x, y; Double tax=0; Joptionpane.showmessagedialog (NULL, "personal income tax calculator \ n" + "Producer:" + "Kerugaki \ n" + "http:/
(0.04 sec) 4, do or match: for searching one of two strings, use | as follows: [sql]mysql>select Roleid from V9_admin_ Role where Roleid REGEXP ' 1|3 '; +--------+ |roleid | +--------+ | 1 | | 3 | +--------+ 2 Rowsin Set (0.00 sec) 5, matches one of several characters: matches any single character. As follows: [sql]mysql>select name from V9_collection_node , where name REGEXP ' 005-[123 ]‘; +-----------------+ |name | +-----------------+ |101
identify the layer-4 Information of data packets and rewrite the information based on the QoS policy set on the vswitch. It is worth noting that, instead of a product that supports DSCP, data packets can be identified and overwritten Based on layer-4 (layer-4) information. This is a coincidence. It should be said that it supports identification of Layer 3/4 information, and QoS is truly meaningful, because there are few terminals and software that support IEEE 802.1p in actual applications. Man
# Virtual route number, master and subordinate to always priority 100 # priority, the larger the number, the higher the priority to get processing requests ADV
Ert_int 1 # Check interval, default to 1s (vrrp multicast cycle seconds) authentication {Auth_type Pass Auth_pass 1111} virtual_ipaddress {192.168.1.200 # defines the virtual IP (VIP), can be set more, each line A}} # defines the VIP of the externally provided LVS and port Virtual_server 192 .168.1.200 8080 {delay_loop 6 #
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.