0
0
Microservicessystem_design~5 mins

API versioning for services in Microservices - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is API versioning in microservices?
API versioning is the practice of managing changes to an API by creating different versions. It helps services evolve without breaking existing clients.
Click to reveal answer
beginner
Name two common ways to specify API versions.
1. URL path versioning (e.g., /v1/resource)<br>2. Header versioning (e.g., custom header like X-API-Version)
Click to reveal answer
intermediate
Why is backward compatibility important in API versioning?
Backward compatibility ensures that older clients can still use the API without breaking when new versions are released.
Click to reveal answer
intermediate
What is semantic versioning and how does it relate to API versioning?
Semantic versioning uses MAJOR.MINOR.PATCH format to indicate changes. Major changes break compatibility, minor add features, patch fixes bugs. It guides API version updates.
Click to reveal answer
intermediate
Explain the difference between URL path versioning and header versioning.
URL path versioning includes the version in the URL making it visible and cache-friendly. Header versioning hides version info in headers, keeping URLs clean but harder to cache.
Click to reveal answer
Which of the following is NOT a common API versioning method?
ADatabase schema versioning
BURL path versioning
CQuery parameter versioning
DHeader versioning
What does a major version change usually indicate in API versioning?
ABug fixes only
BBreaking changes that may break clients
CNo changes, just a label
DBackward-compatible feature additions
Why might you choose header versioning over URL path versioning?
ATo make version info visible in URLs
BBecause headers are easier to cache
CTo keep URLs clean and consistent
DBecause it is the only supported method
What is a risk of not using API versioning?
AClients may break when API changes
BAPI will be faster
CMore secure API
DEasier to maintain
Which versioning method is easiest for caching proxies to handle?
ANo versioning
BHeader versioning
CContent negotiation
DURL path versioning
Describe the main strategies for API versioning and their pros and cons.
Think about visibility, caching, and client complexity.
You got /4 concepts.
    Explain why API versioning is critical in microservices and how it supports service evolution.
    Consider how many clients use the service and how often it changes.
    You got /4 concepts.