انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهMID-036-L02

الاكتشاف المبني على DNS

  • الدرس 2 من 5
  • Mid-level
في هذا الدرس 4 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

use DNS names for service-to-service calls.

الموضوعات المخطط لها

  • In Docker Compose, every service name is a DNS name on the Compose network: http://inventory:8080.
  • With several replicas, the name resolves to the replicas' addresses (Docker's internal DNS rotates among them).
  • Clients and JVMs may cache DNS results; check the JVM's DNS cache TTL and connection pooling (verify settings before recording).
  • Pooled keep-alive connections stay on one replica until closed, which skews balancing.
  • No library needed: configuration is just a hostname.
تفاصيل المخطط المبدئي

عرض عملي

yaml
services:
  inventory:
    image: shop/inventory
    deploy: { replicas: 3 }
  orders:
    environment:
      INVENTORY_URL: http://inventory:8080

اختبر فهمك

What does orders need to know to reach inventory?

أظهر الإجابة

Only the name inventory and the port.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.