I have recently tried to load balance my application using HAProxy and was able to do it successfully. Later, I have come across a concept called Floating IP, which can be used along with keepalived to make the load balancer highly available. I wasn't able to understand how to create the floating Ip though. How can I create Floating IP and use it to configure HAProxy? Thanks.
相关问题
- HAProxy: hdr_dom(host) with redirects
- Load balancing with Yii sessions
- How to balance webserver bandwith usage?
- Load Balancer $_SERVER['REMOTE_ADDR'] Not
- How to add/update the port of a backend in a Backe
相关文章
- Sticky session not working with multiple apache vh
- HAproxy: different 503 errorfile for OPTIONS and P
- JSessionID is overwritten when switching between H
- Session affinity on load balancer
- Google Cloud HTTP Load Balancer Health Check Fails
- Load balancing server, how can I implement it?
- Get Client IP address using WCF 4.5 RemoteEndpoint
- Hashtable insert failed. Load factor too high. - a
Assumptions:
Steps:
sudo ufw allow in from 198.51.100.20 to 224.0.0.18
# on 198.51.100.10sudo ufw allow in from 198.51.100.10 to 224.0.0.18
# on 198.51.100.20/etc/sysctl.conf
net.ipv4.ip_nonlocal_bind=1
sudo sysctl -p
# reload config changesudo apt-get install keepalived
/etc/keepalived/keepalived.conf
/etc/haproxy/haproxy.cfg
bind 198.51.100.50:80
sudo service haproxy restart
sudo ip addr show | grep eth0
# should list the shared IPsudo ip addr show | grep eth0
# should NOT list the shared IPsudo service haproxy stop
sudo ip addr show | grep eth0
# should NOT list the shared IPsudo ip addr show | grep eth0
# should list the shared IPsudo service haproxy start
sudo ip addr show | grep eth0
# should list the shared IPsudo ip addr show | grep eth0
# should NOT list the shared IP/etc/keepalived/keepalived.conf