Security Checklist

Before deploying to production:
Use a strong API key (generate new one, don’t use development key)
Enable TLS/SSL (Let’s Encrypt or commercial certificate)
Restrict CORS origins to known domains only
Set up firewall rules (allow only necessary ports)
Configure automatic backups
Set up log rotation
Enable monitoring and alerting

Reverse Proxy Setup

Nginx

Cloudflare Tunnel (Alternative)

For easy deployment without opening ports:

Monitoring

Health Checks

The runtime exposes health endpoints:

Metrics

Enable Prometheus metrics:

Log Aggregation

Send logs to external services:

Backup Strategy

Automated Backups

Add to crontab:

Disaster Recovery

  1. Stop the runtime: sudo systemctl stop allternit-runtime
  2. Restore from backup: cp backup_YYYYMMDD.sqlite data.sqlite
  3. Start the runtime: sudo systemctl start allternit-runtime

Scaling

Vertical Scaling

Increase resources on single server:
  • CPU: 4+ cores for high throughput
  • RAM: 8+ GB for many concurrent agents
  • Disk: SSD for better SQLite performance

Horizontal Scaling (Future)

For high availability, deploy multiple runtime agents behind a load balancer with shared storage.

Troubleshooting Production Issues

  • Check active agent count
  • Review query patterns in logs
  • Consider upgrading server or limiting concurrent agents
  • SQLite has concurrency limits
  • Reduce parallel operations
  • Consider WAL mode for better concurrency
  • Monitor heap usage over time
  • Restart service periodically if needed
  • Report issues with heap dumps
  • Check proxy timeout settings
  • Enable WebSocket ping/pong
  • Review network stability

Support

Need help with production deployment?