I have studied this article about Blue/Green deployment, then some more googling introduced me to this article about Canary Release. I have this ambiguity : what will happen to databases? how we should make them synchronized? i have two possible scenarios in mind :
- imagine there are two separate databases one for each environment
(green and blue) at the time that blue is active, new records will be inserted into it's database and green is not aware of these changes
unless we provide a trigger like mechanism(or any other mechanism) to update the green database. - second scenario suggests that we share a backward compatible database
between two environments, but backward compatibility is not so easy
when dealing with databases, we have to publish database changes
before publishing the application.
there may be third scenario, implement a Blue/Green deployment for databases inside the main Blue/Green deployment.
what do you think is the better solution and why? do you suggest any other practice or well known pattern ?
thank you