0
0
Microservicessystem_design~20 mins

Traffic management (routing, splitting) in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Traffic Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Traffic Routing in Microservices

In a microservices architecture, what is the primary purpose of traffic routing?

ATo direct incoming requests to the appropriate microservice based on rules or conditions
BTo store user data securely in a database
CTo compress data before sending it over the network
DTo monitor CPU usage of each microservice
Attempts:
2 left
💡 Hint

Think about how requests find the right service to handle them.

Architecture
intermediate
2:00remaining
Choosing a Traffic Splitting Strategy

You want to deploy a new version of a microservice and gradually shift 20% of traffic to it while keeping 80% on the old version. Which traffic splitting method is best suited for this?

AUse a firewall to block 80% of requests to the new version
BUse weighted routing to split traffic based on percentages
CUse client-side load balancing to randomly pick a version
DUse DNS round-robin to alternate requests between versions
Attempts:
2 left
💡 Hint

Consider a method that can precisely control traffic percentages.

scaling
advanced
2:30remaining
Scaling Traffic Management for High Load

Your microservices system experiences sudden spikes in traffic. Which design choice helps maintain efficient traffic routing and splitting at scale?

ARoute all traffic through the database to decide service versions
BUse a single centralized load balancer for all routing and splitting
CImplement a distributed service mesh with sidecar proxies for routing decisions
DDisable traffic splitting during spikes to reduce complexity
Attempts:
2 left
💡 Hint

Think about decentralizing routing logic to handle scale.

tradeoff
advanced
2:30remaining
Tradeoffs in Traffic Splitting Methods

Which is a key tradeoff when using client-side traffic splitting versus server-side traffic splitting?

AClient-side splitting reduces network latency but increases server load
BServer-side splitting cannot handle weighted traffic percentages
CServer-side splitting requires clients to be updated frequently
DClient-side splitting offers flexibility but can cause inconsistent traffic distribution
Attempts:
2 left
💡 Hint

Consider who controls the routing decisions and how that affects consistency.

estimation
expert
3:00remaining
Estimating Capacity for Traffic Routing Layer

Your microservices system expects 1 million requests per minute. Each routing decision takes 1 millisecond of CPU time. How many CPU cores are needed to handle routing without delay, assuming each core can process 1000 routing decisions per second?

AApproximately 17 cores
BApproximately 10 cores
CApproximately 100 cores
DApproximately 5 cores
Attempts:
2 left
💡 Hint

Calculate requests per second and divide by processing capacity per core.