Scenario
A clustered environment running N identical application nodes interacting with a single relational database.
Problem
Is it possible to upgrade the nodes to a new application version, which requires a new database schema and maintain data integrity in the database without any downtime in the application and without losing any data or ending up with data in an inconsistent state?
2
I guess, in general the answer is “no”. However, if the new application version can work with old database OR old application version can work with the new schema – then it is possible.
For example, if the changes (to DB schema) are additive (like adding one more field), then it’s possible to update database first.
If the new application senses older database and adjust to it, then it’s possible to update app server instance first.
One more approach would be making a transition version of the app, which will work with both schemas, and make transition in two steps.
In other words, if changes to app AND database schema are not very big, it’s possible.