InterviewSolution
| 1. |
How to handle versioning of microservices? |
|
Answer» There are different ways to handle the versioning of your REST api to allow older consumers to STILL consume the older endpoints. The ideal practice is that any nonbackward compatible change in a given REST endpoint shall lead to a NEW versioned endpoint. Different mechanisms of versioning are:
Most common approach in versioning is the URL versioning itself. A versioned URL looks like the following: Versioned URL
As an API developer you must ensure that only backward-compatible changes are accommodated in a single version of URL. Consumer-Driven-Tests can help identify potential issues with API UPGRADES at an early stage. |
|