|
For the latest stable version, please use Korvet 0.12.5! |
Warm Storage (Redis Flex)
The warm tier provides an intermediate storage layer between hot (RAM) and cold (Delta Lake) tiers, using disk-backed Redis for cost-effective storage of less frequently accessed data.
Overview
The warm storage tier:
-
Uses Redis Flex or a secondary Redis cluster with disk-backed storage
-
Receives messages from the hot tier via the warm archival service
-
Provides lower-latency access than cold storage while reducing RAM costs
-
Integrates seamlessly with the Korvet tiered reader for transparent data access
When to Use Warm Storage
Consider enabling warm storage when:
-
You need to retain data longer than RAM allows cost-effectively
-
Cold storage latency (S3/HDFS) is too high for your use case
-
You want a gradual data migration path: hot → warm → cold
-
You’re using Redis Flex with flash storage for cost optimization
Architecture
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Hot Tier │ │ Warm Tier │ │ Cold Tier │
│ (Redis RAM) │────▶│ (Redis Flex) │────▶│ (Delta Lake) │
│ │ │ │ │ │
│ Recent data │ │ Older data │ │ Archived data │
│ < minutes │ │ minutes-hours │ │ hours-forever │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
└───────────────────────┴───────────────────────┘
Tiered Reader (transparent access)
Configuration
Enable warm storage by configuring a separate Redis connection:
korvet:
# Main Redis (hot tier - RAM)
redis:
uri: redis://hot-redis:6379
pool-size: 8
# Warm Redis (disk-backed)
warm-redis:
uri: redis://flex-redis:6379
pool-size: 8
# cluster: true # Enable if using Redis Cluster
server:
storage:
# Warm tier archiver settings
near:
keyspace: korvet # Optional: use different keyspace
archiver:
consumer-group: korvet-warm-archiver
batch-size: 10000
block-duration-ms: 100
read-workers: 1
stream-refresh-interval-ms: 30000
Configuration Properties
| Property | Default | Description |
|---|---|---|
|
none |
Redis URI for warm tier (e.g., |
|
none |
Redis host (alternative to URI) |
|
|
Redis port |
|
|
Enable Redis Cluster mode |
|
none |
Redis username for authentication |
|
none |
Redis password for authentication |
|
same as main |
Connection pool size |
Archiver Configuration
| Property | Default | Description |
|---|---|---|
|
same as main |
Keyspace prefix for warm tier streams |
|
|
Consumer group for warm archiver |
|
|
Messages per batch |
|
|
Number of reader threads |
Per-Topic Retention Configuration
Control when data moves from hot to warm tier using topic-level configuration:
# Enable tiered storage and set hot tier retention to 1 hour
kafka-configs --bootstrap-server localhost:9092 \
--entity-type topics --entity-name my-topic --alter \
--add-config remote.storage.enable=true,local.retention.ms=3600000,near.retention.ms=86400000,retention.ms=604800000
This configures:
-
Hot tier: 1 hour (
local.retention.ms=3600000) -
Warm tier: 1 day (
near.retention.ms=86400000) -
Cold tier: ~6 days (implicit:
retention.ms - local.retention.ms - near.retention.ms) -
Total retention: 7 days (
retention.ms=604800000)
| Configuration | Default | Description |
|---|---|---|
|
|
Enable tiered storage for this topic (required for warm/cold archiving) |
|
|
Time to keep in hot tier before moving to warm. |
|
|
Time to keep in warm tier before moving to cold. |
Data only moves to warm tier when remote.storage.enable=true AND local.retention.ms is set to a value other than -2.
|
How It Works
-
Warm Archival Service reads messages from hot tier streams using XREADGROUP
-
Messages are written to warm tier using XADD with the same message ID
-
Original message IDs are preserved for consistent offset tracking
-
Tiered Reader automatically falls back to warm tier when data is not in hot tier
Integration with Cold Storage
When both warm and cold tiers are configured:
-
Cold archiver reads from warm tier (not hot tier)
-
Creates a 3-tier pipeline: hot → warm → cold
-
Reduces load on hot tier for archival operations
korvet:
warm-redis:
uri: redis://flex:6379
server:
storage:
# Cold tier
path: s3a://bucket/korvet/delta
# Warm tier archiver
near:
archiver:
consumer-group: korvet-warm-archiver