# Runing multiple Kibana Instances vs load balancing

**URL:** <https://discuss.elastic.co/t/runing-multiple-kibana-instances-vs-load-balancing/328550>\
**Category:** Kibana\
**Created:** [March 26, 2023, 9:56am UTC](https://discuss.elastic.co/t/runing-multiple-kibana-instances-vs-load-balancing/328550 "2023-03-26T09:56:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefws](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stefws/32/6442_2.png) [@stefws](https://discuss.elastic.co/u/stefws)\
**Post date:** [March 26, 2023, 9:56am UTC](https://discuss.elastic.co/t/runing-multiple-kibana-instances-vs-load-balancing/328550/1 "2023-03-26T09:56:50Z")

</div>

Want to load balancing multiple Kibana v.8.6 instances, wondering if login sessions are to be considered state-less or if we need to apply session stickyness and if rooted sticky on what, cookie...?

Also what to do about health checking, any good URLs to hit?

As always appreciate all hints, TIA!

---

<div class="post-metadata">

**Author:** ![BenB196](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benb196/32/83401_2.png) [@BenB196](https://discuss.elastic.co/u/BenB196)\
**Post date:** [March 26, 2023, 11:43am UTC](https://discuss.elastic.co/t/runing-multiple-kibana-instances-vs-load-balancing/328550/2 "2023-03-26T11:43:15Z")

</div>

This [doc](https://www.elastic.co/guide/en/kibana/current/production.html) covers the concept of Load Balancing Kibana in more detail, and should answer your questions about sessions & cookies.

It doesn't mention a health check, but in theory you should be able to do a GET against the root Kibana URL and it should return a 2xx when healthy (I believe it returns a 503 when its starting up).

---

<div class="post-metadata">

**Author:** ![stefws](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stefws/32/6442_2.png) [@stefws](https://discuss.elastic.co/u/stefws)\
**Post date:** [March 26, 2023, 2:38pm UTC](https://discuss.elastic.co/t/runing-multiple-kibana-instances-vs-load-balancing/328550/3 "2023-03-26T14:38:45Z")

</div>

Thanks, one Q about the uniqueness that doc talks of:

```auto
These settings must be unique across each Kibana instance:

server.uuid // if not provided, this is autogenerated
server.name
path.data
pid.file
server.port

When using a file appender, the target file must also be unique:

logging:
  appenders:
    default:
      type: file
      fileName: /unique/path/per/instance

```

Aint that only an issue when talking of multiple instances on the same server?

---

<div class="post-metadata">

**Author:** ![stefws](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stefws/32/6442_2.png) [@stefws](https://discuss.elastic.co/u/stefws)\
**Post date:** [March 26, 2023, 3:19pm UTC](https://discuss.elastic.co/t/runing-multiple-kibana-instances-vs-load-balancing/328550/4 "2023-03-26T15:19:54Z")

</div>

Seems not viable just to hit root URL for health probing as it redirects to location: login.

Maybe a simple tcp connect probe will work just fine as boot time isn't considered serious for kibana...

```auto
$ curl -ki https://node0247:5601
HTTP/1.1 302 Found
location: /login?next=%2F
x-content-type-options: nosniff
referrer-policy: no-referrer-when-downgrade
content-security-policy: script-src 'self' 'unsafe-eval'; worker-src blob: 'self'; style-src 'unsafe-inline' 'self'
kbn-name: <redacted>
kbn-license-sig: cfb29c85f3350e2b9c53087013ead321c865e45ed82e31b237d4c66dd7419919
cache-control: private, no-cache, no-store, must-revalidate
content-length: 0
Date: Sun, 26 Mar 2023 15:13:55 GMT
Connection: keep-alive
Keep-Alive: timeout=120

$ curl -ki https://node0247:5601/app/kibana
HTTP/1.1 302 Found
location: /login?next=%2Fapp%2Fkibana
x-content-type-options: nosniff
referrer-policy: no-referrer-when-downgrade
content-security-policy: script-src 'self' 'unsafe-eval'; worker-src blob: 'self'; style-src 'unsafe-inline' 'self'
kbn-name: <redacted>
kbn-license-sig: cfb29c85f3350e2b9c53087013ead321c865e45ed82e31b237d4c66dd7419919
cache-control: private, no-cache, no-store, must-revalidate
content-length: 0
Date: Sun, 26 Mar 2023 15:14:23 GMT
Connection: keep-alive
Keep-Alive: timeout=120

```

---

<div class="post-metadata">

**Author:** ![BenB196](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benb196/32/83401_2.png) [@BenB196](https://discuss.elastic.co/u/BenB196)\
**Post date:** [March 26, 2023, 3:33pm UTC](https://discuss.elastic.co/t/runing-multiple-kibana-instances-vs-load-balancing/328550/5 "2023-03-26T15:33:00Z")

</div>

> Aint that only an issue when talking of multiple instances on the same server?

Yes, that appears to only be important if they are hosted on the same server.

> Seems not viable just to hit root URL for health probing as it redirects to location: login.

You should be able to just hit the login URL and check for a 2xx, if you hit the login URL and the server isn't ready, I think you'll get the 503 still.

---

<div class="post-metadata">

**Author:** ![stefws](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stefws/32/6442_2.png) [@stefws](https://discuss.elastic.co/u/stefws)\
**Post date:** [March 26, 2023, 4:14pm UTC](https://discuss.elastic.co/t/runing-multiple-kibana-instances-vs-load-balancing/328550/6 "2023-03-26T16:14:56Z")

</div>

🙂 off course, silly me:

```auto
$ curl -ki https://node0247:5601/login
HTTP/1.1 200 OK

```

with just aligned:

```auto
xpack.encryptedSavedObjects.encryptionKey

```

with all other xpack.\* at default values, it seems to work load balancing across multiple instances with just one instance per OS instance and current just using tcp cnx probe, might enhance w/login URL later... thanks for directions!

---

<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:** [April 23, 2023, 4:15pm UTC](https://discuss.elastic.co/t/runing-multiple-kibana-instances-vs-load-balancing/328550/7 "2023-04-23T16:15:12Z")

</div>

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