# Optimal arquitecture

**URL:** <https://discuss.elastic.co/t/optimal-arquitecture/34969>\
**Category:** Elasticsearch\
**Created:** [November 18, 2015, 4:47pm UTC](https://discuss.elastic.co/t/optimal-arquitecture/34969 "2015-11-18T16:47:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pls](https://avatars.discourse-cdn.com/v4/letter/p/73ab20/32.png) [@pls](https://discuss.elastic.co/u/pls)\
**Post date:** [November 18, 2015, 4:47pm UTC](https://discuss.elastic.co/t/optimal-arquitecture/34969/1 "2015-11-18T16:47:19Z")

</div>

Hi everyone,

It's my first time in this forum and I have a little time working with Elastic.  
I have developed a project that sends multiple searches to Elastic, and I just did not find the optimal configuration for it work as fast as possible.  
Actually, this is my test arquitecture:

- 5 Nodes (2 CPU - 2Gb each one)
- 2 Indices (not change):  
Indice 1 - 100Mb / 1Million Docs / 5 fields / 5 Shards / 4 Replies  
Indice 2 - 4.5 GB / 10 Million Docs / 15 fields / 5 Shards / 2 Replies

My app has 18 threads sending queries (5 Million in each execution) to elastic and waiting for response.  
I'd like know which is the optimal AWS arquitecture for production:

- Is faster many small CPU or few powerful CPU?
- 2 instances with 2 CPU / 8Gb each one, would be enough? Or
- 4 instances with 2 CPU / 4Gb each one, would be faster.

Thanks for your help.

---

<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 18, 2015, 10:45pm UTC](https://discuss.elastic.co/t/optimal-arquitecture/34969/2 "2015-11-18T22:45:22Z")

</div>

Most of this you need to test to see what each differing infrastructure will provide in terms of response times and how that matches against your SLAs.

> [@pls](#):
>
> Indice 1 - 100Mb / 1Million Docs / 5 fields / 5 Shards / 4 Replies

That's too many shards! I'd really only have a single shard with 1 or more replicas.

---

<div class="post-metadata">

**Author:** ![pls](https://avatars.discourse-cdn.com/v4/letter/p/73ab20/32.png) [@pls](https://discuss.elastic.co/u/pls)\
**Post date:** [November 25, 2015, 8:15am UTC](https://discuss.elastic.co/t/optimal-arquitecture/34969/3 "2015-11-25T08:15:44Z")

</div>

Thanks Walcom , I will reduce the number of shards and try again.

With regard to architecture, I just wanted to get an idea about whether it is best choice to have many small CPUs or less powerful CPUs considering my indexes. Thank you anyway.

---

<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 5, 2017, 11:36pm UTC](https://discuss.elastic.co/t/optimal-arquitecture/34969/4 "2017-07-05T23:36:03Z")

</div>

Closed on July 5, 2017, 11:36pm UTC


