-
Notifications
You must be signed in to change notification settings - Fork 156
Kibana UI scaling guide #2967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Kibana UI scaling guide #2967
Changes from 23 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
64ee702
bt: fix typo and structure
jloleysens 829c148
link to new guide
jloleysens 04539ae
first version
jloleysens eeb9b7e
toc
jloleysens b1bc3aa
minor fixes
jloleysens 2c8f127
more advice
jloleysens 1e54496
remove link to reporting
jloleysens 101196f
llm review
jloleysens be11719
incorporate rudolfs feedback
jloleysens 335483c
update advice
jloleysens 34e06a2
typos
jloleysens 036ddce
Merge branch 'main' into kibana-ui-scaling-guide
shainaraskas 6331e24
Update deploy-manage/production-guidance/kibana-traffic-scaling-consi…
jloleysens 361e2ae
Update deploy-manage/production-guidance/kibana-traffic-scaling-consi…
jloleysens f0b188c
Update deploy-manage/production-guidance/kibana-traffic-scaling-consi…
jloleysens 1221e9a
Update deploy-manage/production-guidance/kibana-traffic-scaling-consi…
jloleysens 05f6dde
Update deploy-manage/production-guidance/kibana-traffic-scaling-consi…
jloleysens 957a4f2
address feedback
jloleysens 5b9a116
fix link
jloleysens bfe6f37
fix front matter
jloleysens c8ccc90
minor fixes
jloleysens 226cea5
your version
jloleysens fbcd65e
typo
jloleysens d2825eb
next round of feedback
jloleysens 3f78123
Merge branch 'main' into kibana-ui-scaling-guide
jloleysens 8dc4807
fix link
jloleysens 4441bba
rudolfs feedback
jloleysens 398cf2b
Merge branch 'main' into kibana-ui-scaling-guide
jloleysens e43a8ad
feedback
jloleysens f064ffe
last edits
jloleysens File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
deploy-manage/production-guidance/kibana-traffic-scaling-considerations.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
--- | ||
navigation_title: Traffic scaling considerations | ||
mapped_pages: | ||
- https://www.elastic.co/guide/en/kibana/current/kibana-traffic-scaling-considerations.html | ||
applies_to: | ||
deployment: | ||
ess: all | ||
ece: all | ||
eck: all | ||
self: all | ||
products: | ||
- id: kibana | ||
--- | ||
|
||
# Scale {{kib}} for your traffic workload | ||
|
||
{{kib}}'s HTTP traffic is diverse and can be unpredictable. Traffic includes serving static assets like files, processing large search responses from {{es}} and managing CRUD operations against complex domain objects like SLOs. The scale of the load created by each of these kinds of traffic will vary depending on your usage patterns. While difficult to predict, there are two important aspects to consider when provisioning CPU and memory resources for your {{kib}} instances: | ||
|
||
* **Concurrency**: How many users you expect to be interacting with {{kib}} simultaneously is largely **CPU-bound**. Approaching this limit will increase response times. | ||
jloleysens marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
* **Request and response size**: The size of requests and responses you expect {{kib}} to service. Performance when managing large requests and responses is largely **memory-bound**. Approaching this limit increases response times and may cause {{kib}} to crash. | ||
|
||
::::{tip} | ||
On [{{serverless-full}}](../deploy/elastic-cloud/serverless.md) scaling {{kib}} is fully managed for you. | ||
:::: | ||
|
||
CPU and memory boundedness often interact in important ways. If CPU-bound activity is reaching its limit, memory pressure will likely increase as {{kib}} has less time for activities like garbage collection. If memory-bound activity is reaching its limit, there may be more CPU work to free claimed memory, increasing CPU pressure. Tracking CPU and memory metrics over time can be very useful for understanding where your {{kib}} is experiencing a bottleneck. See the sizing guidance below. | ||
jloleysens marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
::::{note} | ||
The nature of traffic is not only diverse, but also unpredictable. Traffic to {{kib}} often comes in short bursts or spikes that can overwhelm an underprovisioned {{kib}} instance. In production environments, an overwhelmed {{kib}} instance will typically return 502 or 503 error responses. | ||
jloleysens marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Load balancing helps to mitigate traffic spikes by horizontally scaling your {{kib}} deployments and improving {{kib}}'s availability. To learn more about load balancing, refer to [](./kibana-load-balance-traffic.md). | ||
jloleysens marked this conversation as resolved.
Show resolved
Hide resolved
|
||
:::: | ||
|
||
## Before you start [_before_sizing_kibana] | ||
|
||
shainaraskas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{{es}} is the search engine and backing database of {{kib}}. Any performance issues in {{es}} will manifest in {{kib}}. Additionally, while Elastic tries to mitigate this possibility, {{kib}} may be sending requests to {{es}} that degrade performance if {{es}} is underprovisioned. | ||
|
||
### Is the {{es}} cluster correctly sized? | ||
|
||
Follow [the production guidance for {{es}}](./elasticsearch-in-production-environments.md). | ||
|
||
### What requests is {{kib}} sending to {{es}}? | ||
|
||
In user interfaces like Dashboards or Discover, you can view the full query that {{kib}} is sending to {{es}}. This is a good way to get an idea of the volume of data and work a {{kib}} visualization or dashboard is creating for {{es}}. Dashboards with many visualizations will generate higher load for {{es}} and {{kib}}. | ||
|
||
## Basic scaling using number of concurrent users | ||
|
||
Follow this strategy if you know the maximum number of expected concurrent users. | ||
|
||
Start {{kib}} on **1 vCPU** and **2GB** of memory. This should comfortably serve a set of 10 concurrent users performing analytics activities like browsing dashboards. | ||
If you are experiencing performance issues, you can scale {{kib}} vertically by adding the following resources for every 10 additional concurrent users: | ||
jloleysens marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* 1 vCPU | ||
* 2GB of memory | ||
|
||
These amounts are a safe minimum to ensure that {{kib}} is not resource-starved for common analytics use cases. | ||
It is recommended to scale vertically to a maximum of **8.4 vCPU** and **8GB** of memory. | ||
You should also combine vertical scaling with horizontal scaling to handle greater concurrency or bursty traffic. Refer to [](./kibana-load-balance-traffic.md) for guidance. | ||
jloleysens marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
::::{important} | ||
This advice does not apply to scaling {{kib}} for task manager. If you intend to use {{kib}} alerting capabilities see [](./kibana-task-manager-scaling-considerations.md). | ||
jloleysens marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
:::: | ||
|
||
### Scaling examples | ||
|
||
| Concurrent users | Total vCPU | Total memory | ECH and ECE deployment examples | | ||
jloleysens marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| --- | --- | --- | --- | | ||
| 50 | 5 vCPU | 10GB | • {{kib}} instance of 8.4 vCPU and 16GB memory in 1 availability zone (creates 2 8GB nodes per availability zone)<br><br>• {{kib}} instance of 8.4 vCPU and 8GB memory each across 2 availability zones<br><br>• {{kib}} instances of 8.4 vCPU and 4GB memory each across 3 availability zones | | ||
jloleysens marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 100 | 10 vCPU | 20GB | • {{kib}} instance of 12 vCPU and 24GB memory in 1 availability zone (creates 3 8GB nodes per availability zone)<br><br>• {{kib}} instance of 8.4 vCPU and 8GB memory each across 3 availability zones<br><br>| | ||
jloleysens marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
### Adjust resource allocations for {{kib}} | ||
jloleysens marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
The way that you alter the resources allocated to your {{kib}} instance depends on your deployment type. | ||
jloleysens marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
* **[{{ech}}](/deploy-manage/deploy/elastic-cloud/ec-customize-deployment-components.md) and [{{ece}}](/deploy-manage/deploy/elastic-cloud/configure.md):** Users can adjust {{kib}}'s memory by viewing their deployment and editing the {{kib}} instance's resource configuration. In these environments, size increments are predetermined. | ||
* **{{eck}}:** Users can configure pod memory and CPU resources. [Follow the {{kib}} guide](https://www.elastic.co/guide/en/cloud-on-k8s/index.html) for the version of {{eck}} you are running. | ||
jloleysens marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
* **Self-managed:** Users must provision memory to the host that {{kib}} is running on as well as configure allocated heap. See [the guidance on configuring {{kib}} memory](./kibana-configure-memory.md). | ||
|
||
:::{note} | ||
Node.js suggests allocating 80% of available host memory to heap, assuming that {{kib}} is the only server process running on the (virtual) host. This allows for memory resources to be used for other activities, for example, allowing for HTTP sockets to be allocated. | ||
::: | ||
|
||
## Advanced scaling using stack monitoring metrics | ||
|
||
Building on the simple strategy outlined above, we can make more precise adjustments to resource allocations. **Self-managed** users manage their CPU and memory allocations independently and can employ the strategy below to further tailor resources based on performance metrics. | ||
jloleysens marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
### Gather usage information [_monitoring-kibana-metrics] | ||
|
||
In order to understand the impact of your usage patterns on a single {{kib}} instance, use the [stack monitoring](../monitor/stack-monitoring.md) feature. | ||
|
||
Using stack monitoring, you can gather the following metrics for your {{kib}} instance: | ||
|
||
* **Event loop delay (ELD) in milliseconds:** A Node.js concept that roughly translates to the number of milliseconds by which processing of events is delayed due to CPU-intensive activities. | ||
* **Heap size in bytes:** The amount of bytes currently held in memory dedicated to {{kib}}'s heap space. | ||
* **HTTP connections:** The number of sockets that the {{kib}} server has open. | ||
|
||
#### Scale CPU using ELD metrics [kibana-traffic-load-cpu-sizing] | ||
jloleysens marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
Event loop delay (ELD) is an important metric for understanding whether {{kib}} is engaged in CPU-bound activity. | ||
|
||
**As a general target, ELD should be below ~220ms 95% of the time**. Higher delays may mean {{kib}} is CPU-starved. Sporadic increases above 200ms may mean that {{kib}} is periodically processing CPU-intensive activities like large responses from {{es}}, whereas consistently high ELD may mean {{kib}} is struggling to service tasks and requests. | ||
|
||
Before increasing CPU resources, consider the impact of ELD on user experience. If users are able to use {{kib}} without the frustration that comes from a blocked CPU, provisioning additional CPU resources will not be impactful, although having spare resources in case of unexpected spikes is useful. | ||
|
||
Monitoring {{kib}}'s ELD over time is a solid strategy for knowing when additional CPU resource is needed based on your usage patterns. | ||
|
||
#### Scale memory using heap size metrics [kibana-traffic-load-memory-sizing] | ||
jloleysens marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
Heap size is an important metric to track. If {{kib}}'s heap size grows beyond the heap limit, {{kib}} will crash. By monitoring heap size, you can help ensure that {{kib}} has enough memory available. | ||
|
||
Self-managed users must provision memory to the host that {{kib}} is running on as well as configure allocated heap. See [the guidance on configuring {{kib}} memory](./kibana-configure-memory.md). | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.