Skip to main content Skip to navigation

Documentation

Everything you need to build irresistible applications

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

  1. Optimize code for performance
  2. Cache aggressively to reduce load
  3. Use CDN for static assets
  4. Implement pagination for large datasets

Database Level

  1. Add indexes for frequently queried fields
  2. Use connection pooling
  3. Implement read replicas
  4. Cache query results

Infrastructure Level

  1. Enable compression for responses
  2. Use HTTP/2 for multiplexing
  3. Implement rate limiting
  4. 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

  1. Right-size instances based on actual usage
  2. Use auto-scaling to handle peak loads
  3. Implement caching to reduce compute
  4. Schedule scaling for predictable traffic