0
0
Microservicessystem_design~20 mins

API versioning for services in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
API Versioning Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why use API versioning in microservices?

Which of the following is the main reason to implement API versioning in microservices?

ATo improve the speed of the network between services
BTo reduce the number of microservices in the system
CTo allow clients to continue using old API features while new ones are added
DTo encrypt the data sent between services
Attempts:
2 left
💡 Hint

Think about how changes in APIs affect existing clients.

Architecture
intermediate
2:00remaining
Common API versioning strategies

Which of the following is NOT a common strategy for API versioning in microservices?

AHeader versioning (using custom headers)
BDatabase schema versioning
CURI versioning (e.g., /v1/resource)
DQuery parameter versioning (e.g., ?version=1)
Attempts:
2 left
💡 Hint

Focus on how the API version is communicated to the client.

scaling
advanced
2:30remaining
Scaling challenges with multiple API versions

What is a major challenge when supporting multiple API versions in a microservices environment?

AIncreased complexity in maintaining and deploying multiple versions simultaneously
BElimination of the need for load balancers
CAutomatic database migration for all versions
DReduced network latency due to versioning
Attempts:
2 left
💡 Hint

Think about operational overhead when many versions run at once.

tradeoff
advanced
2:30remaining
Tradeoff of URI versioning vs Header versioning

Which statement best describes a tradeoff between URI versioning and Header versioning for APIs?

AURI versioning is easier for caching and routing, but Header versioning keeps URLs clean and RESTful
BHeader versioning is easier for caching, but URI versioning hides the version from clients
CURI versioning requires clients to send custom headers, Header versioning uses URL paths
DHeader versioning is deprecated and should never be used
Attempts:
2 left
💡 Hint

Consider how URLs and headers affect caching and readability.

estimation
expert
3:00remaining
Estimating storage impact of API versioning

A microservice stores user profiles and supports 3 API versions simultaneously. Each version stores 1MB of user data per 1000 users. If the service has 1 million users, approximately how much storage is needed to support all versions?

A30 GB
B3 TB
C300 MB
D3 GB
Attempts:
2 left
💡 Hint

Calculate storage per version, then multiply by number of versions.