Skip to content

Workerman vs Daemon.io vs ReactPHP - Benchmark performance

License

Notifications You must be signed in to change notification settings

omartineau/php-async-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Async PHP Framework Benchmark

Which async framework perform the most ?

Framework Website Github
ReactPHP http://reactphp.org/ https://github.com/reactphp
Workerman http://www.workerman.net https://github.com/walkor/Workerman
Daemon.io https://daemon.io/ https://github.com/kakserpom/phpdaemon
Kraken http://kraken-php.com/ https://github.com/kraken-php/framework

Run

ReactPHP

php react/test-react.php

Workerman

Run workerman server

php test-workerman.php start -d
Stop
php test-workerman.php stop

Docker

The easiet way to test is to run in docker.

Build you docker container

docker build -t workermanbench .

docker run --name asyncphpbench -d -p 1337:1337 -v ~/Sites/php-async-benchmark:/home/benchmark php:7

Assuming you have cloned the repo in you Sites folder in your home directory.

-v ~/Sites/nsa/docker/nsa-php.ini:/usr/local/etc/php/conf.d/nsa-php.ini

Connect your docker

docker exec -i -t asyncphpbench /bin/bash

Benchmark test

ab -n 1000 -c 20 http://IP:1337

https://github.com/cmpxchg16/gobench

Install mandatory libs

Install libevent on PHP 7

Libevent is not availaible on PECL pour PHP 7

You need to compile https://github.com/expressif/pecl-event-libevent

apt-get install php7.0-dev

Install event

apt-get install php-pear
pecl install event

About

Workerman vs Daemon.io vs ReactPHP - Benchmark performance

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages