Code for updating the database
The redundancy of all subsystems provides a lot of benefits.The two most important ones are: But they also create new challenges.The good news is that there are several great tools and libraries available that help you solve these challenges.
You no longer need to just adapt the database in the way it’s required by your application; you also need to do it in a way that the old and the new version of your application can work with the database.
The redundancy of the application plays a critical role during the migration. The implementation of a rolling update depends on your technology stack.
But the idea is always the same: You have a bunch of instances of a subsystem and you shutdown, update, and restart one instance after the other.
If you want to build a high-available system, you need to run at least 2 instances of every subsystem.
So, in the simplest case, you need at least 2 instances of your application and 2 instances of your database server.