Answer the question
In order to leave comments, you need to log in
PostgreSQL + Pgpool. How to organize quick access from different parts of the world?
Hello!
There is a system that needs quick access from Russia and the USA.
The issue with statics and scripts is solved elementarily. The main problem is working with the database, access to which must also be fast.
Database synchronization is performed by standard PostgreSQL 9.1 tools, read queries are balanced by pgpool.
The problem is that a server with pgpool cannot be equally quickly accessible from both the US and Russia. Since he is alone and is in one place.
If we are trying to solve this problem and make 2 servers with pgpool (to a common database pool), each in its own country, set the appropriate node priorities in the settings, then we get that writerequests from one country will be slow (we accept this as inevitable), but for read requests we will get good speed.
Everything would be fine if fault tolerance was not also needed. When the master crashes, pgpool makes one of the slaves the master and continues.
If we consider the fall of one of the nodes, then it will be so. But if we assume a loss of communication between two pgpools, then it turns out that the pgpool that is left with only slaves will “think” that the master has fallen and make one of the remaining available slaves the master. As a result, we will get 2 inconsistent masters.
Is there any solution to this problem?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question