Bird
0
0

You want to add logging and metrics collection to an existing microservice without changing its code. How can the sidecar proxy pattern help?

hard📝 Trade-off Q8 of 15
Microservices - Service Mesh
You want to add logging and metrics collection to an existing microservice without changing its code. How can the sidecar proxy pattern help?
ABy deploying a sidecar proxy that intercepts all network traffic to collect logs and metrics.
BBy embedding logging code inside the microservice container.
CBy replacing the microservice with a new version that includes logging.
DBy disabling the microservice and using the sidecar proxy alone.
Step-by-Step Solution
Solution:
  1. Step 1: Understand sidecar proxy capabilities

    Sidecar proxies can intercept traffic and collect logs and metrics without modifying the microservice code.
  2. Step 2: Evaluate options

    Embedding code or replacing microservice requires code changes; disabling microservice is invalid.
  3. Final Answer:

    By deploying a sidecar proxy that intercepts all network traffic to collect logs and metrics. -> Option A
  4. Quick Check:

    Sidecar enables logging without code change [OK]
Quick Trick: Sidecar intercepts traffic for logging [OK]
Common Mistakes:
MISTAKES
  • Modifying microservice code
  • Replacing microservice
  • Disabling microservice

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes