3 ms·
For scaling (LB) reads + HA, HAproxy + built-in replication to hot standbys is much simpler. You can use keepalived to promote a new master automatically if it
by duelingjello 7y ago
For scaling (LB) reads + HA, HAproxy + built-in replication to hot standbys is much simpler. You can use keepalived to promote a new master automatically if it dies. HAproxy can also give you two different ports on the vIP, one for read-only and one for read-write that automatically find which server is the master and which servers are replicas, using periodic banner testing. It's free, doesn't depend on someone coding a Postgres statement proxy and getting every corner-case just right, and lower latency. I suggest using LVS too so the vIP can move around if a box dies.
For scaling (LB) read&writes + HA, consider postgres-xl instead. It's FOSS w/ optional commercial support.
If you have crazy OLAP or metrics data, consider Greenplum. Freemium FOSS.