Health Checks
S2 Lite exposes a/health endpoint for readiness and liveness checks.
Health Endpoint
200 OKwith body"OK"- Server is healthy and database is accessible503 Service Unavailable- Database status check failed
Configuration
The startup probe allows up to 10 minutes for initialization, which is important when using object storage with high latency or large datasets.
Prometheus Metrics
S2 Lite exposes Prometheus metrics at/metrics in text format.
Metrics Endpoint
Available Metrics
Append Metrics
s2_append_permit_latency_seconds
- Type: Histogram
- Description: Time waiting for append permit (backpressure indicator)
- Buckets: 0.005, 0.010, 0.025, 0.050, 0.100, 0.250, 0.500, 1.000, 2.500 seconds
s2_append_ack_latency_seconds
- Type: Histogram
- Description: Time from append request to acknowledgment
- Buckets: 0.005, 0.010, 0.025, 0.050, 0.100, 0.250, 0.500, 1.000, 2.500 seconds
s2_append_batch_records
- Type: Histogram
- Description: Number of records per append batch
- Buckets: 1, 10, 50, 100, 250, 500, 1000 records
s2_append_batch_bytes
- Type: Histogram
- Description: Size in bytes of append batches
- Buckets: 512, 1024, 4096, 16384, 65536, 262144, 524288, 1048576 bytes
Process Metrics
Standard Prometheus process metrics are automatically included:process_cpu_seconds_total- CPU timeprocess_resident_memory_bytes- Resident memoryprocess_virtual_memory_bytes- Virtual memoryprocess_open_fds- Open file descriptorsprocess_max_fds- Maximum file descriptors
Scraping Configuration
Helm Chart Integration
The S2 Lite Helm chart supports automatic ServiceMonitor creation:values.yaml
values.yaml
Logging
S2 Lite uses structured logging with configurable levels.Log Levels
Configure via theRUST_LOG environment variable:
Log Format
Logs are output in a structured format:Docker Logging
View logs:Kubernetes Logging
View logs:Systemd Logging
View logs:Grafana Dashboards
Example Dashboard
Here’s a basic Grafana dashboard configuration for S2 Lite:s2-lite-dashboard.json
Key Queries
Append latency percentiles:Alerting
Prometheus Alert Rules
alerts.yml
Health Check Monitoring
Monitor the health endpoint with your monitoring system:docker-compose.yml
Performance Monitoring
Key Performance Indicators
- Append Latency: Time to acknowledge writes
- Permit Latency: Backpressure / queueing time
- Throughput: Records and bytes per second
- Memory Usage: Track for memory leaks
- CPU Usage: Detect resource constraints
Benchmarking
Use the built-in benchmark tool:Tracing
S2 Lite includes HTTP request tracing viatower-http:
- Request/response logging at INFO level
- Detailed request info at DEBUG level
- Trace IDs in structured logs
Distributed tracing (OpenTelemetry) is not currently supported but is planned for a future release.
Next Steps
Configuration
Configure S2 Lite settings
Deployment
Deploy to production