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
{{ message }}
Repository navigation
Commit 89240fa
Browse filesBrowse the repository at this point in the historyBrowse files
fix: Add connection pre-warming for DynamoDB async client
Add warmup_connections parameter to DynamoDBOnlineStoreConfig and warm up
connections via describe_limits inside initialize() method to solve cold-start
latency. Also document warmup_connections in the performance tuning guide and
reference docs.
Fixes#6060
Signed-off-by: Nithin <[email protected]>
Copy file name to clipboardExpand all lines: docs/how-to-guides/online-server-performance-tuning.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -324,6 +324,7 @@ online_store:
324
324
batch_size: 100
325
325
max_read_workers: 10
326
326
consistent_reads: false
327
+
warmup_connections: true
327
328
max_pool_connections: 100
328
329
keepalive_timeout: 30.0
329
330
connect_timeout: 3
@@ -337,6 +338,7 @@ Key knobs:
337
338
- **`batch_size`**: DynamoDB's `BatchGetItem` accepts up to 100 items per request. For 500 entities, this means 5 batches. Keep at 100 unless hitting the 16 MB response limit.
338
339
- **`max_read_workers`**: Controls parallelism for batch reads. With 10 workers, those 5 batches run concurrently (~10 ms) instead of sequentially (~50 ms).
339
340
- **`consistent_reads: false`**: Eventually consistent reads are faster and cheaper. Use `true` only if you need read-after-write consistency.
341
+
- **`warmup_connections: true`**: Pre-warms the DynamoDB connection pool on server startup by making a lightweight call (`describe_limits`). This avoids a cold-start latency penalty (~20ms) on the very first feature request.
340
342
- **`max_pool_connections`**: Increase for high-throughput deployments to improve HTTP connection reuse to the DynamoDB endpoint.
Copy file name to clipboardExpand all lines: docs/reference/online-stores/dynamodb.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,7 @@ online_store:
37
37
batch_size: 100
38
38
max_read_workers: 10
39
39
consistent_reads: false
40
+
warmup_connections: true
40
41
```
41
42
{% endcode %}
42
43
@@ -49,6 +50,7 @@ online_store:
49
50
| `batch_size` | int | `100` | Number of items per BatchGetItem/BatchWriteItem request (max 100) |
50
51
| `max_read_workers` | int | `10` | Maximum parallel threads for batch read operations. Higher values improve throughput for large batch reads but increase resource usage |
51
52
| `consistent_reads` | bool | `false` | Whether to use strongly consistent reads (higher latency, guaranteed latest data) |
53
+
| `warmup_connections` | bool | `false` | Whether to pre-warm the async connection pool on startup with a lightweight call (`describe_limits`) |
52
54
| `tags` | dict | `null` | AWS resource tags added to each table |
@@ -63,6 +65,8 @@ For high-throughput workloads with large entity counts, increase `max_read_worke
63
65
64
66
**Batch Size**: Increase `batch_size` up to 100 to reduce the number of API calls. However, larger batches may hit DynamoDB's 16MB response limit for tables with large feature values.
65
67
68
+
**Connection Warmup**: The DynamoDB async client does not establish actual TCP/TLS connections to the AWS endpoint on initialization. The very first feature retrieval request is penalized with a cold-start overhead (~20ms). Setting `warmup_connections: true` establishes the TCP connection pool during server startup.
69
+
66
70
## Permissions
67
71
68
72
Feast requires the following permissions in order to execute commands for DynamoDB online store:
0 commit comments