Skip to content

Advanced Usage

Advanced Usage

This section covers advanced topics for customizing Laravel Queue Autoscale to fit your specific needs.

Extensibility

Implement custom business logic and scaling strategies:

Production

Deploy and secure your autoscaler for production environments:

Contributing

Help make Laravel Queue Autoscale better:

When to Use Custom Strategies

Custom strategies are useful when:

  • You have unique business requirements not covered by the default hybrid algorithm
  • You need to integrate with external systems for scaling decisions
  • You want to implement domain-specific logic (e.g., cost optimization, customer tiers)
  • You need to comply with specific SLA structures or regulatory requirements

When to Use Policies

Policies are ideal for:

  • Logging and metrics collection
  • Notifications (Slack, email, PagerDuty)
  • Cost tracking and budget enforcement
  • Integration with monitoring systems
  • Custom validation logic
  • Multi-stage approval workflows

Prerequisites

Before exploring advanced topics:

  1. Understand the How It Works guide
  2. Be familiar with Configuration options
  3. Have the autoscaler running successfully in your environment

Example Use Cases

  • Cost Optimization: Custom strategy that scales based on AWS Spot instance availability
  • Multi-Tenant SLAs: Different strategies per customer tier (premium, standard, free)
  • Business Hours: Policy that enforces different min/max workers during peak vs off-peak
  • Budget Enforcement: Policy that prevents scaling beyond allocated cloud budget
  • Compliance: Strategy that respects data residency and processing requirements