One version or multiple versions for the release with many Microservices

microservicesreleaseversioning

We are planning to move into Microservices. Currently on the design talks stage.
Thinking of how to versioning the releases?

Let's say we will start with 10 microservices. We want to develop them and deploy separately. Possibly every microservice in different point in time.

Then, when tested, each of them will become release candidate. The product owner will be able to pick few of them, charge the customer and click the button to apply these microservices to the customer.

The question is now, how the product owner will know how to name the version which he is trying to sell for the client?

Detailed scenario:
Assuming we have a ten microservices: M1, M2, …, M10.
Product owner sold for two customer packages in following configuration:
Customer 1: M1 & M5
Customer 2: M1 & M3

Then he won't say 'Hey customer, here you have 3.4 version of the app'. He will be only able to define version of the application by applied packages. So in this case 'Hey customer, here you have the app. It contains service M1 (in version 1), and service M5 (in version 1)'.

I would like to know how to represent this kind of releases as one number, not a list of separate number for every microservice sold?

Best Answer

This is a common problem in configuration management of complex systems, and isn't necessarily unique to software. Even before microservices, I've seen this in complex electro-mechanical-software systems where various components have versions or revisions and different customers may have different physical products with different revisions of hardware components.

Typically, this is handled by having multiple version identifiers - one at the system level and one at the component level. You can decompose components as much as you want or need, as well. Any revision to a lower level propagates up the chain. Normally, in the context of hardware, you'd always get the most recent revision of everything, but that's often because the changes were made to handle obsolesce of parts or improve ease of manufacturing and/or maintenance and it's not feasible to build a new product with the old configuration anymore. With software, it's easier to mix-and-match different versions and build them.

The important thing to keep track of is an association between the customer and the revision of all of the microservices that they have. What you call that system combination doesn't necessarily matter. In the hardware world, this responsibility is on the vendor - whoever makes the system is responsible for being able to associate a serial number with the engineering design documentation of every constituent part. If a customer has multiple deployments, then you have to consider that as well.

In this scenario, you don't necessarily need to version your microservices and the system in the same way. I'd tend to favor Semantic Versioning for the services - it's well defined for APIs and you can define a sane format for user interfaces / user facing applications as well. You can use letters, numbers, GUIDs, hashes, or some other unique identifier for the system combination. This may even allow you to keep track of customers with the same configuration deployed.

As far as displaying versions, you should probably consider having a way to get the version of each service somehow. This could be through the user interface, something recorded in the logs, or accessible through a common endpoint that all configurations share.

All of this said, it's probably going to be painful if you need to manage configurations in this way. No matter what system you use, if you have different customers with different configurations in different environments, you need to be able to track the impact of a given change to all customers and understand that a non-breaking change to one customer may be a breaking change to someone else. It's a non trivial problem.

You can always read more. Here are just a few Wikipedia articles on relevant topics to get started:

Related Topic