08-27-2018 11:28 PM - edited 03-05-2019 10:52 AM
Hello can someone help me with my case?
So someboody knew pgpool? i have 2 db server running pgpool, each db server has virtual db that act as gateway so basically this method is like HSRP. The problem is another server which need access to db run in different subnet to make it connect to virtual db is just simply applying static route and the hardest part is the automation if virtual db fail on first db and change to second db, how we gonna make a route to that?
08-28-2018 02:15 AM
Is this something you can achieve with a floating static?
08-28-2018 02:34 AM - edited 08-28-2018 02:36 AM
i think it can't, so let me share my brief conf and maybe someone will light me up
track 1 ip sla 1 reachability
ip sla 1
icmp-echo 1.1.1.1
ip sla schedule 1 life forever start-time now
ip route 1.1.1.1 255.255.255.255 2.2.2.2 track 1
ip route 1.1.1.1 255.255.255.255 3.3.3.3 200
* 1.1.1.1 = virtual db that run in db1 and if db1 is down this ip will active in db2
* 2.2.2.2 = db1
* 3.3.3.3 = db2
08-28-2018 06:11 AM
08-28-2018 09:24 PM
so it will track the db 1 interface not the virtual db right?
if the virtual db is down then the route will not change to db 2 i think because we track db 1 not the virtual db
08-30-2018 01:25 AM - edited 08-30-2018 01:26 AM
Hello
There is no point in tracking the VIP as I assume this address will follow whatever physical DB server is running as the primary, like in you post its currently running on 2.2.2.2 so Rasmus is stating you need to track the physical servers reachability and if that goes down then that tracked static route will be removed and the less preferred one will then become active.
08-30-2018 01:41 AM
Yes VIP right now running on 2.2.2.2 but there is probability that this virtual will change not because the DB1 interface is down. so how do i tackle this?
09-11-2018 07:45 AM
09-11-2018 07:47 AM
09-11-2018 09:16 PM
09-12-2018 12:18 AM
Hello
did you try to track the DB physical addresses instead of the vip?
09-12-2018 01:40 AM
09-12-2018 02:22 AM
Hello
@dpsw120 wrote:
if i track db physical address and db server went down of course it'll work right but if vip goes down and db physical address still up, basically the route will not change right? because it keep tracking db physical instead vip. is tracking vip will cause floating route?
The VIP should never go down, it is virtual , that why you have a vip, So your applications are not tied to the physical address and as such should not notice any physical failure.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide