Skip to content

Commit fb92e08

Browse files
update the streaming search doc (#114)
* update the streaming search doc * fixed image issue in the streaming search doc * image issue fixed in the streaming search doc * Update streaming-search.md * update streaming search doc
1 parent cc62e09 commit fb92e08

7 files changed

+66
-20
lines changed
Loading
769 Bytes
Loading
670 KB
Loading
655 KB
Loading
1.02 MB
Loading
1.11 MB
Loading

docs/user-guide/management/streaming-search.md

Lines changed: 66 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,56 +2,102 @@
22
title: OpenObserve Streaming Search
33
description: Learn how OpenObserve's Streaming Search delivers incremental query results using HTTP/2 partitioning for faster log analysis and real-time data processing.
44
---
5-
This user guide provides details on how to configure, and use OpenObserve's **Streaming Search** feature to improve query performance and responsiveness.
5+
This user guide provides details on how to configure, and use the **Streaming Search** feature to improve query performance and responsiveness.
66

77
## What is Streaming Search?
88

9-
Streaming Search is a feature that delivers query results incrementally to the user interface using an **HTTP/2** streaming connection. Instead of waiting for the entire query to complete, OpenObserve breaks large queries into smaller partitions and streams the results as they are processed. This allows matching log entries to appear more quickly, even while the query continues to run in the background.
9+
Streaming Search allows OpenObserve to return query results through a single, persistent HTTP/2 connection. Instead of issuing one HTTP request per partition, the system streams the entire result set over one connection. This reduces overhead, improves dashboard performance, and provides faster response times during long-range queries.
1010

1111
!!! note "Where to Find"
1212
The **Streaming Search** toggle is located under **Management > General Settings**.
1313

1414
!!! note "Who Can Access"
1515
The `Root` user and any other user with permission to **update** the **Settings** module can modify the **Streaming Search** setting. Access is controlled through role-based access control (RBAC).
16+
<br>
1617
![User Access](../../images/streaming-search-access.png)
1718

19+
## Concepts
20+
### Partition
21+
22+
OpenObserve splits the total time range into partitions, each covering a segment of time or data volume. For example, an 8-hour query with 8 GB of data may be split into 8 partitions, each processing 1 GB. These partitions are executed sequentially and contribute partial results to the final output.
23+
24+
25+
### Mini-Partition
26+
Based on the environment variable `ZO_MINI_SEARCH_PARTITION_DURATION_SECS`, the first partition is divided into a mini-partition to return results faster. This is helpful when working with large time ranges.
27+
28+
The environment variable is enabled by default and it defines the duration of the mini-partition in seconds. By default, this is set to 60 seconds.
29+
30+
??? note "See how a mini-partition works:"
31+
Suppose you run a query over the past 12 hours.
32+
33+
- The first partition might normally span 1 hour of data.
34+
- The mini-partition splits this into a smaller slice, such as 1 minute by default, or according to the configured duration.
35+
- This 1-minute slice is processed first and returned quickly, allowing partial results to appear faster, while the rest of the query continues in the background.
36+
37+
> **Note:** Only the first partition is affected. All subsequent partitions are processed at their normal size.
38+
39+
### HTTP/2 Streaming
40+
41+
When **Streaming Search** is enabled, OpenObserve uses a single HTTP/2 connection to send the entire result set.
42+
43+
This enables:
44+
45+
- A larger in-memory cache that persists for the entire query
46+
- Fewer HTTP round trips
47+
- Faster response and improved dashboard rendering
48+
49+
> **Note:** When **Streaming Search is enabled**, the mini-partition output is included in the same `_search_stream` response. All data is delivered over a single HTTP/2 connection. You do not see a separate request for the mini-partition.
1850
1951
## Enable or Disable Streaming Search
2052

2153
1. Go to **Management**.
22-
2. Select **General Settings**.
54+
2. Select **General Settings**. <br>
2355
![Enable or Disable Streaming Search](../../images/enable-disable-streaming-search.png)
2456
3. Locate the **Enable Streaming Search** option.
2557
4. Toggle this switch to **On** to enable streaming mode, or **Off** to disable it.
26-
5. Click **Save** to save the changes.
27-
28-
## How does it work?
29-
30-
### 1. Partitioning
58+
5. Click **Save** to apply the changes.
3159

32-
OpenObserve splits the total time range into partitions, each covering a segment of time or data volume, called **partitions**. For example, an 8-hour query with 8 GB of data may be split into 8 partitions, each processing 1 GB. Each partition is executed independently and contributes partial results to the overall output.
3360

34-
Streaming begins as soon as the first partition completes, improving responsiveness.
61+
## Without Streaming Search
3562

36-
### 2. Mini-Partitioning
63+
- OpenObserve splits the query time range into multiple partitions.
64+
- Each partition triggers a separate `_search` request.
65+
- The first partition includes a mini-partition by default.
66+
- The mini-partition result is returned first in a separate request, followed by results from the full partitions.
67+
- Each request has its own connection, and there is no query-wide cache across partitions.
68+
- The browser must wait for multiple independent requests to complete, which can increase load times and perceived delay.
3769

38-
Mini-partitioning further breaks the first partition into small slices based strictly on time. Controlled by: `ZO_MINI_SEARCH_PARTITION_DURATION_SECS`=60 (default is 60 seconds)
70+
**Performance Test: 2-week Dashboard Query** <br>
3971

40-
These short-duration partitions are created only at the beginning of the query time range. Enables the result to appear within milliseconds, even if the full partition takes longer. Once mini-partitions complete, the system switches back to processing full-size partitions.
72+
Panel 1 triggers 7 `_search` requests and completes loading the data in 4.452 seconds.
73+
<br>
74+
![Without Streaming Search- panel 1](../../images/without-streaming-search-panel1.png)
4175

42-
### 3. Streaming via HTTP/2
76+
Panel 2 triggers 57 `_search` requests and completes loading the data in 25.987 seconds.
77+
<br>
78+
![Without Streaming Search- panel 2](../../images/without-streaming-search-panel2.png)
4379

44-
Results from each partition are sent incrementally to the browser using a single persistent HTTP/2 connection.
80+
## With Streaming Search
4581

46-
### 4. Real-time delivery
82+
- OpenObserve still splits the query time range into partitions.
83+
- The first partition includes a mini-partition by default.
84+
- All partition results, including the mini-partition, are returned through a single `_search_stream` request.
85+
- The entire result is returned over a single HTTP/2 connection.
86+
- The system uses a query-wide cache, which improves efficiency and reduces recomputation.
87+
- There is no duplication of requests, which lowers server and browser load.
4788

48-
As each partition is processed, its results are immediately streamed to the user interface.
89+
**Performance Test: 2-week Dashboard Query**
4990

50-
This mechanism avoids delays caused by waiting for the entire result set and is especially useful for long-running or high-volume searches.
91+
Panel 1 triggers 1 `_search_stream` request and completes loading the data in 393 milliseconds.
92+
<br>
93+
![With Streaming Search](../../images/with-streaming-search-panel1.png)
5194

95+
Panel 2 triggers 1 `_search_stream` request and completes loading the data in 1.29 seconds.
96+
<br>
97+
![With Streaming Search](../../images/with-streaming-search-panel2.png)
5298

5399
## Considerations
54100

55101
- Requires HTTP/2 support in the network stack.
56-
- Fallbacks to standard query mode if disabled.
57-
- Partitioning behavior is automatic. Mini-partitioning improves the time-to-first-result without affecting the accuracy of final results.
102+
- Falls back to standard query mode if disabled.
103+
- Partitioning behavior is automatic. Mini-partitioning improves the time-to-first-result without affecting the accuracy of final results.

0 commit comments

Comments
 (0)