Health Monitors & High Availability

F5 BIG-IP LTM F5 BIG-IP VE (GUI + TMSH)

مقصدObjectiveObjective

اس سبق میں آپ pool سے health monitors جوڑیں گے، monitor کی اقسام سمجھیں گے، اور HA sync اور failover کے تصور کو سیکھیں گے۔Is lesson mein aap pool se health monitors jorenge, monitor ki aqsaam samjhenge, aur HA sync aur failover ke tasawwur ko seekhenge.In this lesson you will attach health monitors to a pool, understand monitor types, and learn HA sync and failover concepts.

آسان مثالSimple AnalogySimple Analogy

Health monitor ایسا ہے جیسے سرجری سے پہلے نرس مریض کی نبض چیک کرے — BIG-IP صرف ان سرورز کو ٹریفک بھیجتا ہے جو زندہ ہونے کا ثبوت دیں۔Health monitor aisa hai jaise surgery se pehle nurse mareez ki nabz check kare — BIG-IP sirf un servers ko traffic bhejta hai jo zinda hone ka saboot den.A health monitor is like a nurse taking a patient's pulse before surgery — the BIG-IP only sends traffic to servers that prove they are alive.

سیٹ اپLab SetupLab Setup

BIG-IP VE پچھلے سبق کے web-pool کے ساتھ۔ HA کے لیے، تصور کریں کہ دوسری BIG-IP VE peer اسی نیٹ ورک پر جڑی ہے۔BIG-IP VE pichlay lessons ke web-pool ke sath. HA ke liye, tasawwur karein ke dosri BIG-IP VE peer usi network par juri hai.BIG-IP VE with web-pool from previous lessons. For HA, imagine a second BIG-IP VE peer connected on the same networks.

اقداماتStepsSteps

Step 1

Built-in monitors کی فہرست دیکھیں۔ tcp، http اور https سب سے عام ہیں۔Built-in monitors ki list dekhen. tcp, http aur https sab se aam hain.List the built-in monitors. tcp, http, and https are the most common.

tmsh list ltm monitor | grep -E 'tcp|http' | head

Step 2

ایک HTTP monitor بنائیں جو ایک پیج مانگتا ہے اور '200 OK' کی توقع رکھتا ہے، پھر اسے pool سے جوڑ دیں۔Ek HTTP monitor banayen jo ek page mangta hai aur '200 OK' ki tawaqqu rakhta hai, phir ise pool se jor dein.Create an HTTP monitor that requests a page and expects '200 OK', then attach it to the pool.

tmsh create ltm monitor http my-http-monitor send "GET / HTTP/1.1\\r\\nHost: example.com\\r\\n\\r\\n" recv "200 OK"
tmsh modify ltm pool web-pool monitor my-http-monitor

🖱️ Local Traffic > Monitors > Create، پھر Local Traffic > Pools > web-pool میں جوڑ دیںLocal Traffic > Monitors > Create, phir Local Traffic > Pools > web-pool mein jor deinLocal Traffic > Monitors > Create, then attach under Local Traffic > Pools > web-pool

Step 3

Member کی حیثیت دوبارہ چیک کریں — جو member monitor میں fail ہوگا وہ لال دکھے گا اور ٹریفک لینا بند کر دے گا۔Member ki haisiyat dobara check karein — jo member monitor mein fail hoga woh laal dikhega aur traffic lena band kar dega.Check member status again — a member that fails the monitor will show red and stop receiving traffic.

tmsh show ltm pool web-pool members

Step 4

HA کا تصور: دو ڈیوائسز active/standby pair بناتی ہیں۔ Active device ٹریفک سنبھالتا ہے؛ standby تیار کھڑا رہتا ہے تاکہ سنبھال لے۔HA ka tasawwur: do devices active/standby pair banati hain. Active device traffic sambhalta hai; standby taiyar khara rehta hai taake sambhal le.HA concept: two devices form an active/standby pair. The active device handles traffic; the standby waits, ready to take over.

Step 5

HA setup کا تصور: peer device کو trust domain میں شامل کریں تاکہ ڈیوائسز ایک دوسرے کو پہچان سکیں۔HA setup ka tasawwur: peer device ko trust domain mein shamil karein taake devices ek dosre ko pehchan saken.HA setup concept: add the peer device to the trust domain so the devices recognize each other.

