|
For the latest stable version, please use Korvet 0.12.5! |
Configuration Reference
Complete configuration reference for Korvet.
Configuration Properties
Server Configuration
| Property | Default | Description |
|---|---|---|
|
|
Host address to bind the server |
|
|
Port to listen on |
|
|
Broker ID for this server |
|
|
Redis keyspace prefix for all keys |
|
host |
Advertised host for clients (if not set, uses |
|
port |
Advertised port for clients (if not set, uses |
|
|
Netty boss thread pool size |
|
|
Netty worker thread pool size (0 = 2 × CPU cores) |
|
|
Maximum request size |
|
|
Maximum bytes per partition in fetch requests |
|
|
Maximum time to wait for fetch requests |
|
|
Automatically create topics when they don’t exist |
|
|
Default partitions for auto-created topics |
|
|
Bits for sequence number in offset encoding (1-16) |
|
|
Default time-based retention for topics |
|
|
Default size-based retention (-1 = unlimited) |
|
|
Default compression type (none, gzip, snappy, lz4, zstd) |
|
|
Delay before completing consumer group rebalance |
TLS Configuration
| Property | Default | Description |
|---|---|---|
|
|
Enable TLS for the Kafka protocol endpoint |
|
none |
Server certificate file (PEM format) |
|
none |
Server private key file (PEM format) |
|
none |
Password for the private key file |
|
none |
Trusted CA certificates file (PEM format) |
|
|
Require client certificate authentication |
Redis Configuration
| Property | Default | Description |
|---|---|---|
|
none |
Redis connection URI (e.g., |
|
|
Redis host (used if URI not set) |
|
|
Redis port (used if URI not set) |
|
none |
Redis username |
|
none |
Redis password |
|
|
Enable Redis Cluster mode |
|
none |
Connection timeout |
|
|
Connection pool size |
|
CPU cores |
Lettuce I/O thread pool size |
Redis Metrics Configuration
| Property | Default | Description |
|---|---|---|
|
|
Enable Lettuce command latency metrics |
|
|
Enable histogram buckets for percentiles |
|
|
Track metrics per connection vs per host |
|
|
Maximum expected latency for histograms |
|
|
Minimum expected latency for histograms |
Warm Redis Configuration (Optional)
The warm tier uses a separate Redis instance (typically Redis Flex with disk-backed storage) for intermediate storage between hot (RAM) and cold (Delta Lake) tiers.
| Property | Default | Description |
|---|---|---|
|
none |
Warm Redis connection URI (e.g., |
|
none |
Warm Redis host (used if URI not set) |
|
|
Warm Redis port (used if URI not set) |
|
none |
Warm Redis username |
|
none |
Warm Redis password |
|
|
Enable Redis Cluster mode for warm tier |
|
none |
Connection timeout |
|
same as main |
Connection pool size (defaults to main Redis pool size) |
|
CPU cores |
Lettuce I/O thread pool size |
Warm tier is only enabled when korvet.warm-redis.uri or korvet.warm-redis.host is configured.
|
Storage Configuration
Warm Tier Archiver
| Property | Default | Description |
|---|---|---|
|
same as main |
Keyspace prefix for warm tier streams |
|
|
Consumer group name for warm archiver |
|
|
Messages per batch when archiving to warm tier |
|
|
Block duration for XREADGROUP in milliseconds |
|
|
Number of worker threads for reading from hot tier |
|
|
Interval to refresh stream list in milliseconds |
Cold Tier (Delta Lake)
Cold storage is enabled automatically when korvet.server.storage.path is configured.
| Property | Default | Description |
|---|---|---|
|
none |
Delta Lake storage path (e.g., |
|
none |
AWS region (required for S3) |
|
none |
Custom S3 endpoint (for MinIO or LocalStack) |
|
|
Credential type: |
|
|
Consumer group name for cold archiver |
|
|
Messages per batch when archiving to cold tier |
|
|
Number of worker threads for reading |
|
|
Number of worker threads for writing to S3 |
See Cold Storage Configuration for complete configuration details and S3 performance tuning.
Default Configuration
The following shows the default application.yml configuration file:
# Korvet Server Configuration
#
# All properties have sensible defaults defined in code.
# Override using environment variables (e.g., KORVET_REDIS_URI) or this file.
# See docs/modules/ROOT/pages/reference/configuration.adoc for full reference.
spring:
application:
name: korvet
# Korvet Configuration
# Uncomment and modify properties to override defaults.
# korvet:
# # Main Redis (hot tier) configuration
# # Defaults: host=localhost, port=6379, pool-size=8
# redis:
# uri: redis://localhost:6379
# # Alternative: specify host/port instead of URI
# # host: localhost
# # port: 6379
# # cluster: false # Enable for Redis Cluster (OSS Cluster API)
# # username: default
# # password: secret
# # pool-size: 8
# # io-thread-pool-size: 4
#
# # Warm Redis (optional) - Redis Flex or secondary Redis cluster
# # warm-redis:
# # uri: redis://flex-cluster:6379
# # cluster: false
# # pool-size: 8
#
# server:
# # Network configuration (defaults: host=0.0.0.0, port=9092)
# # host: 0.0.0.0
# # port: 9092
# # broker-id: 0
# # keyspace: korvet
# # advertised-host: localhost
# # advertised-port: 9092
#
# # Thread pool configuration
# # boss-threads: 1
# # worker-threads: 0 # 0 = use Netty default (2 * CPU cores)
#
# # Request size limits
# # max-request-size: 100MB
#
# # Topic configuration
# # auto-create-topics: true
# # default-partitions: 1
#
# # TLS/SSL configuration
# # tls: true
# # cert-file: /path/to/server.crt
# # key-file: /path/to/server.key
#
# # Tiered Storage Configuration (optional)
# # storage:
# # near:
# # keyspace: korvet-warm
# # remote:
# # path: s3a://my-bucket/korvet/delta
# # s3:
# # region: us-east-1
# Spring Boot Actuator Configuration
management:
endpoints:
web:
exposure:
include: health,info,prometheus,metrics
endpoint:
health:
show-details: always
prometheus:
metrics:
export:
enabled: true
# Logging Configuration
logging:
level:
root: INFO
com.redis.korvet: DEBUG
# Suppress Netty internal messages (native transport detection, buffer allocation, etc.)
io.netty.util.internal: WARN
io.netty.buffer: WARN
Environment Variables
All configuration can be set via environment variables using Spring Boot’s relaxed binding:
# Server Configuration
export KORVET_SERVER_HOST=0.0.0.0
export KORVET_SERVER_PORT=9092
export KORVET_SERVER_BROKER_ID=0
export KORVET_SERVER_KEYSPACE=korvet
export KORVET_SERVER_ADVERTISED_HOST=localhost
export KORVET_SERVER_ADVERTISED_PORT=9092
# Thread pool configuration
export KORVET_SERVER_BOSS_THREADS=1
export KORVET_SERVER_WORKER_THREADS=0 # 0 = use Netty default (2 * CPU cores)
# Request size limits
export KORVET_SERVER_MAX_REQUEST_SIZE=100MB
export KORVET_SERVER_PARTITION_MAX_SIZE=1MB
# Fetch Configuration
export KORVET_SERVER_FETCH_MAX_WAIT=500ms # Maximum time to wait for fetch requests when no data is available
# Offset Encoding
# Number of bits for sequence number in offset encoding (1-16)
# Default: 10 (supports up to ~1 million messages/second per partition)
# See xref:quick-start/configuration.adoc#_offset_encoding_configuration[Offset Encoding Configuration] for details
export KORVET_SERVER_DEFAULT_OFFSET_SEQUENCE_BITS=10
# Topic Configuration
export KORVET_SERVER_AUTO_CREATE_TOPICS=true
export KORVET_SERVER_DEFAULT_PARTITIONS=1
export KORVET_SERVER_DEFAULT_RETENTION_TIME=7d
export KORVET_SERVER_DEFAULT_RETENTION_SIZE=-1 # -1 = unlimited
export KORVET_SERVER_DEFAULT_COMPRESSION=none # none, gzip, snappy, lz4, zstd
# Consumer Group Configuration
export KORVET_SERVER_REBALANCE_DELAY=3s # Delay before completing rebalance (default: 3s)
# TLS Configuration (optional)
export KORVET_SERVER_TLS=true
export KORVET_SERVER_CERT_FILE=/path/to/server.crt
export KORVET_SERVER_KEY_FILE=/path/to/server.key
export KORVET_SERVER_KEY_PASSWORD=secret
export KORVET_SERVER_TRUST_CERT_FILE=/path/to/ca.crt
export KORVET_SERVER_CLIENT_AUTH_REQUIRED=false
# Redis Connection
export KORVET_REDIS_URI=redis://localhost:6379
export KORVET_REDIS_HOST=localhost
export KORVET_REDIS_PORT=6379
export KORVET_REDIS_USERNAME=default
export KORVET_REDIS_PASSWORD=secret
export KORVET_REDIS_CLUSTER=false
export KORVET_REDIS_TIMEOUT=5s # Connection timeout (optional)
export KORVET_REDIS_POOL_SIZE=8 # Connection pool size (default: 8)
export KORVET_REDIS_IO_THREAD_POOL_SIZE=4 # Lettuce I/O thread pool size (default: number of CPUs)
# Redis Metrics (optional)
# Enables Lettuce command latency metrics published to Micrometer
export KORVET_REDIS_METRICS_ENABLED=false # Default: false
export KORVET_REDIS_METRICS_HISTOGRAM=false # Default: false
export KORVET_REDIS_METRICS_LOCAL_DISTINCTION=false # Default: false
export KORVET_REDIS_METRICS_MAX_LATENCY=5m # Default: 5m
export KORVET_REDIS_METRICS_MIN_LATENCY=1ms # Default: 1ms
# Warm Redis Connection (optional - enables warm tier)
# Connects to a secondary Redis instance (typically Redis Flex with disk-backed storage)
export KORVET_WARM_REDIS_URI=redis://flex-cluster:6379
export KORVET_WARM_REDIS_HOST=flex-cluster # Alternative to URI
export KORVET_WARM_REDIS_PORT=6379
export KORVET_WARM_REDIS_USERNAME=default
export KORVET_WARM_REDIS_PASSWORD=secret
export KORVET_WARM_REDIS_CLUSTER=false
export KORVET_WARM_REDIS_TIMEOUT=5s
export KORVET_WARM_REDIS_POOL_SIZE=8
# Warm Archiver Configuration (optional, used when warm-redis is configured)
export KORVET_SERVER_STORAGE_NEAR_KEYSPACE=korvet # Keyspace for warm tier (default: same as main)
export KORVET_SERVER_STORAGE_NEAR_ARCHIVER_CONSUMER_GROUP=korvet-warm-archiver
export KORVET_SERVER_STORAGE_NEAR_ARCHIVER_BATCH_SIZE=10000
export KORVET_SERVER_STORAGE_NEAR_ARCHIVER_BLOCK_DURATION_MS=100
export KORVET_SERVER_STORAGE_NEAR_ARCHIVER_READ_WORKERS=1
export KORVET_SERVER_STORAGE_NEAR_ARCHIVER_STREAM_REFRESH_INTERVAL_MS=30000
# Cold Storage (optional) - enabled when path is set
export KORVET_SERVER_STORAGE_PATH=s3a://my-bucket/korvet/delta
export KORVET_SERVER_STORAGE_S3_REGION=us-east-1
export KORVET_SERVER_STORAGE_S3_ENDPOINT=http://localhost:4566 # Optional: for LocalStack/MinIO
export KORVET_SERVER_STORAGE_S3_CREDENTIALS_TYPE=iam # or 'static'
export KORVET_SERVER_STORAGE_S3_CREDENTIALS_ROLE_ARN=arn:aws:iam::123456789012:role/KorvetReaderRole
# For static credentials:
export KORVET_SERVER_STORAGE_S3_CREDENTIALS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export KORVET_SERVER_STORAGE_S3_CREDENTIALS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
# S3 Performance Tuning (optional)
export KORVET_SERVER_STORAGE_S3_PERFORMANCE_MAX_CONNECTIONS=96 # Default: 96
export KORVET_SERVER_STORAGE_S3_PERFORMANCE_MAX_THREADS=64 # Default: 64
export KORVET_SERVER_STORAGE_S3_PERFORMANCE_READAHEAD_RANGE=256K # Default: 256K
export KORVET_SERVER_STORAGE_S3_PERFORMANCE_INPUT_POLICY=normal # normal, sequential, random
export KORVET_SERVER_STORAGE_S3_PERFORMANCE_FAST_UPLOAD=true # Default: true
export KORVET_SERVER_STORAGE_S3_PERFORMANCE_FAST_UPLOAD_BUFFER=disk # disk, bytebuffer, array
export KORVET_SERVER_STORAGE_S3_PERFORMANCE_FAST_UPLOAD_ACTIVE_BLOCKS=8 # Default: 8
export KORVET_SERVER_STORAGE_S3_PERFORMANCE_BLOCK_SIZE=64M # Default: 64M
export KORVET_SERVER_STORAGE_S3_PERFORMANCE_MULTIPART_SIZE=64M # Default: 64M
export KORVET_SERVER_STORAGE_S3_PERFORMANCE_CONNECTION_TIMEOUT=15000 # ms, Default: 15000
export KORVET_SERVER_STORAGE_S3_PERFORMANCE_SOCKET_TIMEOUT=60000 # ms, Default: 60000
# Cold Tier Archiver Configuration (optional, used when storage path is set)
export KORVET_SERVER_STORAGE_ARCHIVER_CONSUMER_GROUP=korvet-archiver # Default: korvet-archiver
export KORVET_SERVER_STORAGE_ARCHIVER_BATCH_SIZE=10000 # Default: 10000
export KORVET_SERVER_STORAGE_ARCHIVER_BLOCK_DURATION_MS=100 # Default: 100
export KORVET_SERVER_STORAGE_ARCHIVER_READ_WORKERS=1 # Default: 1
export KORVET_SERVER_STORAGE_ARCHIVER_COMMIT_WORKERS=4 # Default: 4
export KORVET_SERVER_STORAGE_ARCHIVER_MAX_BATCHES_PER_COMMIT=10 # Default: 10
export KORVET_SERVER_STORAGE_ARCHIVER_FILES_PER_COMMIT=10 # Default: 10
export KORVET_SERVER_STORAGE_ARCHIVER_STREAM_REFRESH_INTERVAL_MS=30000 # Default: 30000
# Logging
export LOGGING_LEVEL_COM_REDIS_KORVET=DEBUG