1 Star 1 Fork 0

张世平 / laravel-swoole

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Laravel-Swoole

php-badge packagist-badge Total Downloads Scrutinizer Code Quality travis-badge

This package provides a high performance HTTP server to speed up your Laravel/Lumen application based on Swoole.

Version Compatibility

PHP Laravel Lumen Swoole
>=7.2 >=5.5 >=5.5 >=4.3.1

Features

  • Run Laravel/Lumen application on top of Swoole.
  • Outstanding performance boosting up to 5x faster.
  • Sandbox mode to isolate app container.
  • Support running websocket server in Laravel.
  • Support Socket.io protocol.
  • Support Swoole table for cross-process data sharing.

Documentation

Please see Wiki

Benchmark

Test with clean Lumen 5.6, using DigitalOcean 3 CPUs / 1 GB Memory / PHP 7.2 / Ubuntu 16.04.4 x64

Benchmarking Tool: wrk

wrk -t4 -c100 http://your.app

Nginx with FPM

wrk -t4 -c10 http://lumen-swoole.local

Running 10s test @ http://lumen-swoole.local
  4 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     6.41ms    1.56ms  19.71ms   71.32%
    Req/Sec   312.99     28.71   373.00     72.00%
  12469 requests in 10.01s, 3.14MB read
Requests/sec:   1245.79
Transfer/sec:    321.12KB

Swoole HTTP Server

wrk -t4 -c10 http://lumen-swoole.local:1215

Running 10s test @ http://lumen-swoole.local:1215
  4 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     2.39ms    4.88ms 105.21ms   94.55%
    Req/Sec     1.26k   197.13     1.85k    68.75%
  50248 requests in 10.02s, 10.88MB read
Requests/sec:   5016.94
Transfer/sec:      1.09MB

Q&A

The common questions are collected in Q&A. You can go check if your question is listed in the document.

Issues and Support

Please read Issues Guideline before you submit an issue, thanks.

Bugs and feature request are tracked on GitHub.

Credits

Huang-Yi,

Alternatives

License

The Laravel-Swoole package is open-sourced software licensed under the MIT license.

Support on Beerpay

Hey dude! Help me out for a couple of :beers:!

Beerpay Beerpay

MIT License Copyright (c) 2018 Huang Yi, Albert Chen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

https://github.com/swooletw/laravel-swoole.git 展开 收起
PHP
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/zsping1989/laravel-swoole.git
git@gitee.com:zsping1989/laravel-swoole.git
zsping1989
laravel-swoole
laravel-swoole
master

搜索帮助