You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(influxdb3): address Reid's review feedback on query timeout best practices
Address reidkaufmann's review comments on query timeout documentation:
Technical accuracy fixes:
- Replace "node/nodes" terminology with "querier/queriers" throughout
- Remove AI hallucination: "query result caching" (doesn't exist in IOx)
- Replace with proper cache recommendations for Enterprise/Core users
- Remove vague "background maintenance" references
- Add specific compaction performance variation cause
- Fix "round-robin or load-balanced" → "round-robin query routing"
Content improvements:
- Enhance checkout line analogy with explanation of noisy neighbors
- Add experimental query guidance for reducing impact on other users
- Replace unactionable solutions with customer-controllable actions
- Restore missing flexibility recommendations and link to the code sample
Technical updates:
- Update code blocks to use new placeholder syntax
- Add related links between cache documentation and timeout strategies
- Fix numbering consistency in Solutions sections
Copy file name to clipboardExpand all lines: content/shared/influxdb3-query-guides/query-timeout-best-practices.md
+38-21Lines changed: 38 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,40 +30,45 @@ Optimal timeouts are:
30
30
31
31
## How query routing affects timeout strategy
32
32
33
-
InfluxDB 3 uses round-robin or load-balanced query routing across multiple replicas or nodes.
33
+
InfluxDB 3 uses round-robin query routing to balance load across multiple queriers.
34
34
This creates a "checkout line" effect that influences timeout strategy.
35
35
36
36
### The checkout line analogy
37
37
38
38
Consider a grocery store with multiple checkout lines:
39
-
- Customers (queries) are distributed across lines (replicas/nodes)
39
+
- Customers (queries) are distributed across lines (queriers)
40
40
- A slow customer (long-running query) can block others in the same line
41
-
- More checkout lines (replicas) provide more alternatives when retrying
41
+
- More checkout lines (queriers) provide more alternatives when retrying
42
+
43
+
If one querier is unhealthy or has been hijacked by a "noisy neighbor" query (excessively resource hungry), giving up sooner may save time--it's like jumping to a cashier with no customers in line. However, if all queriers are overloaded, then short retries may exacerbate the problem--you wouldn't jump to the end of another line if the cashier is already starting to scan your items.
42
44
43
45
### Noisy neighbor effects
44
46
45
47
In distributed systems:
46
-
- A single long-running query can impact other queries on the same node
47
-
- Shorter timeouts with retries can help queries find less congested nodes
48
-
- The effectiveness depends on the number of available replicas
48
+
- A single long-running query can impact other queries on the same querier
49
+
- Shorter timeouts with retries can help queries find less congested queriers
50
+
- The effectiveness depends on the number of available queriers
49
51
50
52
### When shorter timeouts help
51
53
52
-
-**Multiple replicas available**: Retries can find less congested nodes
53
-
-**Uneven load distribution**: Some nodes may be significantly less busy
54
+
-**Multiple queriers available**: Retries can find less congested queriers
55
+
-**Uneven load distribution**: Some queriers may be significantly less busy
54
56
-**Temporary congestion**: Brief spikes in query load or resource usage
55
57
56
58
### When shorter timeouts hurt
57
59
58
-
-**Few replicas**: Limited alternatives for retries
59
-
-**System-wide congestion**: All nodes are equally busy
60
+
-**Few queriers**: Limited alternatives for retries
61
+
-**System-wide congestion**: All queriers are equally busy
60
62
-**Expensive query planning**: High overhead for query preparation
61
63
62
64
## Timeout configuration best practices
63
65
64
66
### Make timeouts adjustable
65
67
66
-
Configure timeouts that can be modified without service restarts using environment variables, configuration files, runtime APIs, or per-query overrides.
68
+
Configure timeouts that can be modified without service restarts using environment variables, configuration files, runtime APIs, or per-query overrides. Design your client applications to easily adjust timeouts on the fly, allowing you to respond quickly to performance changes and test different timeout strategies without code changes.
69
+
70
+
See the [InfluxDB 3 client library examples](#influxdb-3-client-library-examples)
71
+
for how to configure timeouts in Python.
67
72
68
73
### Use tiered timeout strategies
69
74
@@ -89,6 +94,11 @@ Implement different timeout classes based on query characteristics.
89
94
| Analytical and background | 2 minutes | Reports, batch processing | Complex queries within serverless limits |
90
95
{{% /show-in %}}
91
96
97
+
{{% show-in "enterprise, core" %}}
98
+
> [!Tip]
99
+
> #### Use caching
100
+
> Where immediate feedback is crucial, consider using [Last Value Cache](/influxdb3/version/admin/manage-last-value-caches/) to speed up queries for recent values and [Distinct Value Cache](/influxdb3/version/admin/manage-distinct-value-caches/) to speed up queries for distinct values.
101
+
{{% /show-in %}}
92
102
93
103
### Implement progressive timeout and retry logic
94
104
@@ -114,15 +124,18 @@ Consider these indicators that timeouts may need adjustment:
114
124
-**Production**: Use shorter timeouts with monitoring
115
125
-**Cost-sensitive**: Use aggressive timeouts and [query optimization](/influxdb3/version/query-data/troubleshoot-and-optimize/optimize-queries/)
116
126
127
+
### Experimental and ad-hoc queries
128
+
129
+
When introducing a new query to your application or when issuing ad-hoc queries to a database with many users, your query might be the "noisy neighbor" (the shopping cart overloaded with groceries). By setting a tighter timeout on experimental queries you can reduce the impact on other users.
130
+
117
131
118
132
## InfluxDB 3 client library examples
119
133
120
134
### Python client with timeout configuration
121
135
122
136
Configure timeouts in the InfluxDB 3 Python client:
0 commit comments