BFD Framework for Keepalived

Ilya Voronin <[email protected]>
Newsgroups gmane.linux.keepalived.devel
Message-ID <CAB-YuXCzT5KiWMcov2RFu=Tww0Kn7zSCf8mB1Qf=MpYS9GUytQ@mail.gmail.com>
In the modern era of 10 Gigabit Ethernet adoption in data centers VRRP
failover time of 3 to 4 seconds is simply too high. Most networking
hardware vendors are using Bidirectional Forwarding Detection protocol to
improve VRRP convergence time. By using such technique millisecond level
convergence can be reached. Having such feature in keepalived would be a
nice step forward.

I'm inviting you to test it:

git clone https://github.com/ivoronin/keepalived.git
cd keepalived
git checkout bfd-master

A good example is two node cluster running keepalived, with two VRRP
instances.
One of the instances is "enhanced with BFD" and second is not:

keepalived.conf on node1 (192.168.255.101):

vrrp_instance VRRP1 {
    interface eth0
    virtual_router_id 1
    virtual_ipaddress {
        192.168.255.200/24
    }
    track_bfd BFD1 # !
}
vrrp_instance VRRP2 {
    interface eth0
    virtual_router_id 2
    virtual_ipaddress {
        192.168.255.201/24
    }
}
bfd_instance BFD1 {
    neighbor_ip 192.168.255.103 # node2 ip address
}

keepalived.conf on node2 (192.168.255.103):

vrrp_instance VRRP1 {
    interface eth0
    virtual_router_id 1
    virtual_ipaddress {
        192.168.255.200/24
    }
    track_bfd BFD1 # !
}
vrrp_instance VRRP2 {
    interface eth0
    virtual_router_id 2
    virtual_ipaddress {
        192.168.255.201/24
    }
}
bfd_instance BFD1 {
    neighbor_ip 192.168.255.101 # node1 ip address
}

Notice the difference VRRP failover time:

<... node2 goes down …>
14:23:39.308790 node1 Keepalived_bfd[22471]: BFD_Instance(BFD1) Expired
after 50 ms (115 usec overdue)
14:23:39.308813 node1 Keepalived_bfd[22471]: BFD_Instance(BFD1) Entering
Down state
                            (Local diagnostic - Control Detection Time
Expired, Remote diagnostic - No Diagnostic)
14:23:39.308998 node1 Keepalived_vrrp[22473]: VRRP_Instance(VRRP1) Tracked
BFD instance BFD1 is DOWN
14:23:39.309059 node1 Keepalived_vrrp[22473]: VRRP_Instance(VRRP1)
Transition to MASTER STATE
14:23:39.309070 node1 Keepalived_vrrp[22473]: VRRP_Instance(VRRP1) Entering
MASTER STATE
<… VRRP1 failed over in ~50.4ms …>
14:23:42.282595 node1 Keepalived_vrrp[22473]: VRRP_Instance(VRRP2)
Transition to MASTER STATE
14:23:43.282774 node1 Keepalived_vrrp[22473]: VRRP_Instance(VRRP2) Entering
MASTER STATE
<… VRRP2 failed over in ~4 seconds ...>

WARNING: This code is not ready for production use (yet). Feedback and
comments are welcome.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net

_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.