Bird
0
0

Consider a microservice with a Sidecar that handles service discovery. If the main service sends a request to another service, what is the likely flow?

medium📝 Analysis Q4 of 15
Microservices - Advanced Patterns
Consider a microservice with a Sidecar that handles service discovery. If the main service sends a request to another service, what is the likely flow?
ASidecar sends request without main service involvement
BMain service sends request to Sidecar, Sidecar resolves address and forwards request
CMain service directly queries the service registry and sends request
DMain service ignores Sidecar and sends request to a fixed IP
Step-by-Step Solution
Solution:
  1. Step 1: Understand Sidecar role in service discovery

    The Sidecar intercepts requests from the main service to resolve service addresses dynamically.
  2. Step 2: Analyze request flow

    The main service sends the request to the Sidecar, which looks up the destination and forwards the request accordingly.
  3. Final Answer:

    Main service sends request to Sidecar, Sidecar resolves address and forwards request -> Option B
  4. Quick Check:

    Service discovery flow = Main to Sidecar to destination [OK]
Quick Trick: Sidecar handles discovery, main service sends requests through it [OK]
Common Mistakes:
  • Assuming main service queries registry directly
  • Thinking Sidecar sends requests alone
  • Ignoring Sidecar in request flow

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes