Haproxy
Haproxy
Ping
curl
netstat
nslookup
hostfile changes for lookup usning DNS
telnet
top
Web Server:
Apt get install httpd
/etc/httpd/conf/httpd.conf
Installation:
1. 2 web server - apache 1 & apache 2
defaults
# running mode
mode http # use tcp for DB loadbalancing
# use global settings
log global
# get HTTP request log
option httplog
# timeout if backends do not reply
timeout connect 10s
# timeout on client side
timeout client 30s
# timeout on server side
timeout server 30s
#configure Stats
listen stats # Define a listen section called "stats"
bind :9000 # Listen on localhost:9000
mode http
stats enable # Enable stats page
stats hide-version # Hide HAProxy version
stats realm Haproxy\ Statistics # Title text for popup window
stats uri /haproxy_stats # Stats URI
stats auth Username:Password # Authentication credentials
# define frontend ( set any name for "http-in" section )
frontend http-in
# listen 80
bind *:80 #chnage to 90 restart LB will run on 90
# set default backend
default_backend backend_servers
# send X-Forwarded-For header
option forwardfor
# define backend
backend backend_servers
# balance with roundrobin
balance roundrobin #weighted#leastconnection
# define backend servers
server client2 192.168.56.202:80 check
server client4 192.168.56.206:80 check
# define backend
backend backend_servers_90
# balance with roundrobin
balance roundrobin #weighted#leastconnection
# define backend servers
server client2 192.168.56.202:80 check
server client4 192.168.56.206:80 check
netstat tulpn
/etc/syscon/selini
disable Selinux
Multiport:
# define backend
backend backend_servers_443
# balance with roundrobin
balance roundrobin #weighted#leastconnection