π€― High-performance PHP application server, process manager written in Go and powered with plugins
MIT License
Bot releases are visible (Hide)
Published by rustatian over 2 years ago
Published by rustatian over 2 years ago
Published by rustatian over 2 years ago
Published by rustatian over 2 years ago
Published by rustatian over 2 years ago
amd64
releases.v2.10.0
, every released binary can be checked with a provided *.asc
key. For example:$ gpg --verify rr.asc
The openPGP key can be verified here: keyserver
Go
programming language located here: link. To use it, just import the latest stable version go.buf.build/protocolbuffers/go/roadrunner-server/api latest
.Service
plugin now supports auto-reload. It can be added to the reload
plugin targets and on change, it'll reload all underlying processes.AutoAck
jobs option. For the messages (jobs), which are acceptable to lose. Or which execution can lead to a worker's stop (for example - OOM).new_relic
middleware is deprecated, it'll receive only dependency updates and will be removed from the RR bundle in the v2.12.0
.datadog
, new relic
.http
or grpc
clients.Configuration sample (stdout exporter):
http:
address: 127.0.0.1:43239
max_request_size: 1024
middleware: [gzip, otel]
pool:
num_workers: 2
max_jobs: 0
allocate_timeout: 60s
destroy_timeout: 60s
otel:
insecure: false
compress: true
exporter: stdout
service_name: rr_test
service_version: 1.0.0
New Relic exporter via http
client: link
http:
address: 127.0.0.1:43239
max_request_size: 1024
middleware: [gzip, otel]
pool:
num_workers: 2
max_jobs: 0
allocate_timeout: 60s
destroy_timeout: 60s
otel:
insecure: false
compress: true
client: http
exporter: stdout
custom_url: ""
service_name: rr_test
service_version: 1.0.0
endpoint: otlp.eu01.nr-data.net:4318
headers:
- api-key: xxx # your api key here
PHP worker can access tracing data via w3c
headers.
Service
plugin output will be automatically trimmed. CHORE, (thanks, @OO00O0O)Published by rustatian over 2 years ago
--silent
flag. This flag will hide the startup message and ./rr reset
output.reset
command (./rr reset
) gets stuck when using output redirects. BUG, (thanks @maximal)Published by rustatian over 2 years ago
Worker sample:
<?php
use Nyholm\Psr7\Factory\Psr17Factory;
use Nyholm\Psr7\Response;
use Nyholm\Psr7\Stream;
use Spiral\RoadRunner;
ini_set('display_errors', 'stderr');
require __DIR__ . "/vendor/autoload.php";
$worker = RoadRunner\Worker::create();
$psr7 = new RoadRunner\Http\PSR7Worker(
$worker,
new Psr17Factory(),
new Psr17Factory(),
new Psr17Factory()
);
$psr7->chunk_size = 10 * 10 * 1024;
$filename = 'file.tmp'; // big file or response
while ($req = $psr7->waitRequest()) {
try {
$fp = \fopen($filename, 'rb');
\flock($fp, LOCK_SH);
$resp = (new Response())->withBody(Stream::create($fp));
$psr7->respond($resp);
} catch (\Throwable $e) {
$psr7->getWorker()->error((string)$e);
}
Known issues:
Published by rustatian over 2 years ago
trusted_subnets
HTTP option will work only when proxy_ip_parser
was added to the list of the middleware.ExecWithTTL
SDK method which leads to skipping the exec_ttl
supervisor option BUG (thanks @Baiquette)proxy_ip_parser
HTTP middleware responsible for parsing X-Forwarded-For
, Forwarded
, True-Client-IP
and X-Real-Ip
.Published by rustatian over 2 years ago
StandWithUkraine
πΊπ¦πΊπ¦πΊπ¦amqp
plugin when destroying pipelines.Published by rustatian over 2 years ago
-w
flag) before searching for the configuration.Published by rustatian over 2 years ago
v2.9.0
, RR is capable of streaming responses.experimental:
response_streams: true
Worker sample:
<?php
use Nyholm\Psr7\Factory\Psr17Factory;
use Nyholm\Psr7\Response;
use Nyholm\Psr7\Stream;
use Spiral\RoadRunner;
ini_set('display_errors', 'stderr');
require __DIR__ . "/vendor/autoload.php";
$worker = RoadRunner\Worker::create();
$psr7 = new RoadRunner\Http\PSR7Worker(
$worker,
new Psr17Factory(),
new Psr17Factory(),
new Psr17Factory()
);
$psr7->chunkSize = 10 * 10 * 1024;
$filename = 'file.tmp'; // big file or response
while ($req = $psr7->waitRequest()) {
try {
$fp = \fopen($filename, 'rb');
\flock($fp, LOCK_SH);
$resp = (new Response())->withBody(Stream::create($fp));
$psr7->respond($resp);
} catch (\Throwable $e) {
$psr7->getWorker()->error((string)$e);
}
}
Known issues:
Published by rustatian over 2 years ago
1.18
Published by rustatian over 2 years ago
"mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@${MYSQL_HOST}:${MYSQL_PORT}/${MYSQL_DATABASE}?serverVersion=5.7"
and get all environment variables. FR, (reporter @Tony-Sol)configuration
plugin from the root.go
and other files. Used only in the serve
where it should be.Published by rustatian over 2 years ago
http:
middleware: ["static", "gzip"]
Middleware executed from the right to left, i.e. first will be gzip
and then static
.
Forwarder
header, RFC, FR (reporter @digitalkaoz)rr_activities_pool_queue_size
and rr_workflows_pool_queue_size
metrics. These metrics shows the number of activities/workflows waiting for the worker BUG, (reporter @Zylius)Queuer
interface for the workers pool to show the number of requests waiting for the worker. Implemented in SDK.Published by rustatian over 2 years ago
v2.8.0
your .rr.yaml
configuration version should be 2.7
.version: '2.7'
at the top.command
:http:
address: 127.0.0.1:8080
max_request_size: 256
middleware: ["headers", "gzip"]
trusted_subnets: []
# Workers pool settings.
pool:
command: "php app.php" <---- NEW
This option overrides the server
's command with the new one. The new command will inherit all server options. It can be used in any plugin (jobs
, grpc
, tcp
, http
, etc) using the workers' pool (http
used here as a sample). No need to update your config. By default server command will be used as in the previous RR versions. Note, you can't leave the server
command option empty. If you want to override the command in every plugin you use, put a placeholder in the server.command
.
Rr_newrelic_ignore
header support. Now you can send the Rr_newrelic_ignore:true
header, and RR will ignore such transactions. RR will send no data to the newrelic
server. FR (reporter @arku31)grpc
plugin. Doc, FR (reporter @porozhnyy)