Which of the following is the main reason to implement API versioning in microservices?
Think about how changes in APIs affect existing clients.
API versioning allows backward compatibility so clients using older versions do not break when new features or changes are introduced.
Which of the following is NOT a common strategy for API versioning in microservices?
Focus on how the API version is communicated to the client.
Database schema versioning is about data storage, not about how clients specify API versions. The other options are common ways to version APIs.
What is a major challenge when supporting multiple API versions in a microservices environment?
Think about operational overhead when many versions run at once.
Supporting multiple API versions increases maintenance effort, testing, and deployment complexity because each version may require separate handling.
Which statement best describes a tradeoff between URI versioning and Header versioning for APIs?
Consider how URLs and headers affect caching and readability.
URI versioning makes it simple for caches and routers to distinguish versions, but adds version info to URLs. Header versioning keeps URLs clean but can complicate caching.
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?
Calculate storage per version, then multiply by number of versions.
1MB per 1000 users means 1000 MB (1 GB) per 1 million users per version. For 3 versions, total is 3 GB.