Forum Discussion
Implement load balancing solution with constraints
We have three (3) clustered Postgres servers with an endpoint on each at Port 9201 that responds with the word master in the TCP response if that server is the Primary in the cluster
telnet fred 9201 will responds with:
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 56
<html><body>PostgreSQL master is running.</body></html>
Based on which instance responds as master we would like to direct all traffic to the k8s cluster that is closest to the master
we have postgres databases in three data centers fred barney and bambam
if fred responds with master then we would like Big-IP to direct all trafffic to fred.k8s.internal
likewise barney responds with master direct all traffic to barney.k8s.internal
Our team is struggling with how to implement this any suggestions. We can do this using either http response or tcp response both are valid.
Any insight would be appreciated
1 Reply
- Injeyan_Kostas
Nacreous
Hello mgbee8
you could just create 3 http monitor and configure "master" as a valid response
Each one should have one site's postgress IP as alias IP and alias port 9201
Then assing each monitor to the appropriate k8s pool member
this way only one k8s pool member will be considered active, as the other 2 will fail their monitor.I assumed that you have one pool with all 3 k8s
if you have 3 different pools you will probably need an irule also to check which pool is active
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com