# What is the behaviour of connection failure between masters in multi-master setup?

**URL:** <https://forum.yugabyte.com/t/what-is-the-behaviour-of-connection-failure-between-masters-in-multi-master-setup/774>\
**Category:** General\
**Created:** [July 19, 2020, 2:32pm UTC](https://forum.yugabyte.com/t/what-is-the-behaviour-of-connection-failure-between-masters-in-multi-master-setup/774 "2020-07-19T14:32:33Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![dorian\_yugabyte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/dorian_yugabyte/32/206_2.png) [@dorian\_yugabyte](https://forum.yugabyte.com/u/dorian_yugabyte)\
**Post date:** [July 21, 2020, 9:03am UTC](https://forum.yugabyte.com/t/what-is-the-behaviour-of-connection-failure-between-masters-in-multi-master-setup/774/5 "2020-07-21T09:03:08Z")

</div>

> [@guydewinton](#):
>
> If I have a three or five node cluster and one node goes down or there is a network partition, how would the remaining 2 or 4 nodes handle an additional failure (there now being an even number)?

Please see how replication works in [Deploy | YugabyteDB Docs](https://docs.yugabyte.com/latest/deploy/checklist/#replication).

More generally, if RF is `n` , YugabyteDB can survive `(n - 1) / 2` failures without compromising correctness or availability of data.

> [@guydewinton](#):
>
> Can the client connect to any node which will forward the requests to the cluster master? If, for instance, the webserver shares a machine with a node, does it just connect to localhost?

You can connect to any host. And the requests are always routed.

> [@guydewinton](#):
>
> I am using Django to handle the requests. Can I just use my existing Postgres driver (same setup - just changing port and default username)?

Yes. Please use version 2.2 which includes support for [deferred constraints](https://docs.yugabyte.com/latest/api/ysql/commands/ddl_create_table/#deferrable-constraints) that are required by django.

> [@guydewinton](#):
>
> Could I make the nodes (2) on the local network read/write and have the cloud node read only so that if there is a network partition the local cluster will continue to function fully while the cloud will continue to serve reads? In this case is there some communication it could offer the client to let it know it is now read only?

This will work. We advise to have 3 regions in this case. Whatever region you lose, you will still be able to write data to the cluster. Is there a problem you can’t use 3 regions ?

You can also [set preferred zones](https://docs.yugabyte.com/latest/admin/yb-admin/#set-preferred-zones) to the localhost node(s) if that’s your primary write node.

> [@guydewinton](#):
>
> I hope it is ok to dump these disparate questions here.

It’s ok!

---

_[View the full topic](https://forum.yugabyte.com/t/what-is-the-behaviour-of-connection-failure-between-masters-in-multi-master-setup/774)._
