0
0
Microservicessystem_design~20 mins

Sidecar proxy pattern in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Sidecar Proxy Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What is the primary role of a sidecar proxy in a microservices architecture?

In a microservices system, a sidecar proxy is deployed alongside a service instance. What is its main job?

ATo handle service discovery, load balancing, and secure communication for the service it accompanies.
BTo replace the main service logic with a proxy implementation.
CTo store persistent data for the microservice it is paired with.
DTo act as a database caching layer independent of the service.
Attempts:
2 left
💡 Hint

Think about what tasks a proxy can do to help a service without changing its core logic.

Architecture
intermediate
2:00remaining
Which diagram best represents the sidecar proxy pattern?

Choose the architecture diagram that correctly shows how a sidecar proxy is deployed with a microservice.

AA proxy embedded inside the service code as a library.
BA proxy server running on a separate host, routing traffic to multiple services remotely.
CA single container running both the service and proxy code in the same process.
DA service container and a proxy container running together on the same host, sharing the network namespace.
Attempts:
2 left
💡 Hint

Remember that sidecar proxies run alongside the service but as separate processes or containers.

scaling
advanced
2:00remaining
How does the sidecar proxy pattern affect scaling of microservices?

When scaling a microservice horizontally, what must be considered about its sidecar proxies?

AA single sidecar proxy can handle all service instances across multiple hosts.
BEach new service instance must have its own sidecar proxy instance to maintain consistent behavior.
CSidecar proxies are not needed when scaling horizontally because the service handles communication itself.
DSidecar proxies should be scaled independently from the service instances.
Attempts:
2 left
💡 Hint

Think about how sidecar proxies are deployed relative to service instances.

tradeoff
advanced
2:00remaining
What is a key tradeoff when using the sidecar proxy pattern?

Using sidecar proxies adds benefits but also some costs. Which option best describes a main tradeoff?

ASimplified deployment but decreased fault tolerance.
BReduced network latency but loss of security features.
CImproved service communication control at the cost of increased resource usage and complexity.
DLower resource consumption but limited observability.
Attempts:
2 left
💡 Hint

Consider what running extra processes alongside services means for resources and complexity.

estimation
expert
3:00remaining
Estimate the additional resource overhead introduced by sidecar proxies in a microservices deployment with 100 instances.

Each sidecar proxy uses about 50MB memory and 0.1 CPU cores. The service instances use 200MB memory and 0.5 CPU cores each. What is the total additional memory and CPU needed for all sidecar proxies?

A5GB memory and 10 CPU cores
B500MB memory and 1 CPU core
C50GB memory and 100 CPU cores
D10GB memory and 20 CPU cores
Attempts:
2 left
💡 Hint

Multiply the per-instance proxy resource by the number of instances.