4 ms·
The post was talking about fleets of machines, where just restricting the number of machines that do things seems to be useful. But you only seem to have one m
by hibbelig 7y ago
The post was talking about fleets of machines, where just restricting the number of machines that do things seems to be useful.
But you only seem to have one machine in production (or one for the API plus one for the website), so it doesn't make sense to deploy to 10% of the machines.
What you can do is to arrange things so that each individual upgrade can be rolled back. Let's say you want to rename a parameter in the API. You have to make a backward-compatible change to the API so that the existing website keeps working. In other words, you provide two calls, one with the old parameter name and a different call with the new parameter name. Then you deploy that. If there are problems, you can roll back to the previous API version.
The next step is to change the website to invoke the new API call with the new parameter name. If that fails, you can go back to the previous website.
Let's say it succeeds. Now you have a website using the new API with the new parameter name, and an API providing both the old and the new parameter name.
The next step is to update the API to remove the old parameter name. If it turns out you forgot a place in the website where the old parameter is used, you can roll back to the previous API.
If it goes well, you now have a website that uses the new parameter name, and also an API that provides the new parameter name, and the old parameter name is no longer used.
It took a long time, but now it's mission accomplished and problem solved.
- primitivesuave 7y agoThank you for the input! I agree with your strategy for changing parameters, but for something more error-prone like changing internal logic behind the same parameters, I would still feel the same anxiety doing a non-gradual release.
- hibbelig 7y agoThat is a very good point. And it reminds me how you can do gradual releases when you only have one installation: you do it on a per-user basis, using feature flags. If it's only the logic behind an existing interface, you can implement both the old logic and the new logic and choose between them based on a feature flag.