# Max requests per Keep-Alive Connection

**URL:** <https://discuss.elastic.co/t/max-requests-per-keep-alive-connection/255586>\
**Category:** Elasticsearch\
**Created:** [November 16, 2020, 7:20pm UTC](https://discuss.elastic.co/t/max-requests-per-keep-alive-connection/255586 "2020-11-16T19:20:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vish\_M](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vish_m/32/57042_2.png) [@Vish\_M](https://discuss.elastic.co/u/Vish_M)\
**Post date:** [November 16, 2020, 7:20pm UTC](https://discuss.elastic.co/t/max-requests-per-keep-alive-connection/255586/1 "2020-11-16T19:20:11Z")

</div>

Hello,

How can I set the max number of requests that a Keep-Alive Connection can serve before it is closed.

I am looking to set the `max` parameter here. Any pointers in this regard is much appreciated.

> **[Keep-Alive](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Keep-Alive)**
>
> The Keep-Alive general header allows the sender to hint about how the connection may be used to set a timeout and a maximum amount of requests.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 17, 2020, 11:05pm UTC](https://discuss.elastic.co/t/max-requests-per-keep-alive-connection/255586/2 "2020-11-17T23:05:21Z")

</div>

Welcome to our community! 😃

I'm not sure what the link you have provided has to do with Elasticsearch. Can you elaborate please?

---

<div class="post-metadata">

**Author:** ![Vish\_M](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vish_m/32/57042_2.png) [@Vish\_M](https://discuss.elastic.co/u/Vish_M)\
**Post date:** [November 18, 2020, 3:41am UTC](https://discuss.elastic.co/t/max-requests-per-keep-alive-connection/255586/3 "2020-11-18T03:41:03Z")

</div>

Hello,

Thank you for responding. My apologies for not being clear.

I am trying to see if there is a way to set maximum number of http requests a keep-alive connection could serve after which elastic server closes the connection.

(If I understand correctly in keep-alive header this is achieved by the max parameter and I am looking for a way if elastic search supports this)

---

<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:** [December 16, 2020, 3:41am UTC](https://discuss.elastic.co/t/max-requests-per-keep-alive-connection/255586/4 "2020-12-16T03:41:19Z")

</div>

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