8

I am curious if somebody is actually running PostgreSQL in a container in production on some form of distributed file system - GlusterFS preferably, or anything.

I am currently running Mesos/Marathon. In case the PostgreSQL node fails, Marathon simply launches another instance of PostgreSQL on other nodes and if done properly (service discovery and application recovering from database connection loss), the ultimate fault tolerance will be achieved.

I know PostgreSQL has its own HA solutions, like log shipping and hot stand-by backup, but then one still need to solve the problem on when to switch from master to slave, how to do it properly and so on.

So, how do you run PostgreSQL in production on GlusterFS or similar? If so, is it stable? How about performance?

0

but then one still need to solve the problem on when to switch from master to slave, how to do it properly and so on.

Each and every cluster usually has notion of quorum: watchers (monitors, whatever) are to decide which node is the master. Then you can use theirs information to route requests properly. It's quite typical to run haproxy with not only basic TCP/IP health checks but some high level logic implemented with service specific queries.

Check out peacemaker, for e. g..

0

You need to run postgresql in stateful service mode. Scaling is done by mesos but data replication is done by the postgresql it self. Take a look at this site stateful service and persistent volumes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.