المضيفون الافتراضيون لعزل المستأجرين المتعددين
استخدموا المضيفين الافتراضيين في RabbitMQ لعزل التبادلات والطوابير والأذونات بين الفرق أو البيئات، وهو حجر الأساس في عمليات النشر الآمنة متعددة المستأجرين.
المضيفون الافتراضيون لعزل المستأجرين المتعددين درس مجاني في RabbitMQ Messaging & Async Systems على CoddyKit. هذا هو الدرس 4 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في RabbitMQ Messaging & Async Systems، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة RabbitMQ Messaging & Async Systems 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
Why Isolation Matters
Sharing one broker across teams or environments risks name clashes and accidental cross-access. Virtual hosts (vhosts) partition a broker into isolated namespaces.
What Is a Virtual Host?
A vhost is a logical grouping of exchanges, queues, bindings, and permissions. Resources in one vhost are invisible to another, even with identical names.
The Default Vhost
RabbitMQ ships with a default vhost named /. Production setups usually create dedicated vhosts instead of using the default for everything.
Creating a Vhost
Create vhosts via the CLI.
rabbitmqctl add_vhost team-paymentsGranting Permissions per Vhost
Permissions are scoped to a vhost. Grant a user configure, write, and read access with regex patterns.
rabbitmqctl set_permissions -p team-payments alice '.*' '.*' '.*'Connecting to a Vhost
Clients select a vhost in the connection parameters; the same credentials may have different rights in different vhosts.
params = pika.ConnectionParameters(host='localhost', virtual_host='team-payments')Isolation in Practice
- Queue
ordersin vhost A is separate fromordersin vhost B - A user without permission on a vhost cannot even see it
- Resource limits can be applied per vhost
Vhost vs Separate Brokers
Vhosts give logical isolation on shared infrastructure, cheaper than running many brokers, but they share the same node resources (CPU, memory, disk).
Per-Vhost Limits
You can cap the number of connections and queues per vhost to stop one tenant from starving others.
rabbitmqctl set_vhost_limits -p team-payments '{"max-connections": 100, "max-queues": 50}'Monitoring per Vhost
The management plugin shows metrics broken down by vhost, so you can track each tenant's message rates, queue depths, and connection counts independently.
Security Best Practices
- One vhost per team or environment
- Least-privilege permission regexes
- Avoid the default vhost for real workloads
- Apply per-vhost limits
Quick Check
Test your vhost understanding.
Recap
Virtual hosts partition a single broker into isolated namespaces with their own resources, permissions, and limits.
Use one vhost per team or environment, apply least-privilege permissions and per-vhost limits, and avoid the default vhost for production traffic.
تعلم RabbitMQ Messaging & Async Systems مع معلم ذكاء اصطناعي — مجانًا
اكتب وقم بتشغيل أكوادك الفعلية في المتصفح، واحصل على مساعدة فورية من معلم ذكاء اصطناعي متاح 24/7، واستمر من حيث توقفت على الويب أو في التطبيق.
- الدورات
- 11
- الدروس
- 44
الأسئلة الشائعة
هل درس «المضيفون الافتراضيون لعزل المستأجرين المتعددين» مجاني؟
نعم — نص درس «المضيفون الافتراضيون لعزل المستأجرين المتعددين» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة RabbitMQ Messaging & Async Systems، انتقل إلى CoddyKit PRO. تتضمن دورة RabbitMQ Messaging & Async Systems 4 دروس في المجموع.
ماذا ستتعلم في «المضيفون الافتراضيون لعزل المستأجرين المتعددين»؟
استخدموا المضيفين الافتراضيين في 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 والأذونات
- SSL/TLS للاتصالات الآمنة
- إضافة إدارة RabbitMQ والمقاييس
- المضيفون الافتراضيون لعزل المستأجرين المتعددين