# Setting replication to async

**URL:** <https://discuss.elastic.co/t/setting-replication-to-async/18476>\
**Category:** Elasticsearch\
**Created:** [July 4, 2014, 5:22am UTC](https://discuss.elastic.co/t/setting-replication-to-async/18476 "2014-07-04T05:22:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Varun\_Vasan\_V](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/varun_vasan_v/32/1429_2.png) [@Varun\_Vasan\_V](https://discuss.elastic.co/u/Varun_Vasan_V)\
**Post date:** [July 4, 2014, 5:22am UTC](https://discuss.elastic.co/t/setting-replication-to-async/18476/1 "2014-07-04T05:22:52Z")

</div>

Hey,

I am trying to set the replication to async. I tried the following.

$ curl -XPOST '[http://localhost:9200/myindex](http://localhost:9200/myindex)' -d '{  
"settings": {  
"replication": "async"  
}  
}'

Is it the correct way to do it?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/cc1fed63-96e5-48d3-b7f1-859d67eb06cd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cc1fed63-96e5-48d3-b7f1-859d67eb06cd%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 4, 2014, 6:36am UTC](https://discuss.elastic.co/t/setting-replication-to-async/18476/2 "2014-07-04T06:36:22Z")

</div>

I know you can do it when indexing using this: [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-index\_.html#index-replication](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-index_.html#index-replication)

Not sure about the index setting. Need to look at code.

That said, are you really sure you want to do this?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 4 juil. 2014 à 07:22, Varun Vasan V [varunvasan91@gmail.com](mailto:varunvasan91@gmail.com) a écrit :

Hey,

## I am trying to set the replication to async. I tried the following. $ curl -XPOST '[http://localhost:9200/myindex](http://localhost:9200/myindex)' -d '{ "settings": { "replication": "async" } }' Is it the correct way to do it?

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/cc1fed63-96e5-48d3-b7f1-859d67eb06cd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cc1fed63-96e5-48d3-b7f1-859d67eb06cd%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/191E70E6-3732-471B-82B0-53552DA85E18%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/191E70E6-3732-471B-82B0-53552DA85E18%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Varun\_Vasan\_V](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/varun_vasan_v/32/1429_2.png) [@Varun\_Vasan\_V](https://discuss.elastic.co/u/Varun_Vasan_V)\
**Post date:** [July 4, 2014, 7:04am UTC](https://discuss.elastic.co/t/setting-replication-to-async/18476/3 "2014-07-04T07:04:27Z")

</div>

Thanks for the reply. Yes, In our user case, we only want eventual  
consistence in our data across the replicas. Will setting replication to  
async increase write performance? Thanks again for helping out.

On Fri, Jul 4, 2014 at 12:06 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> I know you can do it when indexing using this:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-index_.html#index-replication)
> 
> Not sure about the index setting. Need to look at code.
> 
> That said, are you really sure you want to do this?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 4 juil. 2014 à 07:22, Varun Vasan V [varunvasan91@gmail.com](mailto:varunvasan91@gmail.com) a écrit :
> 
> Hey,
> 
> I am trying to set the replication to async. I tried the following.
> 
> $ curl -XPOST '[http://localhost:9200/myindex](http://localhost:9200/myindex)' -d '{  
> "settings": {  
> "replication": "async"  
> }  
> }'
> 
> Is it the correct way to do it?
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).
> 
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/cc1fed63-96e5-48d3-b7f1-859d67eb06cd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cc1fed63-96e5-48d3-b7f1-859d67eb06cd%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/cc1fed63-96e5-48d3-b7f1-859d67eb06cd%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/cc1fed63-96e5-48d3-b7f1-859d67eb06cd%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/FDwvaF7jkyo/unsubscribe](https://groups.google.com/d/topic/elasticsearch/FDwvaF7jkyo/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/191E70E6-3732-471B-82B0-53552DA85E18%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/191E70E6-3732-471B-82B0-53552DA85E18%40pilato.fr)  
> [https://groups.google.com/d/msgid/elasticsearch/191E70E6-3732-471B-82B0-53552DA85E18%40pilato.fr?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/191E70E6-3732-471B-82B0-53552DA85E18%40pilato.fr?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAP1maN7d8fGyoTXSum2LX0O\_KsE1Pw1zDDLKgqDONA5D%2Bvikpg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAP1maN7d8fGyoTXSum2LX0O_KsE1Pw1zDDLKgqDONA5D%2Bvikpg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [July 5, 2014, 5:38pm UTC](https://discuss.elastic.co/t/setting-replication-to-async/18476/4 "2014-07-05T17:38:59Z")

</div>

The default setting of Elasticsearch is replication mode "sync" for good  
reason, this ensures the replica quorum (which is often determined as  
"eventual consistency" but this is really something more because it  
describes properties of the "last-seen" value for update).

Replication setting of "async" does not increase write performance on the  
cluster, and it also does not enable eventual consistency. In fact it  
disables the client's visibility of consistency. Replication setting to  
"async" means an early return to the client who is listening for responses.  
The responses under "async" mode return immediately after primary shard  
operations but before any actions on replica shards have been executed. The  
client can proceed earlier so this may help at the client side if  
the client wants to finish the indexing process sooner regardless if  
replica quorum has been reached at that time or not.

Jörg

On Fri, Jul 4, 2014 at 9:04 AM, Varun Vasan V [varunvasan91@gmail.com](mailto:varunvasan91@gmail.com)  
wrote:

> Thanks for the reply. Yes, In our user case, we only want eventual  
> consistence in our data across the replicas. Will setting replication to  
> async increase write performance? Thanks again for helping out.
> 
> On Fri, Jul 4, 2014 at 12:06 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> 
> > I know you can do it when indexing using this:  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-index_.html#index-replication)
> > 
> > Not sure about the index setting. Need to look at code.
> > 
> > That said, are you really sure you want to do this?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 4 juil. 2014 à 07:22, Varun Vasan V [varunvasan91@gmail.com](mailto:varunvasan91@gmail.com) a écrit :
> > 
> > Hey,
> > 
> > I am trying to set the replication to async. I tried the following.
> > 
> > $ curl -XPOST '[http://localhost:9200/myindex](http://localhost:9200/myindex)' -d '{
> > 
> > "settings": {
> > 
> > ```
> > "replication": "async"
> > 
> > ```
> > 
> > }  
> > }'
> > 
> > Is it the correct way to do it?
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).
> > 
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/cc1fed63-96e5-48d3-b7f1-859d67eb06cd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cc1fed63-96e5-48d3-b7f1-859d67eb06cd%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/cc1fed63-96e5-48d3-b7f1-859d67eb06cd%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/cc1fed63-96e5-48d3-b7f1-859d67eb06cd%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/FDwvaF7jkyo/unsubscribe](https://groups.google.com/d/topic/elasticsearch/FDwvaF7jkyo/unsubscribe).  
> > To unsubscribe from this group and all its topics, send an email to  
> > [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/191E70E6-3732-471B-82B0-53552DA85E18%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/191E70E6-3732-471B-82B0-53552DA85E18%40pilato.fr)  
> > [https://groups.google.com/d/msgid/elasticsearch/191E70E6-3732-471B-82B0-53552DA85E18%40pilato.fr?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/191E70E6-3732-471B-82B0-53552DA85E18%40pilato.fr?utm_medium=email&utm_source=footer)  
> > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAP1maN7d8fGyoTXSum2LX0O\_KsE1Pw1zDDLKgqDONA5D%2Bvikpg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAP1maN7d8fGyoTXSum2LX0O_KsE1Pw1zDDLKgqDONA5D%2Bvikpg%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAP1maN7d8fGyoTXSum2LX0O\_KsE1Pw1zDDLKgqDONA5D%2Bvikpg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAP1maN7d8fGyoTXSum2LX0O_KsE1Pw1zDDLKgqDONA5D%2Bvikpg%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGwwjQCSRk03\_ARd1DLcDb1bHnpiQX2kDg9xgisZwmFCw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGwwjQCSRk03_ARd1DLcDb1bHnpiQX2kDg9xgisZwmFCw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:17am UTC](https://discuss.elastic.co/t/setting-replication-to-async/18476/5 "2017-07-06T01:17:48Z")

</div>


