# Lifecycle of connections between client and FDB Processes

**URL:** <https://forums.foundationdb.org/t/lifecycle-of-connections-between-client-and-fdb-processes/872>\
**Category:** FoundationDB Core\
**Created:** [November 16, 2018, 6:20am UTC](https://forums.foundationdb.org/t/lifecycle-of-connections-between-client-and-fdb-processes/872 "2018-11-16T06:20:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TanSA05](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@TanSA05](https://forums.foundationdb.org/u/TanSA05)\
**Post date:** [November 16, 2018, 6:20am UTC](https://forums.foundationdb.org/t/lifecycle-of-connections-between-client-and-fdb-processes/872/1 "2018-11-16T06:20:11Z")

</div>

Hi,

I am new to Foundationdb, and I had a query where I’m interested to know the lifecycle of connections between the client and FDB processes (Couldn’t find an answer in the documentation). Specifically, my query can be broken down into three questions as below:

1. How many connections does a client open while making a connection? And connections to what? (If any of them are different from the ones mentioned [here](https://forums.foundationdb.org/t/understanding-inter-communication/745))

2. How long are these connections open for (per transaction or per client)?

3. Does the client have to close the above connections or does it happen automatically?

I would love to understand this better and any help will be appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![alexmiller](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/alexmiller/32/326_2.png) [@alexmiller](https://forums.foundationdb.org/u/alexmiller)\
**Post date:** [November 16, 2018, 7:47am UTC](https://forums.foundationdb.org/t/lifecycle-of-connections-between-client-and-fdb-processes/872/2 "2018-11-16T07:47:37Z")

</div>

> [@TanSA05](#):
>
> 1. How many connections does a client open while making a connection? And connections to what? (If any of them are different from the ones mentioned [here](https://forums.foundationdb.org/t/understanding-inter-communication/745))

That actually is the thread that I was going to suggest you look at. I believe we ended with a reasonably accurate diagram, and if you have further questions, you’re welcome to ask.

> [@TanSA05](#):
>
> 1. How long are these connections open for (per transaction or per client)?
> 2. Does the client have to close the above connections or does it happen automatically?

One connection is opened from the client, and once the connection is opened, it’s maintained as open essentially indefinitely. At some point, FDB will likely do a better job of closing connections that aren’t being used, bit it will still be done transparently.

To be clear, this isn’t like MySQL/Postgres where you need to explicitly open, maintain, and reuse a connection. All of that is handled for you, and multiple requests will be multiplexed over the same connection if destined for the same server.
