(Question by a community member)
With reference to Bahmni Advanced Installation Page:
Is there any particular reason why an Active/Passive redundancy model was used, rather than having two simultaneously active web servers, and two database servers with Master-Master replication? It would be much more practical to have a setup like this behind a load-balancer, so that manual intervention is not required if/when an outage occurs.
Is there for instance a Green/Blue deployment of Bahmni, which can also allow for fail over and upgrades without downtime?
Thanks for re-locating my question, Gurpreet - it’s greatly appreciated.
Green/Blue deployment isn’t quite what I’m looking for, however, as I would like to have both server ‘pairs’ (i.e. both database servers and both web servers) active at the same time. I can handle sticky sessions (if necessary) through my load balancer (i.e. HAProxy), and I’d imagine Master-Master replication should be okay, given UUIDs are used for Primary keys, rather than auto-incremented integers - if need be, however, I could always add an auto-increment offset to one of the servers.
Anyway, here’s a rough overview of what I’m aiming to achieve. Please forgive the rushed quality of the diagram.
In the master-master setup, the failover is automatic without any manual intervention. The following are some points to consider. Please note that these are just my views.
- The implementations that we work on are low-resource setting in terms of hardware configuration. The production master databases are of high configuration but the slave configurations are not on-par. Given that the master-master setup needs a lot of hardware - databases, web and load balancers - it can become too much to manage.
- We generally go for master/slave setups and the time lag of switching a master to slave manually in case of failure is considered reasonable in our setups.
- The other consideration in master/master slave could be that of consistency. The writes can happen in any of the databases and there can be a inconsistent behavior if the reads happen from alternate database (for small duration though).
- Also, given this setup, it can be difficult to configure unless you have an automated and repeatable way of setting it up.