Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4743

How to ensure all clients are connected to one server only

$
0
0

I have 3 servers setup: 1 primary, 2 backups. I used the following configuration:

backend pg_production_backend
	option pgsql-check user pg_user
	server primary pghost.primary:5432 check on-marked-down shutdown-sessions on-marked-up shutdown-backup-sessions
	server secondary pghost.secondary:5432 check backup on-marked-down shutdown-sessions on-marked-up shutdown-backup-sessions
	server tertiary pghost.tertiary:5432 check backup on-marked-down shutdown-sessions on-marked-up shutdown-backup-sessions

It works correctly when primary goes down, and connections will go to the first available backup; and connections return to primary when it comes back on.

The problem occurs when primary is down, and secondary is down. Connections will goto tertiary; when secondary comes back online; the connected clients remained on tertiary, and new connections go to secondary.

How to force all connections only goto tertiary or secondary while primary is still down?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4743

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>