Scaling
Scale your applications to handle any load.
Auto-Scaling
Irresistible automatically scales your deployments based on traffic:
- CPU usage monitoring
- Memory usage tracking
- Request rate analysis
- Automatic instance adjustment
Scaling Strategies
Horizontal Scaling
Add more instances to handle load:
- Automatic load balancing
- Zero-downtime scaling
- Geographic distribution
- Session affinity support
Vertical Scaling
Upgrade instance resources:
- More CPU cores
- Additional memory
- Faster disk I/O
- GPU acceleration (Enterprise)
Performance Tiers
Hobby
- 1 shared CPU
- 512MB RAM
- Good for: Personal projects, demos
Pro
- 2 dedicated CPUs
- 4GB RAM
- Good for: Production apps, small teams
Business
- 4 dedicated CPUs
- 8GB RAM
- Good for: High-traffic apps, larger teams
Enterprise
- Custom resources
- Dedicated infrastructure
- Good for: Mission-critical applications
Configuration
Manual Scaling
// irresistible.config.js
export default {
scaling: {
minInstances: 2,
maxInstances: 10,
targetCPU: 70,
targetMemory: 80
}
}
Regional Distribution
export default {
regions: ['us-east', 'eu-west', 'asia-pacific'],
routing: 'geo-proximity'
}
Monitoring
Metrics Dashboard
Monitor your application performance:
- Request rate
- Response time
- Error rate
- Resource usage
Alerts
Set up alerts for:
- High CPU usage
- Memory pressure
- Response time degradation
- Error rate spikes
Optimization Tips
Application Level
- Optimize code for performance
- Cache aggressively to reduce load
- Use CDN for static assets
- Implement pagination for large datasets
Database Level
- Add indexes for frequently queried fields
- Use connection pooling
- Implement read replicas
- Cache query results
Infrastructure Level
- Enable compression for responses
- Use HTTP/2 for multiplexing
- Implement rate limiting
- Set up health checks
Load Testing
Test your application’s limits:
# Simple load test
irresistible load-test
--url https://myapp.irresistible.dev
--users 1000
--duration 60s
Cost Optimization
Tips to Reduce Costs
- Right-size instances based on actual usage
- Use auto-scaling to handle peak loads
- Implement caching to reduce compute
- Schedule scaling for predictable traffic