RoadRunner是一个用Go语言实现的高性能PSR-7服务器,你没看错,是Go语言实现的。
RoadRunner首先用Go实现了一个高性能的服务器,然后通过goridge IPC把请求转发给多个PHP CLI Worker,Worker会把请求重新封装成PSR-7 Request交给框架进行处理。
娱乐测试
使用siege测试Laravel的Welcome页面,250个并发用户,持续30秒,对比Nginx + FPM和RoadRunner。
Nginx + FPM:
$ siege --no-parser -c 250 -t 30s http://127.0.0.1:3000/ > /dev/null
** SIEGE 4.0.4
** Preparing 250 concurrent users for battle.
The server is now under siege...
Lifting the server siege...
Transactions: 2032 hits
Availability: 97.83 %
Elapsed time: 29.19 secs
Data transferred: 4.51 MB
Response time: 2.64 secs
Transaction rate: 69.61 trans/sec
Throughput: 0.15 MB/sec
Concurrency: 183.50
Successful transactions: 2032
Failed transactions: 45
Longest transaction: