استراتيجيات موازنة الحِمل
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
choose a balancing strategy and understand health-driven routing.
الموضوعات المخطط لها
- Round robin: simple and even for similar requests.
- Least connections: better when request durations vary.
- Random, or power of two choices: cheap and effective at scale.
- Sticky sessions: pins a client to an instance; avoid by keeping services stateless.
- Health checks: remove failed instances. In-flight requests to a dying instance can still fail, so use graceful shutdown and connection draining.
تفاصيل المخطط المبدئي
عرض عملي
| Strategy | Good when | Watch for |
|---|---|---|
| Round robin | uniform requests | long requests pile up |
| Least connections | varied durations | needs connection tracking |
| Sticky | stateful legacy | uneven load, failover loss |
اختبر فهمك
What limits errors during a deployment?
أظهر الإجابة
Readiness-based routing plus graceful shutdown that drains in-flight requests.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.