# Connecting to Elasticsearch Cluster Node|| Nodes via Javascript client

**URL:** <https://discuss.elastic.co/t/connecting-to-elasticsearch-cluster-node-nodes-via-javascript-client/313481>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [September 1, 2022, 8:10pm UTC](https://discuss.elastic.co/t/connecting-to-elasticsearch-cluster-node-nodes-via-javascript-client/313481 "2022-09-01T20:10:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![whizyrel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whizyrel/32/110357_2.png) [@whizyrel](https://discuss.elastic.co/u/whizyrel)\
**Post date:** [September 1, 2022, 8:10pm UTC](https://discuss.elastic.co/t/connecting-to-elasticsearch-cluster-node-nodes-via-javascript-client/313481/1 "2022-09-01T20:10:40Z")

</div>

I have a quick dumb question, I have an elasticsearch self-managed cluster in compose, the question is how should I connect: by specifying a node or mandatorily specifying all nodes?  
I appreciate the feedback, thank you

---

<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 29, 2022, 8:11pm UTC](https://discuss.elastic.co/t/connecting-to-elasticsearch-cluster-node-nodes-via-javascript-client/313481/2 "2022-09-29T20:11:30Z")

</div>

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