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

عرض عملي: حدود لكل عميل عند الحافة

  • الدرس 6 من 6
  • Mid-level
في هذا الدرس 3 موضوعات

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

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

في هذا الدرس

limit by customer and prove fairness. Prepares MID-034-LAB1.

تفاصيل المخطط المبدئي

خطوة بخطوة

  1. Add a Redis-backed request rate limiter filter at the gateway (Spring Cloud Gateway offers one; verify version and key resolver before recording).
  2. Write a key resolver: authenticated customer id, falling back to IP.
  3. Run a load test with an abusive client at 200 requests per second and a normal one at 5; show 429s only for the abusive one.
  4. Planned mistake: run two gateway instances with an in-memory limiter; the abuser gets double the allowance. Fix: shared Redis limiter.
  5. Add Retry-After and a clear JSON error body, and show a client script honoring it.

التطبيق

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

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

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

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