Command-Line Arguments
Storage Options
S3 bucket name for object storage backend. If not specified, uses in-memory storage (unless
--local-root is set).Local filesystem directory for storage. Conflicts with
--bucket.Base path prefix within object storage. Allows multiple instances to share a bucket.
Network Options
Port to listen on. Defaults to 443 if TLS is enabled, otherwise 80.
Disable permissive CORS headers. By default, S2 Lite allows browser-based clients from any origin.
TLS Options
Use a self-signed certificate for TLS. Useful for development and testing.
Clients will need to use
--insecure or configure SSL verification to trust self-signed certificates.Path to TLS certificate file (e.g.,
cert.pem). Must be used with --tls-key.Path to TLS private key file (e.g.,
key.pem). Must be used with --tls-cert.Initialization Options
Path to JSON file defining basins and streams to create at startup. Can also be set via See Init File Format below for details.
S2LITE_INIT_FILE environment variable.Environment Variables
S2 Lite Configuration
Path to initialization file. Alternative to
--init-file.Enable append pipelining for improved performance against high-latency object storage.When enabled, S2 Lite pipelines up to 25 MiB of appends.
AWS Configuration
AWS access key ID for S3 authentication.
AWS secret access key for S3 authentication.
AWS region for S3 bucket.
Custom S3 endpoint URL. Required for S3-compatible services like MinIO, Tigris, or Cloudflare R2.
AWS profile name from
~/.aws/credentials.SlateDB Configuration
S2 Lite uses SlateDB as its storage engine. Configure SlateDB usingSL8_ prefixed environment variables.
See the SlateDB Settings reference for all available options.
Interval at which to flush writes to object storage.Defaults:
- 50ms for S3 bucket
- 5ms for in-memory or local filesystem
Lower values reduce latency but increase object storage API calls. Higher values improve throughput but increase latency.
Interval at which to poll for manifest updates. Used for fencing out previous instances.
Number of L0 SSTables before triggering compaction.
Logging Configuration
Logging level configuration. Supports module-level filtering.Available levels:
error, warn, info, debug, traceInit File Format
The init file is a JSON document that defines basins and streams to create at startup. It uses create-or-reconfigure semantics, making it safe for repeated restarts.Schema
schema.json
Example
resources.json
Field Reference
Basin Config
Automatically create streams on append if they don’t exist, using the default stream configuration.
Automatically create streams on read if they don’t exist, using the default stream configuration.
Default configuration for auto-created streams in this basin.
Stream Config
Storage class for recent writes.Options:
standard- Standard S3 storageexpress- S3 Express One Zone (ultra-low latency)
Retention policy for the stream.Options:Duration formats:
infinite- Retain records indefinitely- Duration string - Auto-trim older records (e.g.,
7days,24hours,1week)
1day,7days,30days1hour,24hours1week,2weeks1min,30mins
Timestamping behavior for appends.
Timestamping mode.Options:
client-prefer- Use client timestamp if provided, otherwise arrival timeclient-require- Require client timestamp (reject if not provided)arrival- Always use server arrival time
Allow client-specified timestamps to exceed arrival time. If
false, client timestamps are capped at arrival time.Delete-on-empty configuration.
Minimum age before an empty stream can be deleted automatically. Set to
0 (or omit) to disable auto-deletion.Performance Tuning
Flush Interval
The most important performance knob isSL8_FLUSH_INTERVAL:
- Lower values (10-50ms): Lower latency, higher API call costs
- Higher values (100-500ms): Higher throughput, lower costs, higher latency
Pipelining
Enable pipelining for better performance with high-latency object storage:Storage Class
Use S3 Express One Zone for ultra-low latency:S3 Express requires an Express One Zone bucket (ending in
--x-s3).Example Configurations
Development (In-Memory)
Production (S3 with IAM)
Tigris with Static Credentials
Local Filesystem
Next Steps
Deployment
Deploy S2 Lite to production
Monitoring
Set up monitoring and alerts