π€― High-performance PHP application server, process manager written in Go and powered with plugins
MIT License
Bot releases are hidden (Show)
RR core
:RR_*
env variables prefix. This was an undocumented feature which caused confusion, because any configuration value might be automatically replaced (without using env in the configuration) with a matching RR_*
environment variable, PR.Temporal
plugin:continue_as_new_suggested
for the PHP Worker: PR.Kafka
maxPollRecords
from 10k to 100, PR.Endure
container:v1.22.4
.Worker
:RR_VERSION
env to the Environment
class: PR, (thanks @Kaspiman)Published by rustatian 5 months ago
google-pub-sub
:v2024.2.0
. Stay tuned! (thanks @cv65kr)gRPC
plugin:OTEL
plugin:RR core
plugin:workers/reset
commands don't respect default config values: BUG, (thanks @r4m-alexd)Published by rustatian 6 months ago
Published by rustatian 6 months ago
HTTP
plugin:protobuf
encoded payloads to prevent field reordering and JSON escaped symbols.Kafka
driver:SDK
:max_jobs
option and all the workers restarted at the same time. This feature is enabled automatically. (thanks @Kaspiman)Published by rustatian 8 months ago
Centrifuge
plugin:NotifyChannelState
centrifuge API.Temporal
plugin:since
log entries are now always shown as milliseconds, FR, (thanks @dmitryuk).Published by rustatian 8 months ago
Centrifuge
plugin:OTEL
plugin:endpoint
and headers
: BUG. Update docs on OTEL env usage: Docs, (thanks @fasdalf and @arku31).HTTP
plugin:200
instead of 500 in debug mode if PHP code fails: BUG, (thanks @Volonda).Published by rustatian 9 months ago
SDK
bugfixes:worker->stop()
) was returned (breaking change fix) FIX, (thanks @Zylius)Published by rustatian 9 months ago
HTTP
pluginSQS
JOBS driverService
pluginServer
pluginRedis
KV driverPublished by rustatian 10 months ago
HTTP
plugingRPC
plugingRPC
plugin: FR, docs: link (thanks @rauanmayemir)Beanstalk
driverVelox
Published by rustatian 11 months ago
gRPC
plugin:/health
and /ready
.AMQP
driver:List
(Golang []any
), BUG, (thanks @iborysenko).Push
method with delays, BUG, (thanks @fereron).Published by rustatian 11 months ago
.env
files in the configuration (experimental feature): Docs, (thanks @OO00O0O).Published by rustatian 12 months ago
origin
: FR, Docs, (thanks @orlandothoeny)Published by rustatian about 1 year ago
Published by rustatian about 1 year ago
Published by rustatian about 1 year ago
routing_key
in the JOBS payload: FR, (thanks @rauanmayemir)service:
schedule:run:
command: "bin/console schedule:run"
process_num: 1
exec_timeout: 0s
remain_after_exit: true
service_name_in_log: false
restart_sec: 60
user: www-data # <---------- [NEW]
group: www-data # <---------- [NEW]
Worker example:
<?php
require __DIR__ . '/vendor/autoload.php';
use Spiral\RoadRunner;
ini_set('display_errors', 'stderr');
require __DIR__ . "/vendor/autoload.php";
$worker = RoadRunner\Worker::create();
$http = new RoadRunner\Http\HttpWorker($worker);
$read = static function (): Generator {
foreach (\file(__DIR__ . '/test.txt') as $line) {
try {
yield $line;
} catch (Spiral\RoadRunner\Http\Exception\StreamStoppedException) {
// Just stop sending data
return;
}
}
};
try {
while ($req = $http->waitRequest()) {
$http->respond(200, $read());
}
} catch (\Throwable $e) {
$worker->error($e->getMessage());
}
103
Early Hints via streamed response: FR, (thanks @azjezz)Worker example:
<?php
use Spiral\RoadRunner;
ini_set('display_errors', 'stderr');
require __DIR__ . "/vendor/autoload.php";
$worker = RoadRunner\Worker::create();
$http = new RoadRunner\Http\HttpWorker($worker);
$read = static function (): Generator {
$limit = 10;
foreach (\file(__DIR__ . '/test.txt') as $line) {
foreach (explode('"', $line) as $chunk) {
try {
usleep(50_000);
yield $chunk;
} catch (Spiral\RoadRunner\Http\Exception\StreamStoppedException $e) {
// Just stop sending data
return;
}
if (--$limit === 0) {
return;
}
}
}
};
try {
while ($req = $http->waitRequest()) {
$http->respond(103, '', headers: ['Link' => ['</style111.css>; rel=preload; as=style'], 'X-103' => ['103']], endOfStream: false);
$http->respond(200, $read(), headers: ['X-200' => ['200']], endOfStream: true); // your regular response
}
} catch (\Throwable $e) {
$worker->error($e->getMessage());
}
.rr.yaml
configuration: FR, (thanks @nunomaduro)version: "3"
server:
command: ["php", "../../php_test_files/client.php echo pipes"]
relay: "pipes"
relay_timeout: "20s"
version: "3"
server:
command:
- "php"
- "../../php_test_files/client.php echo pipes"
relay: "pipes"
relay_timeout: "20s"
./rr jobs list/stop/resume
commands: PR, (thanks @gam6itko).Published by rustatian about 1 year ago
routing_key
in the JOBS payload: FR, (thanks @rauanmayemir, @butschster)Published by rustatian about 1 year ago
Published by rustatian about 1 year ago
service:
schedule:run:
command: "bin/console schedule:run"
process_num: 1
exec_timeout: 0s
remain_after_exit: true
service_name_in_log: false
restart_sec: 60
user: www-data # <---------- [NEW]
group: www-data # <---------- [NEW]
sdnotify
support: FR, (thanks @Kaspiman)<?php
require __DIR__ . '/vendor/autoload.php';
use Spiral\RoadRunner;
ini_set('display_errors', 'stderr');
require __DIR__ . "/vendor/autoload.php";
$worker = RoadRunner\Worker::create();
$http = new RoadRunner\Http\HttpWorker($worker);
$read = static function (): Generator {
foreach (\file(__DIR__ . '/test.txt') as $line) {
try {
yield $line;
} catch (Spiral\RoadRunner\Http\Exception\StreamStoppedException) {
// Just stop sending data
return;
}
}
};
try {
while ($req = $http->waitRequest()) {
$http->respond(200, $read());
}
} catch (\Throwable $e) {
$worker->error($e->getMessage());
}
103
Early Hints via streamed response: FR, (thanks @roxblnfk).rr.yaml
configuration: FR, (thanks @nunomaduro)version: "3"
server:
command: ["php", "../../php_test_files/client.php echo pipes"]
relay: "pipes"
relay_timeout: "20s"
version: "3"
server:
command:
- "php"
- "../../php_test_files/client.php echo pipes"
relay: "pipes"
relay_timeout: "20s"
First argument should be a command (executable) and the rest of the arguments are passed to the command as arguments.
./rr jobs list/stop/resume
commands: PR, (thanks @gam6itko).Special thanks for this beta-release to our awesome PHP team: @butschster, @roxblnfk, @wolfy-j and @msmakouz β€οΈ