Download the PHP package cboxdk/laravel-queue-autoscale without Composer

On this page you can find all versions of the php package cboxdk/laravel-queue-autoscale. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-queue-autoscale

Queue Autoscale for Laravel

Latest Version on Packagist GitHub Tests Action Status GitHub Code Quality Action Status Total Downloads

Intelligent, predictive autoscaling for Laravel queues with SLA/SLO-based optimization.

Queue Autoscale for Laravel is a smart queue worker manager that automatically scales your queue workers based on workload, predicted demand, and service level objectives. Unlike traditional reactive solutions, it uses a hybrid predictive algorithm combining queueing theory (Little's Law), trend analysis, and backlog-based scaling to maintain your SLA targets.

Features

Requirements

Installation

Install via Composer:

Run the interactive installer to publish config, choose the right topology, and generate the matching .env values:

It guides you through three safe presets:

If you prefer the manual path, you can still publish the config files yourself:

Publish the configuration file:

Setup Metrics Package

The autoscaler requires laravel-queue-metrics for queue discovery and metrics collection:

Configure storage backend in .env:

Queue Autoscale itself can now run in three safe modes:

auto keeps single-host mode Redis-free and switches to Redis-backed coordination automatically in cluster mode.

The installer can also write the recommended values straight into .env for you.

If using database storage, publish and run migrations:

📚 See Metrics Package Documentation for advanced configuration.

Quick Start

1. Configure SLA Targets (Optional)

Zero Config: By default, the package uses the "Balanced" profile (30s SLA). You can skip configuration if this suits you.

To customize, edit config/queue-autoscale.php:

2. Run the Autoscaler

The autoscaler will:

3. Monitor with Events

How It Works

Hybrid Predictive Algorithm

The autoscaler uses three complementary approaches and takes the maximum (most conservative):

1. Rate-Based (Little's Law)

Calculates steady-state workers needed for current load.

2. Trend-Based (Predictive)

Uses trend analysis to predict future arrival rates and scale proactively.

3. Backlog-Based (SLA Protection)

Aggressively scales when approaching SLA violations.

Resource Constraints

All calculations are bounded by:

See Architecture Documentation for detailed algorithm explanation.

Configuration Reference

SLA Defaults

Per-Queue Overrides

Prediction Settings

Resource Limits

Worker Settings

Strategy Configuration

Custom Scaling Strategies

Implement your own scaling logic:

Register in config:

Scaling Policies

Add before/after hooks to scaling operations:

Register in config:

Events

Subscribe to scaling events:

ScalingDecisionMade

WorkersScaled

SlaBreachPredicted

Advanced Usage

Running as Daemon

Use Supervisor to keep the autoscaler running:

Custom Evaluation Interval

Default is 5 seconds between evaluations.

Debugging

Enable detailed logging:

View scaling decisions:

Metrics Integration

This package does NOT discover queues or collect metrics itself. All queue discovery and metrics collection is delegated to laravel-queue-metrics:

Package Responsibilities:

laravel-queue-metrics (dependency)

laravel-queue-autoscale (this package)

Comparison with Horizon

Feature Laravel Horizon Queue Autoscale
Scaling Logic Manual supervisor config Automatic predictive
Optimization Goal Worker count targets SLA/SLO targets
Algorithm Static configuration Hybrid (Little's Law + Trend + Backlog)
Resource Awareness No Yes (CPU/memory limits)
Queue Discovery Manual queue config Via metrics package
Prediction Reactive only Proactive trend-based
SLA Protection No Yes (breach prevention)
Extensibility Limited Full (strategies, policies)

Testing

Run the test suite:

Run with coverage:

Changelog

Please see CHANGELOG for recent changes.

Contributing

Please see Contributing Guide for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

Resources

Documentation

Examples

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-queue-autoscale with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3|^8.4|^8.5
cboxdk/laravel-queue-metrics Version ^3.0
illuminate/contracts Version ^11.0||^12.0||^13.0
spatie/laravel-package-tools Version ^1.16
symfony/process Version ^7.0||^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cboxdk/laravel-queue-autoscale contains the following files

Loading the files please wait ...