# RestClient and TransportClient what is reccomended

**URL:** <https://discuss.elastic.co/t/restclient-and-transportclient-what-is-reccomended/88226>\
**Category:** Elasticsearch\
**Created:** [June 5, 2017, 6:09am UTC](https://discuss.elastic.co/t/restclient-and-transportclient-what-is-reccomended/88226 "2017-06-05T06:09:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jshraddha](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jshraddha](https://discuss.elastic.co/u/jshraddha)\
**Post date:** [June 5, 2017, 6:09am UTC](https://discuss.elastic.co/t/restclient-and-transportclient-what-is-reccomended/88226/1 "2017-06-05T06:09:03Z")

</div>

Hi,

For data ingestion to ES I have used transport client API previously. It was working fine on local cluster but when I tried pushing it to amazon elasticsearch instance it was having problems. I searched for the issue and found that it is related to transport port. Most of the people were having that issue and recommended to use RestClient api.

I have couple questions in my mind regarding this:

1. What is the best practice ? Using transport client or RestClient which one is preferable.
2. I tried RestClient and it worked for local as well as my amazon elasticsearch instance. Creating request object using NStringEntity and using performRequest method I ingested my data to amazon ES. When i looked for API's for index creation, existance of the index etc I saw methods which are either not available for RestClient and are available for Transport client, So the question is are there any such API's available for RestClient as well? If not what should be done so as to check for available indexes and creating new one so I have to switch for Transport API?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 5, 2017, 6:33am UTC](https://discuss.elastic.co/t/restclient-and-transportclient-what-is-reccomended/88226/2 "2017-06-05T06:33:55Z")

</div>

You can use transport client with elastic cloud (which runs on AWS).  
High level REST is coming soon.

---

<div class="post-metadata">

**Author:** ![jshraddha](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jshraddha](https://discuss.elastic.co/u/jshraddha)\
**Post date:** [June 5, 2017, 6:42am UTC](https://discuss.elastic.co/t/restclient-and-transportclient-what-is-reccomended/88226/3 "2017-06-05T06:42:40Z")

</div>

@dadoonet: Thanks a lot. May I know when can we get this High level REST ?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 5, 2017, 6:59am UTC](https://discuss.elastic.co/t/restclient-and-transportclient-what-is-reccomended/88226/4 "2017-06-05T06:59:51Z")

</div>

No date but you can follow progress at:

> <https://github.com/elastic/elasticsearch/issues/23331>

---

<div class="post-metadata">

**Author:** ![jshraddha](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jshraddha](https://discuss.elastic.co/u/jshraddha)\
**Post date:** [June 6, 2017, 9:36am UTC](https://discuss.elastic.co/t/restclient-and-transportclient-what-is-reccomended/88226/5 "2017-06-06T09:36:50Z")

</div>

@dadoonet: Does transport client works with EC2 instance?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 6, 2017, 11:04am UTC](https://discuss.elastic.co/t/restclient-and-transportclient-what-is-reccomended/88226/6 "2017-06-06T11:04:27Z")

</div>

If you mean:

- Elasticsearch Instances that you are installing and managing yourself on ec2: YES
- Elasticsearch instances that [elastic cloud](https://cloud.elastic.co/) is running as a service on ec2: YES
- Elasticsearch instances that Amazon is running as a service on ec2: NO

---

<div class="post-metadata">

**Author:** ![jshraddha](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jshraddha](https://discuss.elastic.co/u/jshraddha)\
**Post date:** [June 6, 2017, 11:08am UTC](https://discuss.elastic.co/t/restclient-and-transportclient-what-is-reccomended/88226/7 "2017-06-06T11:08:13Z")

</div>

Thanks @dadoonet : Yes I mean Elasticsearch Instances that i will be installing and managing myself on ec2.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 6, 2017, 11:25am UTC](https://discuss.elastic.co/t/restclient-and-transportclient-what-is-reccomended/88226/8 "2017-06-06T11:25:40Z")

</div>

So no problem.

---

<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 4, 2017, 11:25am UTC](https://discuss.elastic.co/t/restclient-and-transportclient-what-is-reccomended/88226/9 "2017-07-04T11:25:55Z")

</div>

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