# API to configure replica number and refresh interval?

**URL:** <https://discuss.elastic.co/t/api-to-configure-replica-number-and-refresh-interval/25955>\
**Category:** Elasticsearch\
**Created:** [July 20, 2015, 10:59pm UTC](https://discuss.elastic.co/t/api-to-configure-replica-number-and-refresh-interval/25955 "2015-07-20T22:59:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![linlma](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@linlma](https://discuss.elastic.co/u/linlma)\
**Post date:** [July 20, 2015, 10:59pm UTC](https://discuss.elastic.co/t/api-to-configure-replica-number-and-refresh-interval/25955/1 "2015-07-20T22:59:50Z")

</div>

Hello Elastic Search experts,

Is there an API to configure replica number and refresh interval? And also buffer % for indexing? Thanks.

thanks in advance,  
Lin

---

<div class="post-metadata">

**Author:** ![msimos](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@msimos](https://discuss.elastic.co/u/msimos)\
**Post date:** [July 20, 2015, 11:28pm UTC](https://discuss.elastic.co/t/api-to-configure-replica-number-and-refresh-interval/25955/2 "2015-07-20T23:28:30Z")

</div>

For configuring the number of replicas see this:

[https://www.elastic.co/guide/en/elasticsearch/guide/current/replica-shards.html?q=replica#replica-shards](https://www.elastic.co/guide/en/elasticsearch/guide/current/replica-shards.html?q=replica#replica-shards)

See the following example for refresh\_interval:

[https://www.elastic.co/guide/en/elasticsearch/guide/current/near-real-time.html#CO36-2](https://www.elastic.co/guide/en/elasticsearch/guide/current/near-real-time.html#CO36-2)

indices.memory.index\_buffer\_size controls the buffer % for indexing:

[https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-indices.html#buffer](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-indices.html#buffer)

However I don't recommend changing this and leaving the default (10%) as its usually a sane default. You can read the following blog which is a bit dated but has some useful information:

> **[Performance Considerations for Elasticsearch Indexing
	  	 | Elastic](https://www.elastic.co/blog/performance-considerations-elasticsearch-indexing)**
>
> Running Elasticsearch 2.0? Check out this updated post about performance considerations for Elasticsearch 2.0 indexing. Elasticsearch users have delightfully diverse use cases, ranging from appen...

---

<div class="post-metadata">

**Author:** ![linlma](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@linlma](https://discuss.elastic.co/u/linlma)\
**Post date:** [July 20, 2015, 11:46pm UTC](https://discuss.elastic.co/t/api-to-configure-replica-number-and-refresh-interval/25955/3 "2015-07-20T23:46:33Z")

</div>

Thanks Mike!

Awesome answer. Have a good day.

regards,  
Lin

---

<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 6, 2017, 12:00am UTC](https://discuss.elastic.co/t/api-to-configure-replica-number-and-refresh-interval/25955/4 "2017-07-06T00:00:17Z")

</div>


