What is an online feature store?

An online feature store holds the current value of each feature, keyed by customer, session or account, so a model in production can read it inside the time a live request can wait. It is usually a key-value database such as Redis, DynamoDB or Bigtable, and its values are only as fresh as the job that writes them.

By Alex DeanUpdated

What does an online feature store do?

A feature store has two stores. The offline store keeps the history of every feature for building training sets. The online store keeps one thing per key: the latest value. When a checkout model scores a session, it asks the online store for that session’s features and gets one row back.

The online store is built for single-key lookups, not scans or joins. It answers them while a page or an API call waits. Feast describes its online store the same way, as the latest values for each entity key, loaded through materialization or written directly through push sources. Online vs offline features covers how the two stores relate and why they drift apart.

Which databases are used as online feature stores?

Most feature stores do not build their own database for this. They write to a key-value or operational database, either one you run or one the vendor runs for you. The table lists common backends and how each product feeds them, from each product’s own documentation.

Backend Used by Who runs it How values get in Typical fit
Redis Feast, Tecton (ElastiCache or Redis Enterprise Cloud) You; Tecton says Redis clusters are provisioned and scaled manually Feast: materialize from the offline store, or a push from your own stream job. Tecton: batch materialization and stream feature views Lower latency than DynamoDB, especially in the tail, per Tecton; data is held in memory, so Tecton notes it is not durable
Amazon ElastiCache (Redis OSS) SageMaker Feature Store InMemory tier AWS The PutRecord API, from your batch jobs or from Kafka or Kinesis consumers High-throughput serving on SageMaker; online-only, with no replication to the offline store
DynamoDB Feast, Tecton (the default) You, or Tecton manages it As for Redis above Low operational overhead; Tecton says it is usually cheaper at low query volumes and larger datasets
SageMaker Standard and Standard_V2 tiers SageMaker Feature Store AWS PutRecord in batches or from streams; Standard_V2 also updates single features with UpdateRecord Teams building models on SageMaker
Cassandra or ScyllaDB Feast You materialize or push Teams that already operate a Cassandra-compatible cluster
Bigtable Feast You materialize or push Teams on Google Cloud
Lakebase (managed Postgres) Databricks online feature stores Databricks publish_table from a Delta feature table: triggered, snapshot, or continuous streaming sync Teams whose features already live in Unity Catalog

On Databricks, a Feature Serving endpoint reads from tables published to an online store. Check the current docs before you choose.

How do values get into an online feature store?

This is the hard part, and the part comparisons of read latency leave out. The online store holds whatever was last written to it, so the writing job decides how current a value is. There are two broad ways to run it.

Batch materialization. The feature is computed in the warehouse on a schedule, and the latest value per key is copied to the online store. Feast’s materialize command, Databricks’ publish_table in snapshot or triggered mode, and a nightly job calling SageMaker’s PutRecord all work this way. It is cheap and uses jobs most teams already run. The value is as old as the last run, plus however long the copy takes.

Streaming computation. A streaming job reads events as they arrive, updates the feature, and writes the new value online. Tecton runs this for stream feature views on its managed Rift compute, or as a Spark job in your own account. Feast and SageMaker accept streamed values, but the stream job that computes them is yours to build and run, usually in Spark or Flink. Databricks’ continuous publish mode streams changes from a Delta table, so the value is as current as the pipeline writing that table.

The tradeoff is the one feature freshness describes. Batch is enough for values that move slowly, such as lifetime spend or plan tier. Values that count what happened during a visit, such as articles read in the last 30 minutes, need streaming. A scheduled job cannot run often enough to catch them, and an on-demand feature computed from the request has no history to count. Streaming costs more to run, and it brings windows, late events and per-key state that someone has to operate. Most teams use both.

A fast online store does not make a value fresh. A lookup can return quickly and still return a value computed yesterday.

Example: a session feature read online at inference

A news site ranks the articles on its home page. One input is how many articles this visitor has read in the last 30 minutes. A visitor three articles into a story wants the follow-up, and a visitor who just arrived wants the headlines.

In Snowplow Signals, which calls each feature an attribute, the definition is a few lines of the Python SDK, keyed on the session:

from datetime import timedelta
from snowplow_signals import Attribute, Event, StreamAttributeGroup, domain_sessionid

article_view = Event(name="article_view", vendor="com.example", version="1-0-0")

articles_read_30m = Attribute(
    name="articles_read_30m",
    type="int32",
    events=[article_view],
    aggregation="counter",
    period=timedelta(minutes=30),
    default_value=0,
)

reading_session = StreamAttributeGroup(
    name="reading_session",
    version=1,
    attribute_key=domain_sessionid,
    owner="you@example.com",
    attributes=[articles_read_30m],
)

The streaming engine updates articles_read_30m for every open session as each article view arrives. When the home page renders, the ranker reads the current value for the session in front of it straight from the group:

features = sp_signals.get_group_attributes(
    name="reading_session",
    version=1,
    attributes=["articles_read_30m"],
    attribute_key="domain_sessionid",
    identifier=session_id,
)
score = model.predict(features)

Fed by a nightly materialization job, the same lookup would return zero for this visitor, because the session did not exist when the job ran. The ranker would treat a reader three articles deep as a new arrival.

Do you need a separate online feature store?

Not if a model scores in batch and writes its predictions to a table, because nothing is read on the request path. You need one when a live request depends on history. Do you need a feature store? walks through the decision, and the feature stores topic covers the rest of the cluster.

Where Signals fits

You can build this yourself. Feast with Redis or DynamoDB, plus a Spark or Flink job pushing streamed values, gives you a current online store you control. The cost arrives after launch: windowing, late events and an on-call rotation for the stream job.

Signals is a managed option that runs that path for behavioral features. It collects events from your web, mobile and server apps, validates them against a schema, computes attributes on a stream, and serves them from its own store, as SaaS or in your own cloud. The same definitions compute history for training, through a dataset builder that supports Snowflake today. If most of your features come from sources other than events, a general feature store may suit you better, and you can run Signals beside one. The current update and read figures are on real-time attributes, and Signals vs a feature store sets out the overlap.

See it on your own traffic

Add the SDK, define one attribute, and see an attribute updating against your own traffic in the first session. The free tier runs on the real engine: no card, no sales call.