
When you work on a database management system, trust and hope is what matters the most. Well, really, this is what a database is! You’ve got to trust it to store your data, and hope it won’t just fail one day. The title conveys the whole point — a place where data is kept, the main task is to STORE. And the saddest thing, as always, once these beliefs crash into the ruins of a downed production database.
“So how do you avoid it?” , you ask? “By not deploying anything on the servers”, I answer. Nothing unless it can recover itself, at least temporarily but reliably and quickly.
In this article, I will try to talk about my experience of configuring a built-to-last-a-lifetime Postgresql cluster within another failover solution from Google — Kubernetes (aka k8s).
Task
Almost any application needs to have a data store. This is a necessity. Making this data store resistant to faults in a network or on physical servers is common courtesy of a good system architect. Another aspect is high availability of a service, even with a number of heavy competing service requests, which means easy scalability upon necessity.