# Understanding local gateway

**URL:** <https://discuss.elastic.co/t/understanding-local-gateway/5001>\
**Category:** Elasticsearch\
**Created:** [July 29, 2011, 9:50pm UTC](https://discuss.elastic.co/t/understanding-local-gateway/5001 "2011-07-29T21:50:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmet\_Arslan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahmet_arslan/32/3152_2.png) [@Ahmet\_Arslan](https://discuss.elastic.co/u/Ahmet_Arslan)\
**Post date:** [July 29, 2011, 9:50pm UTC](https://discuss.elastic.co/t/understanding-local-gateway/5001/1 "2011-07-29T21:50:23Z")

</div>

Hello,

I am using version 0.17.1.

I activated local gateway in elasticsearch.yml file as follows:

# Gateway Settings

gateway:  
recover\_after\_nodes: 1  
recover\_after\_time: 5m  
expected\_nodes: 2

I read somewhere that file system location (used by local gateway) is the  
work location by default.  
So I was expecting work directory is created under $ES\_HOME. But it didn't.  
I thought that some files (used to recover cluster state etc ) will be  
there.

Am I missing something here?

Where I can find more information about local gateway?

How do I make sure ES gateway is working correctly?

Thanks,  
Ahmet

---

<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:** [July 30, 2011, 11:45am UTC](https://discuss.elastic.co/t/understanding-local-gateway/5001/2 "2011-07-30T11:45:58Z")

</div>

Each node stores the data under the `data` directory. By default, the local  
gateway is used, even when you don't enable the below settings.

On Sat, Jul 30, 2011 at 12:50 AM, [iorixxx@yahoo.com](mailto:iorixxx@yahoo.com) [iorixxx@yahoo.com](mailto:iorixxx@yahoo.com)wrote:

> Hello,
> 
> I am using version 0.17.1.
> 
> I activated local gateway in elasticsearch.yml file as follows:
> 
> # Gateway Settings
> 
> gateway:  
> recover\_after\_nodes: 1  
> recover\_after\_time: 5m  
> expected\_nodes: 2
> 
> I read somewhere that file system location (used by local gateway) is the  
> work location by default.  
> So I was expecting work directory is created under $ES\_HOME. But it  
> didn't.  
> I thought that some files (used to recover cluster state etc ) will be  
> there.
> 
> Am I missing something here?
> 
> Where I can find more information about local gateway?
> 
> How do I make sure ES gateway is working correctly?
> 
> Thanks,  
> Ahmet

---

<div class="post-metadata">

**Author:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [July 31, 2011, 10:30am UTC](https://discuss.elastic.co/t/understanding-local-gateway/5001/3 "2011-07-31T10:30:41Z")

</div>

Hi,

I think Ahmet is referring to the "work" directory mentioned on  
[Elastic — The Search AI Company | Elastic](http://www.elasticsearch.org/guide/reference/setup/dir-layout.html) and  
wondering when that dir is created and what exactly is in it.

## Otis

Sematext is hiring search engineers -- [Jobs](http://sematext.com/about/jobs.html)

On Jul 30, 7:45 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> Each node stores the data under the `data` directory. By default, the local  
> gateway is used, even when you don't enable the below settings.
> 
> On Sat, Jul 30, 2011 at 12:50 AM, [iori...@yahoo.com](mailto:iori...@yahoo.com) [iori...@yahoo.com](mailto:iori...@yahoo.com)wrote:
> 
> > Hello,
> 
> > I am using version 0.17.1.
> 
> > I activated local gateway in elasticsearch.yml file as follows:
> 
> > # Gateway Settings
> > 
> > gateway:  
> > recover\_after\_nodes: 1  
> > recover\_after\_time: 5m  
> > expected\_nodes: 2
> 
> > I read somewhere that file system location (used by local gateway) is the  
> > work location by default.  
> > So I was expecting work directory is created under $ES\_HOME. But it  
> > didn't.  
> > I thought that some files (used to recover cluster state etc ) will be  
> > there.
> 
> > Am I missing something here?
> 
> > Where I can find more information about local gateway?
> 
> > How do I make sure ES gateway is working correctly?
> 
> > Thanks,  
> > Ahmet

---

<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:** [July 31, 2011, 10:43am UTC](https://discuss.elastic.co/t/understanding-local-gateway/5001/4 "2011-07-31T10:43:18Z")

</div>

That page explains that data is where data is stored. work is used for what  
is explained there, its the "tmp" of elasticsearch. Its not used much.

Though, a lot of versions ago, the data used to be stored under work, but  
that has changed to data, maybe thats where the confusion is coming from.

On Sun, Jul 31, 2011 at 1:30 PM, Otis Gospodnetic \<  
[otis.gospodnetic@gmail.com](mailto:otis.gospodnetic@gmail.com)\> wrote:

> Hi,
> 
> I think Ahmet is referring to the "work" directory mentioned on  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/setup/dir-layout.html) and  
> wondering when that dir is created and what exactly is in it.
> 
> ## Otis
> 
> Sematext is hiring search engineers -- [Jobs - Sematext](http://sematext.com/about/jobs.html)
> 
> On Jul 30, 7:45 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > Each node stores the data under the `data` directory. By default, the  
> > local  
> > gateway is used, even when you don't enable the below settings.
> > 
> > On Sat, Jul 30, 2011 at 12:50 AM, [iori...@yahoo.com](mailto:iori...@yahoo.com) \<[iori...@yahoo.com](mailto:iori...@yahoo.com)  
> > wrote:
> > 
> > > Hello,
> > 
> > > I am using version 0.17.1.
> > 
> > > I activated local gateway in elasticsearch.yml file as follows:
> > 
> > > # Gateway Settings
> > > 
> > > gateway:  
> > > recover\_after\_nodes: 1  
> > > recover\_after\_time: 5m  
> > > expected\_nodes: 2
> > 
> > > I read somewhere that file system location (used by local gateway) is  
> > > the  
> > > work location by default.  
> > > So I was expecting work directory is created under $ES\_HOME. But it  
> > > didn't.  
> > > I thought that some files (used to recover cluster state etc ) will be  
> > > there.
> > 
> > > Am I missing something here?
> > 
> > > Where I can find more information about local gateway?
> > 
> > > How do I make sure ES gateway is working correctly?
> > 
> > > Thanks,  
> > > Ahmet

---

<div class="post-metadata">

**Author:** ![Ahmet\_Arslan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahmet_arslan/32/3152_2.png) [@Ahmet\_Arslan](https://discuss.elastic.co/u/Ahmet_Arslan)\
**Post date:** [August 1, 2011, 8:14am UTC](https://discuss.elastic.co/t/understanding-local-gateway/5001/5 "2011-08-01T08:14:21Z")

</div>

Hi Shay,

I was trying to figure out what is stored by local gateway. I read one of your messages saying that work is used but it turned out to be this is the case in earlier versions.

Confusion about work directory is resolved. But I still don't understand how local gateway works.

Isn't data directory considered as 'transient'? How local disk (data directory) can be used for long term persistence storage?

Thanks,  
Ahmet

--- On Sun, 7/31/11, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

From: Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com)  
Subject: Re: understanding local gateway  
To: [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
Date: Sunday, July 31, 2011, 1:43 PM

That page explains that data is where data is stored. work is used for what is explained there, its the "tmp" of elasticsearch. Its not used much.  
Though, a lot of versions ago, the data used to be stored under work, but that has changed to data, maybe thats where the confusion is coming from.

On Sun, Jul 31, 2011 at 1:30 PM, Otis Gospodnetic [otis.gospodnetic@gmail.com](mailto:otis.gospodnetic@gmail.com) wrote:

Hi,

I think Ahmet is referring to the "work" directory mentioned on

[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/setup/dir-layout.html) and

wondering when that dir is created and what exactly is in it.

Otis

--

Sematext is hiring search engineers -- [Jobs - Sematext](http://sematext.com/about/jobs.html)

On Jul 30, 7:45 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> Each node stores the data under the `data` directory. By default, the local

> gateway is used, even when you don't enable the below settings.

> 

> On Sat, Jul 30, 2011 at 12:50 AM, [iori...@yahoo.com](mailto:iori...@yahoo.com) [iori...@yahoo.com](mailto:iori...@yahoo.com)wrote:

> 

> 

> 

> 

> 

> 

> 

> > Hello,

> 

> > I am using version 0.17.1.

> 

> > I activated local gateway in elasticsearch.yml file as follows:

> 

> > # Gateway Settings

> > gateway:

> > ```
> > recover_after_nodes: 1
> > 
> > ```

> > ```
> > recover_after_time: 5m
> > 
> > ```

> > ```
> > expected_nodes: 2
> > 
> > ```

> 

> > I read somewhere that file system location (used by local gateway) is the

> > work location by default.

> > So I was expecting work directory is created under $ES\_HOME. But it

> > didn't.

> > I thought that some files (used to recover cluster state etc ) will be

> > there.

> 

> > Am I missing something here?

> 

> > Where I can find more information about local gateway?

> 

> > How do I make sure ES gateway is working correctly?

> 

> > Thanks,

> > Ahmet

---

<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:** [August 1, 2011, 9:00pm UTC](https://discuss.elastic.co/t/understanding-local-gateway/5001/6 "2011-08-01T21:00:57Z")

</div>

local data directory is not considered transient when using the local  
gateway. What exactly are you missing from this explanation:  
[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/modules/gateway/local.html)? The  
low level details on how it works?

On Mon, Aug 1, 2011 at 11:14 AM, Ahmet Arslan [iorixxx@yahoo.com](mailto:iorixxx@yahoo.com) wrote:

> Hi Shay,
> 
> I was trying to figure out what is stored by local gateway. I read one of  
> your messages saying that work is used but it turned out to be this is the  
> case in earlier versions.
> 
> Confusion about work directory is resolved. But I still don't understand  
> how local gateway works.
> 
> Isn't data directory considered as 'transient'? How local disk (data  
> directory) can be used for long term persistence storage?
> 
> Thanks,  
> Ahmet
> 
> --- On _Sun, 7/31/11, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com)_ wrote:
> 
> From: Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com)  
> Subject: Re: understanding local gateway  
> To: [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> Date: Sunday, July 31, 2011, 1:43 PM
> 
> That page explains that data is where data is stored. work is used for what  
> is explained there, its the "tmp" of elasticsearch. Its not used much.
> 
> Though, a lot of versions ago, the data used to be stored under work, but  
> that has changed to data, maybe thats where the confusion is coming from.
> 
> On Sun, Jul 31, 2011 at 1:30 PM, Otis Gospodnetic \<  
> [otis.gospodnetic@gmail.com](mailto:otis.gospodnetic@gmail.com)[http://mc/compose?to=otis.gospodnetic@gmail.com](http://mc/compose?to=otis.gospodnetic@gmail.com)
> 
> > wrote:
> 
> Hi,
> 
> I think Ahmet is referring to the "work" directory mentioned on  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/setup/dir-layout.html) and  
> wondering when that dir is created and what exactly is in it.
> 
> ## Otis
> 
> Sematext is hiring search engineers -- [Jobs - Sematext](http://sematext.com/about/jobs.html)
> 
> On Jul 30, 7:45 am, Shay Banon \<[kim...@gmail.com](mailto:kim...@gmail.com)[http://mc/compose?to=kim...@gmail.com](http://mc/compose?to=kim...@gmail.com)\>  
> wrote:
> 
> > Each node stores the data under the `data` directory. By default, the  
> > local  
> > gateway is used, even when you don't enable the below settings.
> > 
> > On Sat, Jul 30, 2011 at 12:50 AM, [iori...@yahoo.com](mailto:iori...@yahoo.com)[http://mc/compose?to=iori...@yahoo.com](http://mc/compose?to=iori...@yahoo.com)\<  
> > [iori...@yahoo.com](mailto:iori...@yahoo.com) [http://mc/compose?to=iori...@yahoo.com](http://mc/compose?to=iori...@yahoo.com)\>wrote:
> > 
> > > Hello,
> > 
> > > I am using version 0.17.1.
> > 
> > > I activated local gateway in elasticsearch.yml file as follows:
> > 
> > > # Gateway Settings
> > > 
> > > gateway:  
> > > recover\_after\_nodes: 1  
> > > recover\_after\_time: 5m  
> > > expected\_nodes: 2
> > 
> > > I read somewhere that file system location (used by local gateway) is  
> > > the  
> > > work location by default.  
> > > So I was expecting work directory is created under $ES\_HOME. But it  
> > > didn't.  
> > > I thought that some files (used to recover cluster state etc ) will be  
> > > there.
> > 
> > > Am I missing something here?
> > 
> > > Where I can find more information about local gateway?
> > 
> > > How do I make sure ES gateway is working correctly?
> > 
> > > Thanks,  
> > > Ahmet

---

<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, 3:58am UTC](https://discuss.elastic.co/t/understanding-local-gateway/5001/7 "2017-07-06T03:58:35Z")

</div>


