Dynamic scaling


This feature became available starting from the RoadRunner 2023.3 release. Users can now scale their RoadRunner workers dynamically via RPC. A new class, Spiral\RoadRunner\WorkerPool, has been introduced to provide an easy interface to add or remove workers from the RoadRunner workers pool.


  • This feature is not available when running RoadRunner in debug mode (pool.debug=true).


Below is a brief example demonstrating how to use this new feature:

use Spiral\RoadRunner\WorkerPool;
use Spiral\Goridge\RPC\RPC;

$rpc = RPC::create('tcp://');
$pool = new WorkerPool($rpc);

// Add a worker to the pool.

// Remove a worker from the pool.

List of the supported plugins

  • http, grpc, temporal, centrifuge, tcp, jobs.

This provides developers more control and flexibility over their RoadRunner setup, allowing for better resource allocation based on the needs of their application.

Last updated