|
2 | 2 |
|
3 | 3 | ## Description |
4 | 4 |
|
5 | | -This remote online store will let you interact with remote feature server. At this moment this only supports the read operation. You can use this online store and able retrieve online features `store.get_online_features` from remote feature server. |
| 5 | +This remote online store lets you interact with a remote feature server. You can use this online store to retrieve online features via `store.get_online_features()` from a remote feature server. |
6 | 6 |
|
7 | 7 | ## Examples |
8 | 8 |
|
|
25 | 25 |
|
26 | 26 | `cert` is an optional configuration to the public certificate path when the online server starts in TLS(SSL) mode. This may be needed if the online server is started with a self-signed certificate, typically this file ends with `*.crt`, `*.cer`, or `*.pem`. |
27 | 27 |
|
| 28 | +## Connection Pooling Configuration |
| 29 | + |
| 30 | +The remote online store uses HTTP connection pooling to improve performance by reusing TCP/TLS connections across multiple requests. This significantly reduces latency by avoiding the overhead of establishing new connections for each request. |
| 31 | + |
| 32 | +### Configuration Options |
| 33 | + |
| 34 | +| Option | Type | Default | Description | |
| 35 | +|--------|------|---------|-------------| |
| 36 | +| `connection_pool_size` | int | 50 | Maximum number of connections to keep in the pool. Increase for high-concurrency workloads. | |
| 37 | +| `connection_idle_timeout` | int | 300 | Maximum time in seconds a session can be idle before being closed. Set to `0` to disable idle timeout. | |
| 38 | +| `connection_retries` | int | 3 | Number of retries for failed requests with exponential backoff. | |
| 39 | + |
| 40 | +### Example with Connection Pooling |
| 41 | + |
| 42 | +{% code title="feature_store.yaml" %} |
| 43 | +```yaml |
| 44 | +project: my-local-project |
| 45 | +registry: /remote/data/registry.db |
| 46 | +provider: local |
| 47 | +online_store: |
| 48 | + type: remote |
| 49 | + path: http://feast-feature-server:80 |
| 50 | + |
| 51 | + # Connection pooling configuration (optional) |
| 52 | + connection_pool_size: 50 # Max connections in pool |
| 53 | + connection_idle_timeout: 300 # Idle timeout in seconds (0 to disable) |
| 54 | + connection_retries: 3 # Retry count with exponential backoff |
| 55 | + |
| 56 | +entity_key_serialization_version: 3 |
| 57 | +auth: |
| 58 | + type: no_auth |
| 59 | +``` |
| 60 | +{% endcode %} |
| 61 | + |
| 62 | +### Use Cases |
| 63 | + |
| 64 | +**High-throughput workloads:** |
| 65 | +```yaml |
| 66 | +online_store: |
| 67 | + type: remote |
| 68 | + path: http://feast-server:80 |
| 69 | + connection_pool_size: 100 # More connections for high concurrency |
| 70 | + connection_idle_timeout: 600 # 10 minutes idle timeout |
| 71 | + connection_retries: 5 # More retries for resilience |
| 72 | +``` |
| 73 | + |
| 74 | +**Long-running services:** |
| 75 | +```yaml |
| 76 | +online_store: |
| 77 | + type: remote |
| 78 | + path: http://feast-server:80 |
| 79 | + connection_idle_timeout: 0 # Never auto-close session |
| 80 | +``` |
| 81 | + |
| 82 | +**Resource-constrained environments:** |
| 83 | +```yaml |
| 84 | +online_store: |
| 85 | + type: remote |
| 86 | + path: http://feast-server:80 |
| 87 | + connection_pool_size: 10 # Fewer connections to reduce memory |
| 88 | + connection_idle_timeout: 60 # 1 minute timeout |
| 89 | +``` |
| 90 | + |
| 91 | +### Performance Benefits |
| 92 | + |
| 93 | +Connection pooling provides significant latency improvements: |
| 94 | + |
| 95 | +- **Without pooling**: Each request requires a new TCP connection (~10-50ms) and TLS handshake (~30-100ms) |
| 96 | +- **With pooling**: Subsequent requests reuse existing connections, eliminating connection overhead |
| 97 | + |
| 98 | +This is especially beneficial for: |
| 99 | +- High-frequency feature retrieval in real-time inference pipelines |
| 100 | +- Batch processing with many sequential `get_online_features()` calls |
| 101 | +- Services with authentication enabled (reduces token refresh overhead) |
| 102 | + |
28 | 103 | ## How to configure Authentication and Authorization |
29 | 104 | Please refer the [page](./../../../docs/getting-started/concepts/permission.md) for more details on how to configure authentication and authorization. |
30 | 105 |
|
0 commit comments