# Need connection pooling sample for node js package (@elatic/elasticsearch)

**URL:** https://discuss.elastic.co/t/need-connection-pooling-sample-for-node-js-package-elatic-elasticsearch/246739
**Category:** Elasticsearch
**Created:** [August 28, 2020, 10:32am UTC](https://discuss.elastic.co/t/need-connection-pooling-sample-for-node-js-package-elatic-elasticsearch/246739 "2020-08-28T10:32:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Soumarshi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/soumarshi/32/139440_2.png) [@Soumarshi](https://discuss.elastic.co/u/Soumarshi)
#### Post date: [August 28, 2020, 10:32am UTC](https://discuss.elastic.co/t/need-connection-pooling-sample-for-node-js-package-elatic-elasticsearch/246739/1 "2020-08-28T10:32:08Z")

</div>

Is it possible to initiate a connection and add it to a connection pool on startup on node js server? Once it's there, can we re-use the connection for all the API calls. If yes, can anyone please share a sample implementation for the same

---

<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: [September 25, 2020, 10:32am UTC](https://discuss.elastic.co/t/need-connection-pooling-sample-for-node-js-package-elatic-elasticsearch/246739/2 "2020-09-25T10:32:16Z")

</div>

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