# Kibana load times

**URL:** <https://discuss.elastic.co/t/kibana-load-times/228575>\
**Category:** Kibana\
**Created:** [April 17, 2020, 8:17pm UTC](https://discuss.elastic.co/t/kibana-load-times/228575 "2020-04-17T20:17:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![liorg2](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@liorg2](https://discuss.elastic.co/u/liorg2)\
**Post date:** [April 17, 2020, 8:17pm UTC](https://discuss.elastic.co/t/kibana-load-times/228575/1 "2020-04-17T20:17:33Z")

</div>

Hi guys,  
Just wanted to verify that I'm not missing anything, and this behaviour is normal.

For me, it takes about 8 seconds until Kibana's main page load.  
Is there anything to do about that?  
It's hosted on the [cloud.elatic.co](http://cloud.elatic.co), and running on an Azure E32sV3.

I'm talking about that page, which has very little to render

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/8/a837baf5a332c31199b7c7a45e69d51d36a77aef.png)

Other than that, Kibana instance monitoring looks like that:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/e/ee6574df72e5c28e25b09629843609328b33d990.png)

---

<div class="post-metadata">

**Author:** ![Krister](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@Krister](https://discuss.elastic.co/u/Krister)\
**Post date:** [April 18, 2020, 1:53am UTC](https://discuss.elastic.co/t/kibana-load-times/228575/2 "2020-04-18T01:53:05Z")

</div>

I wish I was at 8 seconds! I'm at anywhere from 30-200 seconds on the [cloud.co](http://cloud.co) hosted Kibana.

The problem is that the distribution of Kibana is setup badly if you have any kind of latency. Every asset is served with "Cache-Control: must-revalidate", just revalidating the 150 or so assets with a 300ms ping takes 30 seconds (and there's something where a bunch of scripts are loaded serially). You can't even stick a cdn in front of it effectively because the cdn would have to revalidate too.

The solution is to setup a reverse proxy and overwrite Cache-Control with something useful. Finally put cloudflare/cloudfront as a CDN in front of it and you should get to 2-3 seconds. You might have a problem where upgrading Kibana results in some stale assets being served for a period (but it's easier to deal with that every few months than enduring the loading spinner multiple times per day).

My nginx config (hosting under /kibana using oauth2\_proxy) is:

```auto
    # override cache-control header for cacheable assets on kibana.
    # we can't do any complex conditions with nginx so we just look for etag as a
    # sign it's cacheable and leaving the no-cache queries alone.
    map $sent_http_etag $kibana_cache_control {
      default "";
      ~.+ public,max-age=240000;
    }

    # manifest.json is served without the oauth2 cooke so we need to disable auth.
    location /kibana/ui/favicons/manifest.json {
      auth_request off;
      proxy_pass http://kibana:5601/ui/favicons/manifest.json;
      proxy_http_version 1.1;
      proxy_request_buffering off;
      proxy_set_header Authorization "Basic .....";
    }

    location /kibana/ {
      proxy_pass http://kibana:5601/;
      proxy_http_version 1.1;
      proxy_request_buffering off;

      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header Host $host;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;
      proxy_set_header X-Forwarded-Host $host;

      proxy_hide_header "Cache-Control";
      add_header "Cache-Control" $kibana_cache_control;

      proxy_set_header Authorization "Basic ........";
    }

```

---

<div class="post-metadata">

**Author:** ![liorg2](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@liorg2](https://discuss.elastic.co/u/liorg2)\
**Post date:** [April 18, 2020, 7:21am UTC](https://discuss.elastic.co/t/kibana-load-times/228575/4 "2020-04-18T07:21:46Z")

</div>

Thanks a lot @Krister !  
Did you configure anything on cloud deployment side? ( kibana\> user settings)

---

<div class="post-metadata">

**Author:** ![Krister](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@Krister](https://discuss.elastic.co/u/Krister)\
**Post date:** [April 18, 2020, 12:00pm UTC](https://discuss.elastic.co/t/kibana-load-times/228575/5 "2020-04-18T12:00:44Z")

</div>

You would need to run an nginx and kibana instance locally, or somewhere on your infrastructure. Your local Kibana talks to the cloud hosted Elastic instance but you basically avoid the cloud hosted Kibana.

---

<div class="post-metadata">

**Author:** ![liorg2](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@liorg2](https://discuss.elastic.co/u/liorg2)\
**Post date:** [April 18, 2020, 12:31pm UTC](https://discuss.elastic.co/t/kibana-load-times/228575/6 "2020-04-18T12:31:26Z")

</div>

Thanks @Krister ,so it's not possible to use a proxy in the cloud? I thought you have configured a reverse proxy while hosting Kibana on the cloud

---

<div class="post-metadata">

**Author:** ![Krister](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@Krister](https://discuss.elastic.co/u/Krister)\
**Post date:** [April 21, 2020, 10:47am UTC](https://discuss.elastic.co/t/kibana-load-times/228575/7 "2020-04-21T10:47:07Z")

</div>

You could reverse proxy to the cloud as well. But you can't adjust server.basePath in the cloud so your reverse proxy would not be under a sub-directory and will have to be an entire virtual host (with ssl setup etc).

---

<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 19, 2020, 10:47am UTC](https://discuss.elastic.co/t/kibana-load-times/228575/8 "2020-05-19T10:47:20Z")

</div>

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