# Understanding gateway in EC2 environment

**URL:** https://discuss.elastic.co/t/understanding-gateway-in-ec2-environment/9047
**Category:** Elasticsearch
**Created:** [September 17, 2012, 9:19pm UTC](https://discuss.elastic.co/t/understanding-gateway-in-ec2-environment/9047 "2012-09-17T21:19:42Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Jae](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jae/32/791_2.png) [@Jae](https://discuss.elastic.co/u/Jae)
#### Post date: [September 17, 2012, 9:19pm UTC](https://discuss.elastic.co/t/understanding-gateway-in-ec2-environment/9047/1 "2012-09-17T21:19:42Z")

</div>

Hi

I am ready to deploy elasticsearch cluster into the prod environment.  
Before doing that, I want make sure I really don't need S3 gateway.

I set up 6 instances of elasticsearch, with the number of shards 12, 1  
replication. When one instance was terminated by the EC2 system check, its  
data stored in the local storage was gone but search result was fine  
because I have a replication. After new elasticsearch instance warmed up,  
I can see the following cluster status:

"active\_shards" : 24,  
"relocating\_shards" : 2,

I didn't find any data in the new instance but how can all 24 shards be active? Also, where are the relocating shards? When does the replication shard be recovered to the new instance?

Do I really not need S3 gateway?

Thank you

Best, Jae

--

---

<div class="post-metadata">

### Author: ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)
#### Post date: [September 18, 2012, 5:31am UTC](https://discuss.elastic.co/t/understanding-gateway-in-ec2-environment/9047/2 "2012-09-18T05:31:50Z")

</div>

Hi Jae,

The cluster will only re-allocate two shards (configurable) at a time.  
Which nodes are appearing in the cluster state? Unicast or multicast?  
I find the head plugin very useful to visualize the distribution of  
shards.

You do not need the S3 gateway. In fact, it is not recommended.

Cheers,

Ivan

On Mon, Sep 17, 2012 at 2:19 PM, Jae [metacret@gmail.com](mailto:metacret@gmail.com) wrote:

> Hi
> 
> I am ready to deploy elasticsearch cluster into the prod environment. Before  
> doing that, I want make sure I really don't need S3 gateway.
> 
> I set up 6 instances of elasticsearch, with the number of shards 12, 1  
> replication. When one instance was terminated by the EC2 system check, its  
> data stored in the local storage was gone but search result was fine because  
> I have a replication. After new elasticsearch instance warmed up, I can see  
> the following cluster status:
> 
> "active\_shards" : 24,  
> "relocating\_shards" : 2,
> 
> I didn't find any data in the new instance but how can all 24 shards be  
> active? Also, where are the relocating shards? When does the replication  
> shard be recovered to the new instance?
> 
> Do I really not need S3 gateway?
> 
> Thank you
> 
> Best, Jae
> 
> --

--

---

<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 18, 2012, 10:03am UTC](https://discuss.elastic.co/t/understanding-gateway-in-ec2-environment/9047/3 "2012-09-18T10:03:19Z")

</div>

The reason why you see 24 active shards when the node was down is because elasticsearch will automatically reallocate the shards that existed on the node that failed on the rest of the cluster.

On Sep 17, 2012, at 11:19 PM, Jae [metacret@gmail.com](mailto:metacret@gmail.com) wrote:

> Hi
> 
> I am ready to deploy elasticsearch cluster into the prod environment. Before doing that, I want make sure I really don't need S3 gateway.
> 
> I set up 6 instances of elasticsearch, with the number of shards 12, 1 replication. When one instance was terminated by the EC2 system check, its data stored in the local storage was gone but search result was fine because I have a replication. After new elasticsearch instance warmed up, I can see the following cluster status:
> 
> "active\_shards" : 24,  
> "relocating\_shards" : 2,
> 
> I didn't find any data in the new instance but how can all 24 shards be active? Also, where are the relocating shards? When does the replication shard be recovered to the new instance?
> 
> Do I really not need S3 gateway?
> 
> Thank you  
> Best, Jae
> 
> --

--

---

<div class="post-metadata">

### Author: ![Jae](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jae/32/791_2.png) [@Jae](https://discuss.elastic.co/u/Jae)
#### Post date: [September 19, 2012, 3:35am UTC](https://discuss.elastic.co/t/understanding-gateway-in-ec2-environment/9047/4 "2012-09-19T03:35:41Z")

</div>

Thank you so much!

Elasticsearc is awesome!

On Tuesday, September 18, 2012 3:03:18 AM UTC-7, kimchy wrote:

> The reason why you see 24 active shards when the node was down is because  
> elasticsearch will automatically reallocate the shards that existed on the  
> node that failed on the rest of the cluster.
> 
> On Sep 17, 2012, at 11:19 PM, Jae \<[meta...@gmail.com](mailto:meta...@gmail.com) \<javascript:\>\> wrote:
> 
> Hi
> 
> I am ready to deploy elasticsearch cluster into the prod environment.  
> Before doing that, I want make sure I really don't need S3 gateway.
> 
> I set up 6 instances of elasticsearch, with the number of shards 12, 1  
> replication. When one instance was terminated by the EC2 system check, its  
> data stored in the local storage was gone but search result was fine  
> because I have a replication. After new elasticsearch instance warmed up,  
> I can see the following cluster status:
> 
> "active\_shards" : 24,  
> "relocating\_shards" : 2,
> 
> I didn't find any data in the new instance but how can all 24 shards be active? Also, where are the relocating shards? When does the replication shard be recovered to the new instance?
> 
> Do I really not need S3 gateway?
> 
> Thank you
> 
> Best, Jae
> 
> --

--

---

<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:12am UTC](https://discuss.elastic.co/t/understanding-gateway-in-ec2-environment/9047/5 "2017-07-06T03:12:23Z")

</div>


