0Pricing
API Gateway & Reverse Proxy (Nginx + Spring Cloud Gateway) · درس

الوكيل الأمامي مقابل الوكيل العكسي: اختيار الأداة المناسبة

قارنوا بين الوكلاء الأماميين والوكلاء العكسيين وبوابات API جنبًا إلى جنب، لتعرفوا أيّها تختارون في كل سيناريو واقعي.

الوكيل الأمامي مقابل الوكيل العكسي: اختيار الأداة المناسبة درس مجاني في API Gateway & Reverse Proxy (Nginx + Spring Cloud Gateway) على CoddyKit. هذا هو الدرس 4 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في API Gateway & Reverse Proxy (Nginx + Spring Cloud Gateway)، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة API Gateway & Reverse Proxy (Nginx + Spring Cloud Gateway) 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

Two Directions of Proxying

Proxies all sit in the middle of traffic, but face opposite ways: a forward proxy represents the client; a reverse proxy represents the server.

The Forward Proxy

A forward proxy fronts clients and fetches the internet for them. The destination server sees the proxy's IP, never the client's.

Forward Proxy Use Cases

Reach for a forward proxy to filter and log corporate traffic, cache shared content, hide client IPs, or bypass geo and network blocks.

The Reverse Proxy

A reverse proxy fronts servers. Clients think they're talking to one machine, but it forwards to backends they never see.

Reverse Proxy Use Cases

Reverse proxies power most web infrastructure: load balancing, TLS termination, caching and compression, and hiding your internal topology.

Where the API Gateway Fits

An API gateway is a reverse proxy built for APIs — layering on auth, rate limiting, request transformation, and routing by path or service.

Side-by-Side Comparison

Quick mental model: forward serves clients, reverse serves servers, and a gateway is a reverse proxy plus API policy.

A Reverse Proxy in Nginx

Nginx is the classic reverse proxy. This config quietly forwards every incoming request to a backend app.

server {
  listen 80;
  location / {
    proxy_pass http://127.0.0.1:3000;
  }
}

Gateway Routing by Path

An API gateway routes paths to services — fronting a whole microservice system behind one entry point, as this Nginx routing shows.

location /users/ { proxy_pass http://users-svc; }
location /orders/ { proxy_pass http://orders-svc; }

Can One Tool Do Both?

Yes — Nginx can be a forward proxy, reverse proxy, or gateway. The role comes from direction and config, not the software itself.

Choosing in Practice

Choosing is about who you protect: outbound client traffic means a forward proxy, inbound to servers a reverse proxy, inbound APIs a gateway.

Quick Check

Test your proxy direction knowledge.

Recap

Recap: forward proxies serve clients, reverse proxies serve servers, and a gateway adds API policy. One tool like Nginx can play any role.

الأسئلة الشائعة

هل درس «الوكيل الأمامي مقابل الوكيل العكسي: اختيار الأداة المناسبة» مجاني؟

نعم — نص درس «الوكيل الأمامي مقابل الوكيل العكسي: اختيار الأداة المناسبة» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة API Gateway & Reverse Proxy (Nginx + Spring Cloud Gateway)، انتقل إلى CoddyKit PRO. تتضمن دورة API Gateway & Reverse Proxy (Nginx + Spring Cloud Gateway) 4 دروس في المجموع.

ماذا ستتعلم في «الوكيل الأمامي مقابل الوكيل العكسي: اختيار الأداة المناسبة»؟

قارنوا بين الوكلاء الأماميين والوكلاء العكسيين وبوابات API جنبًا إلى جنب، لتعرفوا أيّها تختارون في كل سيناريو واقعي. تتمرن على API Gateway & Reverse Proxy (Nginx + Spring Cloud Gateway) مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ API Gateway & Reverse Proxy (Nginx + Spring Cloud Gateway)؟

لا تُشترط خبرة سابقة. API Gateway & Reverse Proxy (Nginx + Spring Cloud Gateway) على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 4 من أصل 4.

كم من الوقت يستغرق درس «الوكيل الأمامي مقابل الوكيل العكسي: اختيار الأداة المناسبة»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس API Gateway & Reverse Proxy (Nginx + Spring Cloud Gateway) هذا؟

نعم. كل درس في API Gateway & Reverse Proxy (Nginx + Spring Cloud Gateway) يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. ما هو الخادم الوكيل؟
  2. أساسيات الوكيل العكسي
  3. مقدمة إلى بوابات API
  4. الوكيل الأمامي مقابل الوكيل العكسي: اختيار الأداة المناسبة
← العودة إلى API Gateway & Reverse Proxy (Nginx + Spring Cloud Gateway)