طوابير النصاب للتوافر العالي الحديث
تعلّموا لماذا تُعد طوابير النصاب، المبنية على خوارزمية إجماع Raft، البديل الموصى به للطوابير المنسوخة عند بناء مجموعات RabbitMQ عالية التوافر.
طوابير النصاب للتوافر العالي الحديث درس مجاني في RabbitMQ Messaging & Async Systems على CoddyKit. هذا هو الدرس 4 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في RabbitMQ Messaging & Async Systems، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة RabbitMQ Messaging & Async Systems 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
The Limits of Mirrored Queues
Classic mirrored queues replicate data but suffer from split-brain risks and unpredictable failover behavior under network partitions.
RabbitMQ now recommends quorum queues instead.
What Is a Quorum Queue?
A quorum queue is a replicated queue built on the Raft consensus algorithm. A majority of replicas must agree before a message is considered committed.
Majority Consensus
With Raft, writes are durable once a quorum (majority) of nodes acknowledges them. With 3 replicas, 2 must agree, so the cluster tolerates losing 1 node.
Declaring a Quorum Queue
Set the queue type argument to quorum.
channel.queue_declare(
queue='payments',
durable=True,
arguments={'x-queue-type': 'quorum'}
)Leader and Followers
Each quorum queue has one leader replica and several followers. The leader handles client traffic; if it fails, followers elect a new leader automatically.
Choosing Replica Count
Use an odd number of replicas (3 or 5) so a clear majority always exists. Even counts waste a node without improving fault tolerance.
Durability by Design
Quorum queues are always durable and store messages on disk across replicas. There is no transient quorum queue.
Poison Message Handling
Quorum queues track a per-message delivery count, enabling automatic dead-lettering of repeatedly failing poison messages, something mirrored queues lacked.
arguments={'x-queue-type': 'quorum', 'x-delivery-limit': 5}Quorum vs Mirrored
- Mirrored: deprecated, split-brain prone
- Quorum: Raft-based, predictable failover, poison handling
Migrate mirrored queues to quorum for new deployments.
Trade-offs
Quorum queues use more memory and disk for replication and have slightly higher latency per write, the cost of strong consistency. They are best for important, durable workloads.
Monitoring Replicas
The management UI shows each quorum queue's leader, online replicas, and replica lag, helping you confirm the cluster is healthy before maintenance.
Quick Check
Test your quorum queue knowledge.
Recap
Quorum queues use the Raft consensus algorithm to provide predictable, durable high availability, replacing the deprecated mirrored queues.
Declare them with x-queue-type: quorum, use an odd replica count, and gain built-in poison message handling for resilient clusters.
تعلم RabbitMQ Messaging & Async Systems مع معلم ذكاء اصطناعي — مجانًا
اكتب وقم بتشغيل أكوادك الفعلية في المتصفح، واحصل على مساعدة فورية من معلم ذكاء اصطناعي متاح 24/7، واستمر من حيث توقفت على الويب أو في التطبيق.
- الدورات
- 11
- الدروس
- 44
الأسئلة الشائعة
هل درس «طوابير النصاب للتوافر العالي الحديث» مجاني؟
نعم — نص درس «طوابير النصاب للتوافر العالي الحديث» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة RabbitMQ Messaging & Async Systems، انتقل إلى CoddyKit PRO. تتضمن دورة RabbitMQ Messaging & Async Systems 4 دروس في المجموع.
ماذا ستتعلم في «طوابير النصاب للتوافر العالي الحديث»؟
تعلّموا لماذا تُعد طوابير النصاب، المبنية على خوارزمية إجماع Raft، البديل الموصى به للطوابير المنسوخة عند بناء مجموعات RabbitMQ عالية التوافر. تتمرن على RabbitMQ Messaging & Async Systems مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ RabbitMQ Messaging & Async Systems؟
لا تُشترط خبرة سابقة. RabbitMQ Messaging & Async Systems على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 4 من أصل 4.
كم من الوقت يستغرق درس «طوابير النصاب للتوافر العالي الحديث»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس RabbitMQ Messaging & Async Systems هذا؟
نعم. كل درس في RabbitMQ Messaging & Async Systems يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- مفاهيم تجميع RabbitMQ
- إعداد بيئة مجمّعة
- قوائم الانتظار المتطابقة للتوافر العالي
- طوابير النصاب للتوافر العالي الحديث