Setup Active-Passive Cluster with Keepalived & HAProxy (Two raspberry pis)
Hussein Nasser
@hnasrAbout
Join me as we discuss various software engineering topics with examples and add fun elements to them. We always try to learn by example here in this educational Youtube channel which we believe is the right way to learn. I love Software engineering (especially the backend) and I strive to be a better software engineer every day. Join me on this journey and let us learn together. All opinions, suggestions, and tips I provide in all of this channel's content are my own. Information provided is for educational purposes only. Consider becoming a member to support the channel https://www.youtube.com/channel/UC_ML5xP23TOWKUcc-oAE_Eg/join Check out my courses https://courses.husseinnasser.com Stay awesome! Hussein Nasser, http://www.husseinnasser.com Feel free to shoot me an email [email protected] twitter: @hnasr
Latest Posts
Video Description
UPDATE: I made a mistake on 14:24 to the config thanks for everyone for letting me know. All instances should have the same virtual_router_id. So the secondary should have 101 instead of 102. I got lucky and worked because I assigned different priorities. Sorry for the confusion. Thanks to JR E and Parth Patel for catching the mistake Red hat doc https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/load_balancer_administration/ch-initial-setup-vsa Keepalived is a routing software written in C that provides simple and robust facilities for loadbalancing and high-availability to Linux systems. In this video we will talk about this technology and implement it along side HAProxy as a high availability (failover) Chapters 0:00 Intro 2:10 What is failover? 4:30 What are we building 7:20 KeepAlived Example * What is Keepalived? * Setup Keepalived with HAProxy * VRRP/VIP * Two rapsberrypis with keepalived and haproxy sudo apt-get install keepalived sudo vim /etc/keepalived/keepalived.conf vrrp_instance pi1 { state MASTER interface eth0 virtual_router_id 101 priority 100 authentication { auth_type PASS auth_pass 1234 } virtual_ipaddress { 192.168.254.100 } } vrrp_instance pi2 { state BACKUP interface wlan0 virtual_router_id 101 priority 200 authentication { auth_type PASS auth_pass 1234 } virtual_ipaddress { 192.168.254.100 } } Red HAT Doc https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/load_balancer_administration/ch-initial-setup-vsa Stay Awesome, Hussein
You May Also Like
Budget Gaming PC Build Essentials
AI-recommended products based on this video

Beelink SER3 Mini Desktop PC with AMD Ryzen 3 3200U 2C/4T, 16GB DDR4 500GB PCIE3.0 X4 SSD, Dual Display Output, WiFi6/BT5.2 W-11 Pro Mini Gaming Computer

Beelink SER3 Mini PC, AMD Ryzen 3 3200U(14nm, 2C/4T) up to 3.5GHz, Mini Gaming Computer 16GB DDR4 RAM 500GB PCIE3.0 X4 SSD, Micro PC 4K@60Hz Dual Display, Mini Computer WiFi6/BT5.2/HTPC/W-11 Pro

Beelink SER3 Mini PC, AMD Ryzen 3 3200U(up to 3.5GHz) 2C/4T, Mini Computer 16GB DDR4 RAM 500GB SSD, Mini Desktop Computer 4K@60Hz Dual HDMI Display WiFi6/BT5.2/WOL/HTPC/W-11 Pro

MSI PRO MP251W E2 24.5-inch IPS 1920 x 1080 (FHD) Gaming Office Monitor, 120Hz, Adaptive-Synch, HDR Ready, HDMI, VGA Port, Display Port,VESA Mountable, Tilt, Speaker, 4-Side Slim Bezel,1ms, White

MSI PRO MP271A E2 27-inch IPS 1920 x 1080 (FHD) Gaming Office Monitor, 120Hz, Free-Sync, HDMI, DisplayPort, VGA Port, VESA Mountable, Tilt, Speaker, 4-Side Slim Bezel 1ms, Black

MSI PRO B650-S WiFi ProSeries Motherboard (Supports AMD Ryzen 7000 Series Processors, AM5, DDR5, PCIe 4.0, M.2 Slots, SATA 6Gb/s, USB 3.2 Gen 2, HDMI/DP, Wi-Fi 6E, 2.5Gbps LAN, ATX)

MSI Pro MP341CQ, 34" Monitor, 3440 x 1440(UWQHD) VA, 100Hz, TUV Certified Eyesight Protection, 4ms, Displayport, HDMI, Tilt

Corsair Vengeance LPX 32GB (2 X 16GB) DDR4 3200 (PC4-25600) C16 1.35V Desktop Memory - Black

Skytech Archangel Gaming PC Desktop – AMD Ryzen 5 3600 3.6 GHz, NVIDIA RTX 3060, 1TB NVME SSD, 16GB DDR4 RAM 3200, 600W Gold PSU, 11AC Wi-Fi, Windows 11 Home 64-bit

MSI Thin 15 15.6" 144Hz Gaming Laptop, Intel® Core™ 5-210H, RTX 4050, 16GB DDR5, 1TB NVMe SSD, Windows 11 Home

Fanless Mini PC 13th Gen Core i7 1355U(10C/12T), Win11 Pro Mini Desktop PC Dual 2.5G LAN Mini PC Fanless, Iris Xe Graphics, Dual HD+ DP Triple Display, USB-C, WiFi6, BT5.2, 64GB RAM 1TB NVME SSD

Beelink SER5 MAX Mini PC, AMD Ryzen 7 6800U(8C/16T, Up to 4.7GHz), Mini Computer 32G LPDDR5 RAM 1TB NVMe PCIE4.0 SSD, Mini Desktop Computer 4K@144Hz Triple Display HDMI2.1/DP/WiFi6/BT5.2/W-11 Pro

Western Digital 2TB WD Blue SA510 SATA Internal Solid State Drive SSD - SATA III 6 Gb/s, 2.5"/7mm, Up to 560 MB/s - WDS200T3B0A

Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black




