tmsh create cm device device2 configsync-ip 10.10.10.2
tmsh modify cm trust-domain add-device { device-name device2 address 10.10.10.2 username admin password xxxxx }

Step 6

ایک config sync group بنائیں تاکہ HA peers کے درمیان کنفیگریشن کی تبدیلیاں خودبخود sync ہوں۔Ek config sync group banayen taake HA peers ke darmiyan configuration ki tabdeeliyan khud-ba-khud sync hon.Create a config sync group so configuration changes sync automatically between the HA peers.

tmsh create cm sync-group my-sync devices add { device1 device2 }

Step 7

HA کا اہم اصول: تبدیلیاں ایک ڈیوائس پر کریں، پھر دوسری پر sync کریں۔ تبدیلیوں کے بعد ہمیشہ sync status چیک کریں۔HA ka ahem usool: tabdeeliyan ek device par karein, phir dosri par sync karein. Tabdeeliyon ke baad hamesha sync status check karein.HA key rule: make changes on one device, then sync to the other. Always check sync status after changes.

🖱️ Device Management > Overview — sync status اور device failover stateDevice Management > Overview — sync status aur device failover stateDevice Management > Overview — sync status and device failover state

تصدیقVerifyVerify

تصدیق: custom monitor pool سے جڑا ہے، members سبز ہیں، اور آپ HA sync کے بہاؤ کی وضاحت کر سکتے ہیں۔Tasdeeq: custom monitor pool se jura hai, members sabz hain, aur aap HA sync ke flow ki wazahat kar sakte hain.Verify: custom monitor is attached to the pool, members are green, and you can explain the HA sync flow.

tmsh show ltm pool web-pool
tmsh show cm sync-status

خرابی دور کرناTroubleshootingTroubleshooting

⚠️ سروس چل رہی ہے پھر بھی تمام members down دکھ رہے ہیںService chal rahi hai phir bhi tamam members down dikh rahe hainAll members show down even though the service is up

✅ Monitor کی expected string غلط ہو سکتی ہے — send/recv strings چیک کریں اور curl سے manually ٹیسٹ کریں۔Monitor ki expected string ghalat ho sakti hai — send/recv strings check karein aur curl se manually test karein.The monitor's expected string may be wrong — check the send/recv strings and test manually with curl.

⚠️ HA ڈیوائسز sync نہیں ہو رہیHA devices sync nahi ho rahiHA devices not syncing

✅ Trust domain کی حیثیت اور configsync انٹرفیس پر کنیکٹیویٹی چیک کریں، پھر sync دوبارہ کوشش کریں۔Trust domain ki haisiyat aur configsync interface par connectivity check karein, phir sync dobara koshish karein.Check trust domain status and connectivity on the configsync interface, then retry the sync.

انٹرویو سوالاتInterview Q&AInterview Q&A

❓ Health monitor کیا ہے اور اس کا کیا کردار ہے؟Health monitor kya hai aur is ka kya kirdar hai?What is a health monitor and what is its role?

Monitor چیک کرتا ہے کہ pool member صحت مند ہے یا نہیں — صرف صحت مند members کو ٹریفک ملتی ہے۔ اقسام میں TCP، HTTP، HTTPS اور custom monitors شامل ہیں۔Monitor check karta hai ke pool member sehatmand hai ya nahi — sirf sehatmand members ko traffic milti hai. Aqsaam mein TCP, HTTP, HTTPS aur custom monitors shamil hain.A monitor checks whether a pool member is healthy — only healthy members receive traffic. Types include TCP, HTTP, HTTPS, and custom monitors.

❓ BIG-IP پر high availability کیسے کام کرتی ہے؟BIG-IP par high availability kaise kaam karti hai?How does high availability work on the BIG-IP?

دو ڈیوائسز ایک HA pair بناتے ہیں (active/standby)۔ کنفیگریشن sync ہوتی ہے، اور اگر active device fail ہو جائے تو standby چند سیکنڈ میں سنبھال لیتا ہے۔Do devices ek HA pair banate hain (active/standby). Configuration sync hoti hai, aur agar active device fail ho jaye to standby chand second mein sambhal leta hai.Two devices form an HA pair (active/standby). Configuration is synced, and if the active device fails, the standby takes over within seconds.