# Dose Low Level Rest Client not cause the same connection pressure as Transport Client

**URL:** <https://discuss.elastic.co/t/dose-low-level-rest-client-not-cause-the-same-connection-pressure-as-transport-client/337056>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [June 28, 2023, 8:45am UTC](https://discuss.elastic.co/t/dose-low-level-rest-client-not-cause-the-same-connection-pressure-as-transport-client/337056 "2023-06-28T08:45:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![emmning](https://avatars.discourse-cdn.com/v4/letter/e/59ef9b/32.png) [@emmning](https://discuss.elastic.co/u/emmning)\
**Post date:** [June 28, 2023, 8:45am UTC](https://discuss.elastic.co/t/dose-low-level-rest-client-not-cause-the-same-connection-pressure-as-transport-client/337056/1 "2023-06-28T08:45:23Z")

</div>

We are using flink to write data to ES cluster.The transport client is used as the client in the flink task and the sniffer is configured.Each parallism of flink task will create a transport client, and each transport client will create 13 connections with every ES node in each cluster.This makes nodes in a large cluster to have tens of thousands of connections.Each transport client will send 13 keep alive requests to the ES node every 5s, and the sniffer will send a \_cluster/state/nodes request to each node every 5s.This caused the ES node to be busy processing the requests sent by the transport client.I learned that transport client is deprecated and I consider migrating to low level rest client.  
So I want to know dose Low Level Rest Client not cause the same connection pressure as Transport Client?

ES version:7.9.1

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![swallez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swallez/32/11972_2.png) [@swallez](https://discuss.elastic.co/u/swallez)\
**Post date:** [June 28, 2023, 9:23am UTC](https://discuss.elastic.co/t/dose-low-level-rest-client-not-cause-the-same-connection-pressure-as-transport-client/337056/2 "2023-06-28T09:23:28Z")

</div>

The Low Level Rest client will use a lower number of connections per node.

However, the main problem is that Flink creates one client per task. It should instead use a single client shared by all tasks.

---

<div class="post-metadata">

**Author:** ![emmning](https://avatars.discourse-cdn.com/v4/letter/e/59ef9b/32.png) [@emmning](https://discuss.elastic.co/u/emmning)\
**Post date:** [June 28, 2023, 10:08am UTC](https://discuss.elastic.co/t/dose-low-level-rest-client-not-cause-the-same-connection-pressure-as-transport-client/337056/3 "2023-06-28T10:08:38Z")

</div>

> [@swallez](#):
>
> The Low Level Rest client will use a lower number of connections per node.

Can you quantify it? For example, how many connections will a Low Level Rest client create with a node, whether each connection has a scheduled keep alive task, and if so, what is the interval.We need this to evaluate.

> [@swallez](#):
>
> However, the main problem is that Flink creates one client per task. It should instead use a single client shared by all tasks.

Every Flink task is a independent Java process, so we cannot use a single client shared by all tasks.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 26, 2023, 10:08am UTC](https://discuss.elastic.co/t/dose-low-level-rest-client-not-cause-the-same-connection-pressure-as-transport-client/337056/4 "2023-07-26T10:08:55Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
