# When are index updates written to the gateway?

**URL:** <https://discuss.elastic.co/t/when-are-index-updates-written-to-the-gateway/3372>\
**Category:** Elasticsearch\
**Created:** [September 27, 2010, 2:27pm UTC](https://discuss.elastic.co/t/when-are-index-updates-written-to-the-gateway/3372 "2010-09-27T14:27:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbenson](https://avatars.discourse-cdn.com/v4/letter/d/958977/32.png) [@dbenson](https://discuss.elastic.co/u/dbenson)\
**Post date:** [September 27, 2010, 2:27pm UTC](https://discuss.elastic.co/t/when-are-index-updates-written-to-the-gateway/3372/1 "2010-09-27T14:27:25Z")

</div>

In our system we would like to know an index submission has been fully  
written to the gateway before acknowledging a document has been  
indexed.

The default configuration is for index commits to occur every second.  
In our configuration, we're calling snapshot programatically. Does  
snapshot force an index commit or does it work from the last commit?

Thanks,

David

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [September 27, 2010, 2:41pm UTC](https://discuss.elastic.co/t/when-are-index-updates-written-to-the-gateway/3372/2 "2010-09-27T14:41:35Z")

</div>

elasticsearch works a bit differently. You don't need a commit to make sure  
data has been indexed in a persistent manner. There is an internal  
transaction log that makes sure this is the case. Once an index/delete  
operation returns, it is after it has been indexed and added to the  
transaction log (no need for lucene commit, which is expensive).

Regarding the _shared_ gateway, it periodically (and in an asyn manner)  
replicas those changes to a shared storage. This happens every 10 seconds  
(by default), regardless of commits / flush or not (transaction log is also  
persisted to the shared storage).

You can have a look at the local gateway option added in upcoming 0.11, it  
basically provides full long term persistency without a shared storage  
gateway. Blogged about it here:  
[Zero Conf Persistency | Elastic Blog](http://www.elasticsearch.com/blog/2010/09/27/zero_conf_persistency.html).

-shay.banon

On Mon, Sep 27, 2010 at 4:27 PM, dbenson [dbenson@dbenson.net](mailto:dbenson@dbenson.net) wrote:

> In our system we would like to know an index submission has been fully  
> written to the gateway before acknowledging a document has been  
> indexed.
> 
> The default configuration is for index commits to occur every second.  
> In our configuration, we're calling snapshot programatically. Does  
> snapshot force an index commit or does it work from the last commit?
> 
> Thanks,
> 
> David

---

<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, 4:18am UTC](https://discuss.elastic.co/t/when-are-index-updates-written-to-the-gateway/3372/3 "2017-07-06T04:18:54Z")

</div>

Closed on July 6, 2017, 4:18am UTC


