I keep saying this every time this topic comes up, have a look at elixir/erlang. The OTP library gives some great reusable patterns (and elixir project is adding new ones[1]) out of the box. You're basically developing a single codebase microservice project which feels like a monolith. You can spread out on multiple machines easily if you need to, the introspection tooling is better than anything you can buy right now, it's amazing.
Things can get tricky if you need to spread out to hundreds of machines, but 99%+ of projects wont get to that scale.
I'm gonna assume you're talking about versions of application code. Obviously it's not a trivial problem and you have to keep it in mind while architecting your application, but Hot Code reloading is a well supported thing [1]
Experiences with the AXD301 suggest that “five nines” availability, downtime for software upgrades included, is a more realistic assessment. For nonstop operations, you need multiple computers, redundant power supplies, multiple network interfaces and reliable networks, cooling systems that never fail, and cables that system administrators cannot trip over, not to mention engineers who are well practiced in their maintenance skills. Considering that this target has been achieved at a fraction of the effort that would have been needed in a conventional programming language, it is still something to be very proud of.
- from Erlang Programming by Simon Thompson, Chapter 1
Things can get tricky if you need to spread out to hundreds of machines, but 99%+ of projects wont get to that scale.
[1] https://elixir-lang.org/blog/2016/07/14/announcing-genstage/