Production Deployment¶
Best practices and guidelines for deploying Amebo in production environments.
Production Checklist¶
Security¶
- Change default credentials
- Use strong secrets (32+ characters)
- Enable HTTPS/TLS
- Configure firewall rules
- Set up authentication
- Regular security updates
Infrastructure¶
- High availability setup
- Load balancing
- Database clustering
- Backup strategy
- Monitoring and alerting
- Log management
Performance¶
- Resource allocation
- Database optimization
- Connection pooling
- Caching strategy
- Performance testing
Architecture Patterns¶
Single Instance¶
For small to medium workloads:
High Availability¶
For production workloads:
[Load Balancer] -> [Amebo Instance 1] -> [PostgreSQL Primary]
-> [Amebo Instance 2] -> [PostgreSQL Replica]
-> [Amebo Instance 3]
Multi-Region¶
For global deployments:
Configuration¶
Environment Variables¶
# Security
AMEBO_SECRET=your-production-secret-32-chars
AMEBO_USERNAME=admin
AMEBO_PASSWORD=strong-production-password
# Database
AMEBO_DSN=postgresql://user:pass@db.internal:5432/amebo
# Performance
AMEBO_ENVELOPE=512
AMEBO_IDLES=3
AMEBO_REST_WHEN=10
Database Configuration¶
-- PostgreSQL production settings
ALTER SYSTEM SET shared_buffers = '256MB';
ALTER SYSTEM SET effective_cache_size = '1GB';
ALTER SYSTEM SET maintenance_work_mem = '64MB';
SELECT pg_reload_conf();
Monitoring¶
Key Metrics¶
- Response time (< 10ms)
- Error rate (< 1%)
- Throughput (events/second)
- Database performance
- Resource utilization
Alerting¶
Set up alerts for: - Service downtime - High error rates - Resource exhaustion - Database issues
Backup & Recovery¶
Automated Backups¶
#!/bin/bash
# Daily backup script
pg_dump -h db.internal -U amebo amebo > backup-$(date +%Y%m%d).sql
aws s3 cp backup-$(date +%Y%m%d).sql s3://amebo-backups/
Disaster Recovery¶
- RTO: 15 minutes
- RPO: 1 hour
- Cross-region replication
- Automated failover