# Is keepalived needed to YugabyteDB for fault tolerance?

**URL:** <https://forum.yugabyte.com/t/is-keepalived-needed-to-yugabytedb-for-fault-tolerance/2753>\
**Category:** General\
**Created:** [June 29, 2024, 2:11pm UTC](https://forum.yugabyte.com/t/is-keepalived-needed-to-yugabytedb-for-fault-tolerance/2753 "2024-06-29T14:11:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Farrux](https://avatars.discourse-cdn.com/v4/letter/f/dec6dc/32.png) [@Farrux](https://forum.yugabyte.com/u/Farrux)\
**Post date:** [June 29, 2024, 2:11pm UTC](https://forum.yugabyte.com/t/is-keepalived-needed-to-yugabytedb-for-fault-tolerance/2753/1 "2024-06-29T14:11:03Z")

</div>

I wanna to install master/tserver on 6 nodes. if master falls down, how back services switches to the new master?  
Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Jim\_Knicely](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/jim_knicely/32/668_2.png) [@Jim\_Knicely](https://forum.yugabyte.com/u/Jim_Knicely)\
**Post date:** [June 29, 2024, 4:02pm UTC](https://forum.yugabyte.com/t/is-keepalived-needed-to-yugabytedb-for-fault-tolerance/2753/2 "2024-06-29T16:02:55Z")

</div>

Hi! What is the planned fault domains from the six nodes? Is using RF=3, you will need 3 Fault Domains, and you will have 3 Master servers, one in each Fault Domain.

See: [Fault Domains](https://docs.yugabyte.com/preview/explore/fault-tolerance/#fault-domains)

The following docs should help with Master recovery and replacement!

[Recover failed YB-TServer and YB-Master](https://docs.yugabyte.com/preview/troubleshoot/cluster/recover_server/)

[Replace a failed YB-Master](https://docs.yugabyte.com/preview/troubleshoot/cluster/replace_master/)

---

<div class="post-metadata">

**Author:** ![Farrux](https://avatars.discourse-cdn.com/v4/letter/f/dec6dc/32.png) [@Farrux](https://forum.yugabyte.com/u/Farrux)\
**Post date:** [June 30, 2024, 1:52pm UTC](https://forum.yugabyte.com/t/is-keepalived-needed-to-yugabytedb-for-fault-tolerance/2753/3 "2024-06-30T13:52:38Z")

</div>

Thank you @Jim_Knicely !  
For example I have 3nodes: 1 LEADER-M1 and 2 FOLLOWER M2, M3. My external service or an app is connected with M1. Say M1 died and LEADER switched to M2 or M3. How can my external app know this? Is YugabyteDB supports keepalived function in such case?  
Thanks!

---

<div class="post-metadata">

**Author:** ![FranckPachot](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/franckpachot/32/353_2.png) [@FranckPachot](https://forum.yugabyte.com/u/FranckPachot)\
**Post date:** [June 30, 2024, 8:37pm UTC](https://forum.yugabyte.com/t/is-keepalived-needed-to-yugabytedb-for-fault-tolerance/2753/4 "2024-06-30T20:37:21Z")

</div>

Hi, leader/follower is not a per-node attribute. It is per tablet. All nodes have some leaders and some followers. About where the application connects to, all nodes are active. If the node you are connected to dies, you can re-connect to any other node. This is automated with a host list and random load balancing, or a HA proxy, or if you use a YugabyteDB smart driver.
