Skip to content

Commit 940f774

Browse files
committed
feat: added batching to feature server /push to offline store (feast-dev#5683)
1 parent 3b0456a commit 940f774

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

‎docs/reference/feature-servers/python-feature-server.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,27 @@ requests.post(
199199
"http://localhost:6566/push",
200200
data=json.dumps(push_data))
201201
```
202+
#### Offline write batching for `/push`
203+
204+
The Python feature server supports configurable batching for the **offline**
205+
portion of writes executed via the `/push` endpoint.
206+
207+
Only the offline part of a push is affected:
208+
209+
- `to: "offline"` → **fully batched**
210+
- `to: "online_and_offline"` → **online written immediately**, **offline batched**
211+
- `to: "online"` → unaffected, always immediate
212+
213+
Enable batching in your `feature_store.yaml`:
214+
215+
```yaml
216+
feature_server:
217+
type: local
218+
offline_write_batching:
219+
enabled: true
220+
batch_size: 1000
221+
batch_interval_seconds: 10
222+
```
202223
203224
### Materializing features
204225

‎docs/reference/feature-store-yaml.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,23 @@ online_store:
2525
* **project\_id** — Optional parameter for the datastore online store. Sets the GCP project id used by Feast, if not set Feast will use the default GCP project id in the local environment.
2626
* **project** — Defines a namespace for the entire feature store. Can be used to isolate multiple deployments in a single installation of Feast.
2727
28+
### feature_server
29+
30+
The `feature_server` block configures the Python Feature Server when it is used
31+
to serve online features and handle `/push` requests. This section is optional
32+
and only applies when running the Python feature server.
33+
34+
An example configuration:
35+
36+
```yaml
37+
feature_server:
38+
type: local
39+
offline_write_batching: # Enables batching of offline writes processed by /push. Online writes are unaffected.
40+
enabled: true
41+
batch_size: 100 # Maximum number of buffered rows before writing to the offline store.
42+
batch_interval_seconds: 5 # Maximum time rows may remain buffered before a forced flush.
43+
```
44+
2845
## Providers
2946

3047
The `provider` field defines the environment in which Feast will execute data flows. As a result, it also determines the default values for other fields.

0 commit comments

Comments
 (0)