Offline database vs online feature store

The offline order database keeps full history for training and is slow for point lookups. An online feature store keeps the latest values and gets updates from a change feed. At 10,000 lookups/s, the offline database gives p99 over 6 s and 36 percent errors. The online store gives p99 3.5 ms.

Play the level

Each worker adds one network cardDrag or use arrow keys to change the workers

2 workers · 1 TB moves in 1.1 h · 1,000 Mbps per card

A page waits for its slowest callDrag or use arrow keys to change the calls per page

Calls per page: 20 · 18% of pages wait 2.0 s

Case 1

A fraud model reads 10,000 user features/s. The order database takes 300 new orders/s. Lookups need p99 below 10 ms. A value may lag new orders by at most 60 s.

Case 1
Measure Goal Read the offline order database Online store fed by a change feed
p99 latency (Lookups) under 10 ms 6.3 s Fail 3.5 ms Pass
Error rate (Lookups) under 0.1% 35.7% Fail 0% Pass
Data age under 60 s 0 ms Pass 100 ms Pass
Monthly cost 24 USD/mo 44 USD/mo
SQLHTTP/2SQLUsersPartner appsAPI server4 vCPU · 4 GBPostgres0.5 vCPU · 2 GB
SQLHTTP/2SQLUsersPartner ap…API server4 vCPU · 4 GBPostgres
Read the offline order database: misses a goal
SQLHTTP/2RedisSQLgRPCgRPCUsersPartner appsAPI server4 vCPU · 4 GBPostgres0.5 vCPU · 2 GBRedis cache1 vCPU · 2 GBChange capt…1 vCPU · 1 GB
SQLHTTP/2RedisSQLgRPCgRPCUsersPartner ap…API server4 vCPU · 4 GBPostgresRedis cache1 vCPU · 2 GBChange cap…1 vCPU · 1 GB
Online store fed by a change feed: meets the goals