High-Performance GRPC server for PHP applications

3.0.0 2023-04-14 14:11 UTC


Latest Stable Version build Codecov

RoadRunner GRPC is an open-source (MIT) high-performance PHP GRPC server build at top of RoadRunner. Server support both PHP and Golang services running within one application.



  • native Golang GRPC implementation compliant
  • minimal configuration, plug-and-play model
  • very fast, low footprint proxy
  • simple TLS configuration
  • debug tools included
  • Prometheus metrics
  • middleware and server customization support
  • code generation using protoc plugin (Plugin can be downloaded from the roadrunner releases page)
  • transport, message, worker error management
  • response error codes over php exceptions
  • works on Windows


Install rr and protoc-gen-php-grpc by building it or use pre-build binaries.

Define your service schema using proto file. You can scaffold protobuf classes and GRPC service interfaces using:

$ protoc --php_out=target-dir/ --php-grpc_out=target-dir/ sample.proto

Make sure to install protoc compiler and run composer require spiral/roadrunner-grpc first

Implement needed classes and create worker.php to invoke your services.

Install rr and place .rr.yaml (or any other format supported by viper configurator) into the root of your project. You can run your application now:

$ rr serve

See example.

You can find more details regarding server configuration at RoadRunner Wiki.

try Spiral Framework


MIT License (MIT). Please see LICENSE for more information. Maintained by SpiralScout.