Real-time context

Real-time serving turns FeatureQL into a feature platform for production APIs and real-time ML inference. Instead of building custom microservices to fetch and combine data from Redis, PostgreSQL, and REST APIs, you declare what you need and FeatureMesh handles the rest.

Data source connectors

FeatureQL connects to operational data stores through three connector types:

ConnectorFunctionBest for
RedisSOURCE_REDIS() + EXTERNAL_REDIS()Key-value lookups, cached profiles, feature flags
JDBCSOURCE_JDBC() + EXTERNAL_COLUMNS()Relational databases (PostgreSQL, MySQL, etc.)
HTTPSOURCE_HTTP() + EXTERNAL_HTTP()REST APIs, microservices, ML model endpoints

Each connector follows the same pattern: create a persistent source connection, then reference it in feature definitions. The next three pages walk through each one.

Composing multiple sources

Because features are just named expressions, you can freely mix connectors in a single query. A feature might look up a customer in PostgreSQL, fetch their latest order from Redis, and call an external scoring API over HTTP — all in one request. FeatureMesh resolves the dependency graph and queries each source using its native access pattern. The multi-source queries page shows this in action.

From prototyping to production

Free-form queries work for development and testing, but production deployments should use prepared statements. A prepared statement pre-compiles a feature and its entire dependency graph — including all data source calls — into a single optimized query. Clients call it via REST or gRPC with just the input values, eliminating parsing and resolution overhead. See prepared statements for details.

Production serving considerations

DataFusion serving supports the same FeatureQL query model as batch backends, including WHERE, ORDER BY, LIMIT, grouped and window computations, RELATED(), and EXTEND(). The distinction is operational: a production endpoint has a latency and concurrency budget that an analytical job usually does not.

Keep request work bounded. A serving call typically binds one entity key or a small known set; a broad keyset, global sort or window, large cross product, or high-cardinality aggregation may be valid FeatureQL but expensive endpoint behavior. Source fan-out and payload size matter too, especially when a graph reaches several JDBC, Redis, or HTTP systems.

Measure the complete prepared statement against production-like sources and concurrency. Precompute or cache an aggregate when measurement shows that evaluating it on demand misses the budget—not because aggregation is unavailable. See Query structure for the shared language model, Same answer across backends for what serving can and cannot match in batch, and Conformance tests to measure the gaps on your stack.