# Kibana with routing awareness

**URL:** <https://discuss.elastic.co/t/kibana-with-routing-awareness/270582>\
**Category:** Kibana\
**Created:** [April 19, 2021, 12:58pm UTC](https://discuss.elastic.co/t/kibana-with-routing-awareness/270582 "2021-04-19T12:58:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![GabrielM](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gabrielm/32/47827_2.png) [@GabrielM](https://discuss.elastic.co/u/GabrielM)\
**Post date:** [April 19, 2021, 12:58pm UTC](https://discuss.elastic.co/t/kibana-with-routing-awareness/270582/1 "2021-04-19T12:58:40Z")

</div>

Hello everyone, I just saw that ElasticSearch is able to route requests according to the attributes attached to the cluster nodes ([Cluster-level shard allocation and routing settings | Elasticsearch Guide [7.7] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-cluster.html#shard-allocation-awareness)).

Is it possible to do the same with Kibana please? (I couldn't find anything that explained how to do it, so I guess not).

Thanks in advance, have a nice day!

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [April 19, 2021, 1:59pm UTC](https://discuss.elastic.co/t/kibana-with-routing-awareness/270582/2 "2021-04-19T13:59:14Z")

</div>

Can you explain what exactly you mean by routing awareness in case of Kibana? As Kibana is mostly translating/forwarding Elasticsearch requests, it will benefit from this ES setting as well, as the requests issued by Kibana will respect these settings as well.

One related thing I can think of - it's a common pattern to have a coordinating Elasticsearch node running along with the Kibana instance on the same host and have Kibana only connected to this node. This way the full power of Elasticsearch routing logic can be leveraged.

---

<div class="post-metadata">

**Author:** ![GabrielM](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gabrielm/32/47827_2.png) [@GabrielM](https://discuss.elastic.co/u/GabrielM)\
**Post date:** [April 19, 2021, 2:18pm UTC](https://discuss.elastic.co/t/kibana-with-routing-awareness/270582/3 "2021-04-19T14:18:18Z")

</div>

Hello and thank you for the quick response.

- I am running ELK in a Kubernetes cluster deployed in multiple zones.
- I am using attributes to route shards and queries in the cluster (a query launched in a coordinating node in a zone would run only in the same zone)
- Multiple Kibana instances are running in the cluster (and they are all identical with the same config)

But I am facing this issue:

When Kibana is doing queries on ES, it doesn't know which coordinating node to use =\> and a Kibana in zone "A" can use a coordinating node in zone "B"

I don't know if it is clear, I can draw if needed 🙂

I see 2 solutions here:

- Kibana is routing aware (if it's possible)  
or
- I must use 2 Kibana with 2 different configurations

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [April 19, 2021, 2:33pm UTC](https://discuss.elastic.co/t/kibana-with-routing-awareness/270582/4 "2021-04-19T14:33:09Z")

</div>

Ah, I see, thanks a lot for this explanation. To my knowledge Kibana doesn't offer any features around this. In this case the "routing awareness" would be setting `elasticsearch.hosts` to just the ES hosts in the same zone or a single dedicated coordinating node just for Kibana in that zone - Kubernetes would have to handle this additional complexity.

I have almost no Kubernetes knowledge (as you probably realized by now), but "topology aware hints" seem like a related feature: [Topology Aware Hints | Kubernetes](https://kubernetes.io/docs/concepts/services-networking/topology-aware-hints/)

Maybe you could also create a single pod which contains Kibana and Elasticsearch coordinating node together.

---

<div class="post-metadata">

**Author:** ![GabrielM](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gabrielm/32/47827_2.png) [@GabrielM](https://discuss.elastic.co/u/GabrielM)\
**Post date:** [April 19, 2021, 2:38pm UTC](https://discuss.elastic.co/t/kibana-with-routing-awareness/270582/5 "2021-04-19T14:38:51Z")

</div>

"Topology Aware Hints" feature is very new and our cluster is not able to do it now but great idea !  
One pod with ES+Kibana could be a good solution too.

I will try these solutions, thank you very much !!!

---

<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:** [May 17, 2021, 2:39pm UTC](https://discuss.elastic.co/t/kibana-with-routing-awareness/270582/6 "2021-05-17T14:39:04Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
