Comparison between 2 HA solutions
| Sloutin 1 | Slution 2 | |
|---|---|---|
| Compare Item | SUSE LINUX HA EXTENSION | KeepAlived |
| diff -bur /home/vagrant/redis-2.8.21/redis.conf /home/vagrant/redis-2.8.21_codis/redis.conf | |
| --- /home/vagrant/redis-2.8.21/redis.conf 2015-06-04 09:32:24.000000000 +0000 | |
| +++ /home/vagrant/redis-2.8.21_codis/redis.conf 2015-11-11 02:45:49.550199788 +0000 | |
| @@ -34,7 +34,7 @@ | |
| # By default Redis does not run as a daemon. Use 'yes' if you need it. | |
| # Note that Redis will write a pid file in /var/run/redis.pid when daemonized. | |
| -daemonize no | |
| +daemonize yes | |
| //’Hello World’ v2 netfilter hooks example | |
| //For any packet, get the ip header and check the protocol field | |
| //if the protocol number equal to UDP (17), log in var/log/messages | |
| //default action of module to let all packets through | |
| #include <linux/kernel.h> | |
| #include <linux/module.h> | |
| #include <linux/netfilter.h> | |
| #include <linux/netfilter_ipv4.h> | |
| #include <linux/skbuff.h> |
| #+AUTHOR: Kevin Zeng | |
| #+Email: [email protected] | |
| #+TODO: TODO(t) IN-PROGRESS(p) WAIT(r) SUSPEND(s) | DONE(d) | |
| #+TAGS: Kevin(k) Tom(o) Laurence(l) Gavin(g) | |
| LVS performance test environment overview | |
| * Purpose | |
| - Make a simple overview page for performance test. | |
| - For better communication. | |
| * Deployment | |
| ** LVS in NAT mode |
| //sniffer.c | |
| //To compile : gcc -o sniffer sniffer.c -lpcap | |
| //To run : ./sniffer [interface-name] | |
| #include <pcap.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <ctype.h> | |
| #include <errno.h> |
| obj-m := hello.o | |
| KDIR := /lib/modules/$(shell uname -r)/build | |
| PWD := $(shell pwd) | |
| default: | |
| $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules | |
| #define __KERNEL__ | |
| #define MODULE | |
| #include <linux/module.h> | |
| #include <linux/kernel.h> | |
| #include <linux/netfilter_ipv4.h> | |
| #include <linux/skbuff.h> | |
| #include <linux/udp.h> | |
| #include <linux/ip.h> |
| #MSC for lvs in DR transparent mode | |
| msc{ | |
| hscale = "2"; | |
| Client,LB,RS,OS; | |
| Client=>Client [ label = "req(oip:oport)"]; | |
| Client=>Client [ label = "routeto(LB)"]; | |
| Client->LB [ label = "(cip:cport)->(oip:oport)"]; | |
| LB=>LB [ label = "iptable->fwmark(dst==oip,dst_port=oport)"]; | |
| LB=>LB [ label = "(cip:cport)->(oip:oport)+fwmark"]; |
Comparison between 2 HA solutions
| Sloutin 1 | Slution 2 | |
|---|---|---|
| Compare Item | SUSE LINUX HA EXTENSION | KeepAlived |