နားလည်ထားရမယ့် အချက်
Redis replication က leader writes ကို replicas သို့ asynchronous ပို့ပါတယ်။ Replicas reconnect လျှင် partial/full resynchronization လုပ်နိုင်ပါတယ်။ Async ဖြစ်လို့ acknowledged write တစ်ခု failover အချိန်မရောက်သေးဘဲဆုံးနိုင်ပြီး replica reads က stale ဖြစ်နိုင်ပါတယ်။ `WAIT` က replica acknowledgements စောင့်ပေမယ့် strong consistency မပြောင်းပေးပါ။
လက်တွေ့ scenario နဲ့ ချိတ်ကြည့်မယ်
Read-heavy catalog တွင် stale-tolerant requests သာ replicas သို့ပို့မယ်။ Session create ပြီးချက်ချင်း read လို flow ကို leader မှဖတ်မယ်။ Replication offset/lag၊ link status၊ full sync frequency နဲ့ backlog sizing ကို monitor လုပ်ပြီး failover data-loss test လုပ်မယ်။
အတူတူ စမ်းရေးကြည့်မယ်
INFO replication
ROLE
WAIT 1 1000
CONFIG GET repl-backlog-size
CONFIG GET min-replicas-to-write
CONFIG GET min-replicas-max-lagRole၊ replica connectivity/offset နှင့် acknowledgement count ရမည်။၅ မိနစ် စမ်းကြည့်
Catalog၊ session၊ rate limit သုံးမျိုးထဲ replica reads ခွင့်ပြု/မပြု matrix ရေးပါ။
သတိလေးတစ်ချက်
Replica နှစ်ခုရှိတာကို zero-data-loss guarantee လို့မပြောပါနှင့်။ Failure timing နဲ့ async lag ကိုထည့်တွက်ပါ။
Redis — Replication — Redis