# Are the insert operations to elasticsearch asynchronous in nature

**URL:** https://discuss.elastic.co/t/are-the-insert-operations-to-elasticsearch-asynchronous-in-nature/15525
**Category:** Elasticsearch
**Created:** [January 31, 2014, 11:21am UTC](https://discuss.elastic.co/t/are-the-insert-operations-to-elasticsearch-asynchronous-in-nature/15525 "2014-01-31T11:21:30Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sowjanya](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@sowjanya](https://discuss.elastic.co/u/sowjanya)
#### Post date: [January 31, 2014, 11:21am UTC](https://discuss.elastic.co/t/are-the-insert-operations-to-elasticsearch-asynchronous-in-nature/15525/1 "2014-01-31T11:21:30Z")

</div>

I am having a client node and a data node. i am using the client node to communicate to data node. My question is when i perform an insertion from client node does the program control returns to client node once the information is sent to data node over the network or is it blocked till the data is inserted and indexed on the data node.

Please help me.

---

<div class="post-metadata">

### Author: ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)
#### Post date: [February 2, 2014, 9:05pm UTC](https://discuss.elastic.co/t/are-the-insert-operations-to-elasticsearch-asynchronous-in-nature/15525/2 "2014-02-02T21:05:18Z")

</div>

If you are using the java API the answer is maybe, it depends on how you use it. In addition, even if you use the synchronous API you have to wait for a refresh for you data to be searchable. By default they happen every second.

Sent from my iPhone

> On Jan 31, 2014, at 6:21 AM, sowjanya [sowjanyachalla@gmail.com](mailto:sowjanyachalla@gmail.com) wrote:
> 
> I am having a client node and a data node. i am using the client node to  
> communicate to data node. My question is when i perform an insertion from  
> client node does the program control returns to client node once the  
> information is sent to data node over the network or is it blocked till the  
> data is inserted and indexed on the data node.
> 
> Please help me.
> 
> --  
> View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/Are-the-insert-operations-to-elasticsearch-asynchronous-in-nature-tp4048555.html](http://elasticsearch-users.115913.n3.nabble.com/Are-the-insert-operations-to-elasticsearch-asynchronous-in-nature-tp4048555.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> 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/1391167290884-4048555.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1391167290884-4048555.post%40n3.nabble.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/81D2EDE3-7106-4A8B-A521-B650F8867772%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/81D2EDE3-7106-4A8B-A521-B650F8867772%40gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)
#### Post date: [February 2, 2014, 9:43pm UTC](https://discuss.elastic.co/t/are-the-insert-operations-to-elasticsearch-asynchronous-in-nature/15525/3 "2014-02-02T21:43:22Z")

</div>

Good question and it's worth a few links 🙂 This link might be helpful,  
look at async replication and refresh

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Also look at translog

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

At this point you'll be confused between refresh and flush, then read this  
🙂

> <https://stackoverflow.com/questions/19963406/refresh-vs-flush>

On Sun, Feb 2, 2014 at 1:05 PM, Nik Everett [nik9000@gmail.com](mailto:nik9000@gmail.com) wrote:

> If you are using the java API the answer is maybe, it depends on how you  
> use it. In addition, even if you use the synchronous API you have to wait  
> for a refresh for you data to be searchable. By default they happen every  
> second.
> 
> Sent from my iPhone
> 
> > On Jan 31, 2014, at 6:21 AM, sowjanya [sowjanyachalla@gmail.com](mailto:sowjanyachalla@gmail.com) wrote:
> > 
> > I am having a client node and a data node. i am using the client node to  
> > communicate to data node. My question is when i perform an insertion from  
> > client node does the program control returns to client node once the  
> > information is sent to data node over the network or is it blocked till  
> > the  
> > data is inserted and indexed on the data node.
> > 
> > Please help me.
> > 
> > --  
> > View this message in context:  
> > [http://elasticsearch-users.115913.n3.nabble.com/Are-the-insert-operations-to-elasticsearch-asynchronous-in-nature-tp4048555.html](http://elasticsearch-users.115913.n3.nabble.com/Are-the-insert-operations-to-elasticsearch-asynchronous-in-nature-tp4048555.html)  
> > Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> > 
> > --  
> > 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/1391167290884-4048555.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1391167290884-4048555.post%40n3.nabble.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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/81D2EDE3-7106-4A8B-A521-B650F8867772%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/81D2EDE3-7106-4A8B-A521-B650F8867772%40gmail.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/CAOT3TWpQp9SMSCMNmoi-dnHx0yEJrKEf9cmK03e5O%3DD5EOTp1A%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWpQp9SMSCMNmoi-dnHx0yEJrKEf9cmK03e5O%3DD5EOTp1A%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:53am UTC](https://discuss.elastic.co/t/are-the-insert-operations-to-elasticsearch-asynchronous-in-nature/15525/4 "2017-07-06T01:53:22Z")

</div>


