Feast Feature Store + Redis
ready feature store for ML with Redis online store.
Overview
Feast (Feature Store) is an open-source operational data system for managing and serving machine learning features to both training and serving workloads. Originally developed at Gojek and later open-sourced, Feast addresses the critical challenge of feature engineering consistency across ML pipelines by providing a centralized registry and serving layer for features. This eliminates the common problem where features computed differently between training and inference lead to model performance degradation in production. This stack combines Feast's feature server with Redis as the online store for low-latency feature retrieval, PostgreSQL for offline feature storage and metadata management, and the Feast UI for feature discovery and monitoring. Redis serves as the high-performance online store, enabling sub-millisecond feature lookups during model inference, while PostgreSQL handles the offline store responsibilities including feature materialization jobs and historical feature queries for training datasets. The combination provides both the speed required for real-time ML serving and the reliability needed for batch feature engineering workflows. This configuration is ideal for ML teams building production-grade feature infrastructure who need to serve features with consistent low latency while maintaining a robust offline pipeline for feature development and model training. The setup particularly benefits organizations transitioning from ad-hoc feature engineering to a more systematic MLOps approach, providing the foundation for feature reusability across multiple models and teams.
Key Features
- Redis-backed online feature store with sub-millisecond feature retrieval for real-time inference
- PostgreSQL offline store for historical feature queries and point-in-time correct training data generation
- Feast feature server providing gRPC and HTTP APIs for feature retrieval with automatic serialization
- Feature registry with versioning and lineage tracking stored as protocol buffer format
- Web-based UI for feature discovery, monitoring, and validation with real-time feature statistics
- Automatic feature materialization from offline to online stores with configurable batch jobs
- Point-in-time correct joins for training data generation preventing data leakage
- Feature transformation engine supporting Python-based feature definitions and computations
Common Use Cases
- 1Real-time recommendation systems requiring low-latency user and item feature lookups
- 2Fraud detection models needing immediate access to user behavior and transaction features
- 3ML model serving pipelines requiring consistent feature computation between training and inference
- 4A/B testing frameworks where different model variants need access to the same feature definitions
- 5Multi-team ML organizations sharing features across recommendation, search, and personalization models
- 6Financial services applications serving credit scoring features with strict latency requirements
- 7E-commerce platforms providing personalized pricing and inventory features to multiple services
Prerequisites
- Minimum 2GB RAM (1GB for PostgreSQL, 512MB for Redis, remainder for Feast services)
- Available ports 5432, 6379, 6566, and 8888 for database, cache, feature server, and UI respectively
- Environment variables POSTGRES_USER and POSTGRES_PASSWORD configured in .env file
- Understanding of feature engineering concepts and ML model serving architecture
- Python knowledge for defining feature transformations and data sources
- Basic familiarity with protocol buffers for feature registry configuration
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 feast: 3 image: feastdev/feature-server:latest4 environment: 5 - FEAST_OFFLINE_STORE_TYPE=file6 - FEAST_ONLINE_STORE_TYPE=redis7 - FEAST_REDIS_HOST=redis8 - FEAST_REDIS_PORT=63799 - FEAST_REGISTRY_PATH=/feast/registry.pb10 volumes: 11 - feast-data:/feast12 ports: 13 - "6566:6566"14 depends_on: 15 - redis16 networks: 17 - feast-network18 restart: unless-stopped1920 redis: 21 image: redis:alpine22 command: redis-server --appendonly yes23 volumes: 24 - redis-data:/data25 ports: 26 - "6379:6379"27 networks: 28 - feast-network29 restart: unless-stopped3031 postgres: 32 image: postgres:1533 environment: 34 - POSTGRES_USER=${POSTGRES_USER}35 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}36 - POSTGRES_DB=feast37 volumes: 38 - postgres-data:/var/lib/postgresql/data39 ports: 40 - "5432:5432"41 networks: 42 - feast-network43 restart: unless-stopped4445 feast-ui: 46 image: feastdev/feast-ui:latest47 environment: 48 - FEAST_FEATURE_SERVER_URL=http://feast:656649 ports: 50 - "8888:8888"51 depends_on: 52 - feast53 networks: 54 - feast-network55 restart: unless-stopped5657volumes: 58 feast-data: 59 redis-data: 60 postgres-data: 6162networks: 63 feast-network: 64 driver: bridge.env Template
.env
1# Feast Feature Store2POSTGRES_USER=feast3POSTGRES_PASSWORD=secure_postgres_password45# Redis as online store6# PostgreSQL as offline storeUsage Notes
- 1Feature server at http://localhost:6566
- 2Feast UI at http://localhost:8888
- 3Redis for online serving
- 4PostgreSQL for offline storage
- 5Initialize with feast init
Individual Services(4 services)
Copy individual services to mix and match with your existing compose files.
feast
feast:
image: feastdev/feature-server:latest
environment:
- FEAST_OFFLINE_STORE_TYPE=file
- FEAST_ONLINE_STORE_TYPE=redis
- FEAST_REDIS_HOST=redis
- FEAST_REDIS_PORT=6379
- FEAST_REGISTRY_PATH=/feast/registry.pb
volumes:
- feast-data:/feast
ports:
- "6566:6566"
depends_on:
- redis
networks:
- feast-network
restart: unless-stopped
redis
redis:
image: redis:alpine
command: redis-server --appendonly yes
volumes:
- redis-data:/data
ports:
- "6379:6379"
networks:
- feast-network
restart: unless-stopped
postgres
postgres:
image: postgres:15
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=feast
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- feast-network
restart: unless-stopped
feast-ui
feast-ui:
image: feastdev/feast-ui:latest
environment:
- FEAST_FEATURE_SERVER_URL=http://feast:6566
ports:
- "8888:8888"
depends_on:
- feast
networks:
- feast-network
restart: unless-stopped
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 feast:5 image: feastdev/feature-server:latest6 environment:7 - FEAST_OFFLINE_STORE_TYPE=file8 - FEAST_ONLINE_STORE_TYPE=redis9 - FEAST_REDIS_HOST=redis10 - FEAST_REDIS_PORT=637911 - FEAST_REGISTRY_PATH=/feast/registry.pb12 volumes:13 - feast-data:/feast14 ports:15 - "6566:6566"16 depends_on:17 - redis18 networks:19 - feast-network20 restart: unless-stopped2122 redis:23 image: redis:alpine24 command: redis-server --appendonly yes25 volumes:26 - redis-data:/data27 ports:28 - "6379:6379"29 networks:30 - feast-network31 restart: unless-stopped3233 postgres:34 image: postgres:1535 environment:36 - POSTGRES_USER=${POSTGRES_USER}37 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}38 - POSTGRES_DB=feast39 volumes:40 - postgres-data:/var/lib/postgresql/data41 ports:42 - "5432:5432"43 networks:44 - feast-network45 restart: unless-stopped4647 feast-ui:48 image: feastdev/feast-ui:latest49 environment:50 - FEAST_FEATURE_SERVER_URL=http://feast:656651 ports:52 - "8888:8888"53 depends_on:54 - feast55 networks:56 - feast-network57 restart: unless-stopped5859volumes:60 feast-data:61 redis-data:62 postgres-data:6364networks:65 feast-network:66 driver: bridge67EOF6869# 2. Create the .env file70cat > .env << 'EOF'71# Feast Feature Store72POSTGRES_USER=feast73POSTGRES_PASSWORD=secure_postgres_password7475# Redis as online store76# PostgreSQL as offline store77EOF7879# 3. Start the services80docker compose up -d8182# 4. View logs83docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/feast-feature-store/run | bashTroubleshooting
- Feature server fails to start with registry errors: Ensure feast-data volume has proper write permissions and initialize with 'docker-compose exec feast feast init'
- Redis connection refused during feature retrieval: Verify Redis container is healthy and FEAST_REDIS_HOST environment variable matches the service name
- PostgreSQL connection timeout in offline queries: Check POSTGRES_USER and POSTGRES_PASSWORD environment variables are set correctly in the feast service
- Feast UI shows 'Feature server unreachable': Confirm FEAST_FEATURE_SERVER_URL points to http://feast:6566 and containers are on the same network
- Features not materializing to online store: Check Redis memory limits and ensure appendonly persistence is working with sufficient disk space
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
feastredispostgresqlfeast-ui
Tags
#feast#feature-store#ml-ops#redis#features
Category
AI & Machine LearningAd Space
Shortcuts: C CopyF FavoriteD Download