# ES nodes should talk on TCP or HTTP?

**URL:** <https://discuss.elastic.co/t/es-nodes-should-talk-on-tcp-or-http/150172>\
**Category:** Elasticsearch\
**Created:** [September 27, 2018, 10:15am UTC](https://discuss.elastic.co/t/es-nodes-should-talk-on-tcp-or-http/150172 "2018-09-27T10:15:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pokaleshrey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pokaleshrey/32/48680_2.png) [@pokaleshrey](https://discuss.elastic.co/u/pokaleshrey)\
**Post date:** [September 27, 2018, 10:15am UTC](https://discuss.elastic.co/t/es-nodes-should-talk-on-tcp-or-http/150172/1 "2018-09-27T10:15:27Z")

</div>

Setup is  
3 master nodes  
2 coordinating nodes  
2 data nodes

Currently i have below property set on all nodes and i assume my nodes talk on HTTP:  
http.cors.allow-origin: "\*"  
http.cors.enabled: true

**Query:**  
Is it worthwhile making the nodes talk on TCP by setting the below property and removing above 2 properties:  
transport.tcp.port: 9300 ?

Any ES recommendations on this ?

---

<div class="post-metadata">

**Author:** ![Bernt\_Rostad](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@Bernt\_Rostad](https://discuss.elastic.co/u/Bernt_Rostad)\
**Post date:** [September 27, 2018, 11:45am UTC](https://discuss.elastic.co/t/es-nodes-should-talk-on-tcp-or-http/150172/2 "2018-09-27T11:45:03Z")

</div>

> [@pokaleshrey](#):
>
> Is it worthwhile making the nodes talk on TCP

There is no way (or reason) to disable TCP. Elasticsearch uses **both** HTTP and TCP for communication; HTTP is used for client requests (from us users, Kibana etc) while TCP is for internal cluster state communication.

If you don't specify `transport.tcp.port`, in your elasticsearch.yml file, it will simply get a default value in the range 9300-9400 (see the [TCP Transport](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-transport.html#_tcp_transport) documentation), so you really don't need to set it.

---

<div class="post-metadata">

**Author:** ![pokaleshrey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pokaleshrey/32/48680_2.png) [@pokaleshrey](https://discuss.elastic.co/u/pokaleshrey)\
**Post date:** [September 27, 2018, 11:46am UTC](https://discuss.elastic.co/t/es-nodes-should-talk-on-tcp-or-http/150172/3 "2018-09-27T11:46:53Z")

</div>

Thanks. That helps.

---

<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:** [October 25, 2018, 11:46am UTC](https://discuss.elastic.co/t/es-nodes-should-talk-on-tcp-or-http/150172/4 "2018-10-25T11:46:59Z")

</div>

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