# Cluster state storage question

**URL:** https://discuss.elastic.co/t/cluster-state-storage-question/22866
**Category:** Elasticsearch
**Created:** [March 24, 2015, 5:36pm UTC](https://discuss.elastic.co/t/cluster-state-storage-question/22866 "2015-03-24T17:36:31Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Robert\_Gardam](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@Robert\_Gardam](https://discuss.elastic.co/u/Robert_Gardam)
#### Post date: [March 24, 2015, 5:36pm UTC](https://discuss.elastic.co/t/cluster-state-storage-question/22866/1 "2015-03-24T17:36:31Z")

</div>

Hi,  
I am starting to look at the size of my cluster state and I started to  
notice that the shard information is duplicated.

One grouping seems to be from the view of the index and the other from  
which shards live on which host.

I'm sure there's a logical reason for this, i'm just interested to know why?

This probably also compresses pretty well.

Cheers,  
Rob

--  
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/43907b97-4ef9-4950-87a0-20edd6be663a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/43907b97-4ef9-4950-87a0-20edd6be663a%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [March 25, 2015, 10:02pm UTC](https://discuss.elastic.co/t/cluster-state-storage-question/22866/2 "2015-03-25T22:02:02Z")

</div>

Cluster state is compressed by default, but for large clusters, or those  
with lots of large mappings, it can also be a problem.

The cluster needs to know about what shards make up an index, as well as  
where they are located which is why. As you mentioned it is currently  
stored under two separate areas of the cluster state, though it's possible  
this could be combined to reduce the size.

On 25 March 2015 at 04:36, Robert Gardam [robert.gardam@fyber.com](mailto:robert.gardam@fyber.com) wrote:

> Hi,  
> I am starting to look at the size of my cluster state and I started to  
> notice that the shard information is duplicated.
> 
> One grouping seems to be from the view of the index and the other from  
> which shards live on which host.
> 
> I'm sure there's a logical reason for this, i'm just interested to know  
> why?
> 
> This probably also compresses pretty well.
> 
> Cheers,  
> Rob
> 
> --  
> 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/43907b97-4ef9-4950-87a0-20edd6be663a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/43907b97-4ef9-4950-87a0-20edd6be663a%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/43907b97-4ef9-4950-87a0-20edd6be663a%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/43907b97-4ef9-4950-87a0-20edd6be663a%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 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/CAEYi1X\_orh2gZ5%3DXvjRJo6OwsFMwnttCzmF8cJhC8vHqCwC5sQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_orh2gZ5%3DXvjRJo6OwsFMwnttCzmF8cJhC8vHqCwC5sQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [March 25, 2015, 10:21pm UTC](https://discuss.elastic.co/t/cluster-state-storage-question/22866/3 "2015-03-25T22:21:46Z")

</div>

I did some more digging here to understand things a bit more than my last  
(lame, sorry!) email.

We only send routing\_table over the network and then we build routing\_nodes  
out of it on the other side. However routing\_nodes is actually built only  
on access, so unless you use it, which happens on master nodes and if you  
do get /\_cluster/status, it's not actually built.

We need routing\_nodes for a quick access to node view of the shard  
allocation and we need routing\_table for the index view of shard  
allocation. This is done to ensure performance.

There is work happening to improve the overall transfer speed of the  
cluster state between nodes, essentially to send the delta of a state to  
all nodes, rather than the whole state as currently happens.

On 26 March 2015 at 09:02, Mark Walkom [markwalkom@gmail.com](mailto:markwalkom@gmail.com) wrote:

> Cluster state is compressed by default, but for large clusters, or those  
> with lots of large mappings, it can also be a problem.
> 
> The cluster needs to know about what shards make up an index, as well as  
> where they are located which is why. As you mentioned it is currently  
> stored under two separate areas of the cluster state, though it's possible  
> this could be combined to reduce the size.
> 
> On 25 March 2015 at 04:36, Robert Gardam [robert.gardam@fyber.com](mailto:robert.gardam@fyber.com) wrote:
> 
> > Hi,  
> > I am starting to look at the size of my cluster state and I started to  
> > notice that the shard information is duplicated.
> > 
> > One grouping seems to be from the view of the index and the other from  
> > which shards live on which host.
> > 
> > I'm sure there's a logical reason for this, i'm just interested to know  
> > why?
> > 
> > This probably also compresses pretty well.
> > 
> > Cheers,  
> > Rob
> > 
> > --  
> > 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/43907b97-4ef9-4950-87a0-20edd6be663a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/43907b97-4ef9-4950-87a0-20edd6be663a%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/43907b97-4ef9-4950-87a0-20edd6be663a%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/43907b97-4ef9-4950-87a0-20edd6be663a%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 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/CAEYi1X8QLBc\_haaQhr%2BT-arcW44z22x8Q5yevh4i2avGW8e66g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8QLBc_haaQhr%2BT-arcW44z22x8Q5yevh4i2avGW8e66g%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Robert\_Gardam](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@Robert\_Gardam](https://discuss.elastic.co/u/Robert_Gardam)
#### Post date: [March 26, 2015, 9:17am UTC](https://discuss.elastic.co/t/cluster-state-storage-question/22866/4 "2015-03-26T09:17:35Z")

</div>

All ok!  
Thanks for the explanation! I just found it odd that the same information  
was displayed twice, but if it's only sent one way that is good. Makes  
sense!

Elasticsearch has already become incredibly more stable in the past 12  
months!  
The future of ES is really exciting!

Thanks again!  
Rob

On Wednesday, March 25, 2015 at 11:22:14 PM UTC+1, Mark Walkom wrote:

> I did some more digging here to understand things a bit more than my last  
> (lame, sorry!) email.
> 
> We only send routing\_table over the network and then we build  
> routing\_nodes out of it on the other side. However routing\_nodes is  
> actually built only on access, so unless you use it, which happens on  
> master nodes and if you do get /\_cluster/status, it's not actually built.
> 
> We need routing\_nodes for a quick access to node view of the shard  
> allocation and we need routing\_table for the index view of shard  
> allocation. This is done to ensure performance.
> 
> There is work happening to improve the overall transfer speed of the  
> cluster state between nodes, essentially to send the delta of a state to  
> all nodes, rather than the whole state as currently happens.
> 
> On 26 March 2015 at 09:02, Mark Walkom \<[markw...@gmail.com](mailto:markw...@gmail.com) \<javascript:\>\>  
> wrote:
> 
> > Cluster state is compressed by default, but for large clusters, or those  
> > with lots of large mappings, it can also be a problem.
> > 
> > The cluster needs to know about what shards make up an index, as well as  
> > where they are located which is why. As you mentioned it is currently  
> > stored under two separate areas of the cluster state, though it's possible  
> > this could be combined to reduce the size.
> > 
> > On 25 March 2015 at 04:36, Robert Gardam \<[robert...@fyber.com](mailto:robert...@fyber.com)  
> > \<javascript:\>\> wrote:
> > 
> > > Hi,  
> > > I am starting to look at the size of my cluster state and I started to  
> > > notice that the shard information is duplicated.
> > > 
> > > One grouping seems to be from the view of the index and the other from  
> > > which shards live on which host.
> > > 
> > > I'm sure there's a logical reason for this, i'm just interested to know  
> > > why?
> > > 
> > > This probably also compresses pretty well.
> > > 
> > > Cheers,  
> > > Rob
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/43907b97-4ef9-4950-87a0-20edd6be663a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/43907b97-4ef9-4950-87a0-20edd6be663a%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/43907b97-4ef9-4950-87a0-20edd6be663a%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/43907b97-4ef9-4950-87a0-20edd6be663a%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 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/9e805b21-f99f-4892-8629-edfc4443e8be%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9e805b21-f99f-4892-8629-edfc4443e8be%40googlegroups.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, 12:23am UTC](https://discuss.elastic.co/t/cluster-state-storage-question/22866/5 "2017-07-06T00:23:46Z")

</div>


