jiyis / laravel-swoole
使用swoole加速laravel框架。
dev-master
2018-05-04 10:50 UTC
Requires
- php: ^7.1
- illuminate/console: ~5.4
- illuminate/contracts: ~5.4
- illuminate/http: ~5.4
- illuminate/support: ~5.4
Requires (Dev)
- codedungeon/phpunit-result-printer: ^0.14.0
- laravel/lumen-framework: ~5.4
- mockery/mockery: ~1.0
- phpunit/phpunit: ^6.1
Suggests
- ext-inotify: Inotify, used to reload all worker processes when your code is modified.
- ext-swoole: Production-Grade Async programming Framework for PHP, require >= 1.7.19.
This package is not auto-updated.
Last update: 2024-09-19 14:21:26 UTC
README
此包提供了一个高性能的HTTP服务器,用于基于Swoole的Laravel/Lumen应用程序,从而加快您的应用程序速度。
版本兼容性
特性
- 在Swoole上运行Laravel/Lumen应用程序。
- 卓越的性能提升,高达30倍。
- 沙盒模式以隔离应用程序容器。
- 支持在Laravel中运行WebSocket服务器。
- 支持Socket.io协议。
- 支持Swoole表进行跨进程数据共享。
文档
请参阅Wiki
基准测试
使用MacBook Air 13,2015和干净的Lumen 5.5进行测试。基准测试工具:wrk
wrk -t4 -c100 http://your.app
Nginx with FPM
Running 10s test @ http://lumen.app:9999
4 threads and 100 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.14s 191.03ms 1.40s 90.31%
Req/Sec 22.65 10.65 50.00 65.31%
815 requests in 10.07s, 223.65KB read
Requests/sec: 80.93
Transfer/sec: 22.21KB
Swoole HTTP服务器
Running 10s test @ http://127.0.0.1:5333
4 threads and 100 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 11.58ms 4.74ms 68.73ms 81.63%
Req/Sec 2.19k 357.43 2.90k 69.50%
87879 requests in 10.08s, 15.67MB read
Requests/sec: 8717.00
Transfer/sec: 1.55MB
支持
有关错误和功能请求,请跟踪Github。
致谢
许可证
Laravel-Swoole包是开源软件,许可协议为MIT许可。
在Beerpay上支持
嘿,伙计!帮帮我几个🍻!