Commit 5a1cf88
committed
docs: consolidated timeout configuration documentation
## Summary
This PR consolidates **2 documentation PRs** for timeout configuration.
### Included PRs:
- #49: Add comprehensive timeout configuration documentation
- #86: Add comprehensive timeout hierarchy documentation to HTTP client
### Key Changes:
- Added detailed header documentation explaining the timeout hierarchy
- Documented each timeout constant with its purpose and use case
- Established naming conventions for constants vs config fields
- Added timeout hierarchy table for quick reference
### Timeout Hierarchy
| Use Case | Module | Constant | Value | Rationale |
|-----------------------------|-----------------------------|-----------------------------|-------|-----------|
| Health checks | cortex-common/http_client | HEALTH_CHECK_TIMEOUT | 5s | Quick validation |
| Standard HTTP requests | cortex-common/http_client | DEFAULT_TIMEOUT | 30s | Normal API calls |
| Connection pool idle | cortex-common/http_client | POOL_IDLE_TIMEOUT | 60s | DNS refresh |
| LLM Request (non-streaming) | cortex-exec/runner | DEFAULT_REQUEST_TIMEOUT_SECS| 120s | Model inference |
| LLM Streaming total | cortex-common/http_client | STREAMING_TIMEOUT | 300s | Long-running streams |
| Server request lifecycle | cortex-app-server/config | request_timeout | 300s | Full request handling |
| Per-chunk reads | cortex-app-server/config | read_timeout | 30s | Chunk timeout |
| Graceful shutdown | cortex-app-server/config | shutdown_timeout | 30s | Time for cleanup |
| Entire execution | cortex-exec/runner | DEFAULT_TIMEOUT_SECS | 600s | Headless exec limit |
### Files Modified:
- src/cortex-common/src/http_client.rs
- src/cortex-app-server/src/config.rs
- src/cortex-exec/src/runner.rs
Closes #49, #861 parent c398212 commit 5a1cf88
File tree
3 files changed
+97
-5
lines changed- src
- cortex-app-server/src
- cortex-common/src
- cortex-exec/src
3 files changed
+97
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
58 | 64 | | |
59 | 65 | | |
60 | 66 | | |
| |||
71 | 77 | | |
72 | 78 | | |
73 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
74 | 83 | | |
75 | 84 | | |
76 | 85 | | |
77 | 86 | | |
78 | 87 | | |
79 | 88 | | |
| 89 | + | |
80 | 90 | | |
81 | 91 | | |
82 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
12 | 60 | | |
13 | 61 | | |
14 | 62 | | |
15 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
16 | 86 | | |
17 | 87 | | |
18 | 88 | | |
19 | | - | |
| 89 | + | |
| 90 | + | |
20 | 91 | | |
21 | 92 | | |
22 | | - | |
| 93 | + | |
| 94 | + | |
23 | 95 | | |
24 | 96 | | |
25 | | - | |
| 97 | + | |
| 98 | + | |
26 | 99 | | |
27 | 100 | | |
28 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
29 | 104 | | |
30 | | - | |
31 | 105 | | |
32 | 106 | | |
33 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
33 | 41 | | |
34 | 42 | | |
35 | 43 | | |
| |||
0 commit comments