'Data Synchronisation in Blue Green Deployment - Cloud

In a blue green deployment environment, I'm trying to use two separate database for each environment.

In this case, How does realtime data synchronisation could be done between the two databases in two different deployments(Consider that the database is manage by any of the cloud service providers)?

Or else Should I need to use shared database for both the blue and green deployment environment?

Thanks in advance!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source