Framework
easy-swoole/easyswoole avatar
easy-swoole/easyswoole

EasySwoole: a Swoole-based PHP framework for long-lived API servers

swoole,easyswoole,swoole framework

4,750 stars501 forksPHPApache-2.0

At a glance

What is it?
EasySwoole wraps the Swoole extension in a PSR-7 style application skeleton for HTTP, TCP, WebSocket and UDP services. It suits teams already comfortable with PHP who need a resident process rather than a per-request bootstrap, and it assumes the Swoole extension is present.
Who is it for?
Adopt EasySwoole if you already run PHP in production, can install the Swoole extension on your hosts, and want HTTP, TCP, WebSocket and UDP endpoints inside one resident process. Do not adopt it if you cannot control the PHP build, if your application is a short-lived script or a classic request-per-process site, or if you need a framework whose release cadence you can predict.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 28 days ago.
What is it written in?
Mainly PHP, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • easy-swoole/easyswoole4,750 ★ · -7
Star history
Repository2026-09-232026-11-15
easy-swoole/easyswoole4.8k4.8k

-7 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What EasySwoole replaces, and for whom

The README states the project was created for APIs, to remove the cost of process calls and file loading on every request. That is the whole pitch: a PHP application that boots once, stays in memory, and answers requests from worker processes instead of rebuilding its world each time. The README describes it as a distributed, persistent memory framework built on the Swoole extension.

The audience is narrow and specific. You need to be running PHP, you need the Swoole extension available on the machine, and you need a service that benefits from staying resident: an API, a WebSocket endpoint, a TCP service, a UDP listener. A team that ships a conventional PHP site behind php-fpm gets nothing from this. A team that already writes Swoole servers by hand gets a router, a container, middleware, an ORM and connection pools that they would otherwise assemble themselves.

The README lists what comes in the box: a global dependency injection container, PSR-7 HTTP messages, middleware for HTTP, TCP, WebSocket and UDP, an RPC layer, a database ORM, coroutine clients for MySQL, Redis, RPC and HTTP, coroutine and asynchronous task delivery, custom user processes, a router, a parameter validator, a log component, universal connection pools, a remote console and a crontab-rule timer. That is a framework's worth of surface area, and it is the reason the learning cost argument appears in the README rather than a minimalism argument.

The server model: one process, four protocols, shared memory

EasySwoole sits on top of the Swoole Server and, per the README, keeps the original features of that server while supporting simultaneous monitoring of HTTP, custom TCP and UDP protocols. So the unit you deploy is not one HTTP application. It is a server process that can hold several listeners at once, with worker processes handling the traffic and user processes available for work you want outside the request path.

Because the process is long-lived, state that would normally be rebuilt per request persists. The dependency injection container is global, which is what makes it useful and also what makes it dangerous: anything you register lives for the life of the worker. The README mentions coroutine clients for MySQL, Redis, RPC and HTTP alongside universal connection pools, and those two go together. In a resident server, a connection opened per request is a leak; a pool is the mechanism that keeps a bounded set of connections available to coroutines. The README also mentions coroutine and asynchronous task delivery, which is the escape hatch for work that should not block a request.

The PSR-7 HTTP message implementation matters for a different reason. It means request and response objects follow a published interface rather than a framework-specific one, so middleware written against PSR-7 has a chance of moving. The README does not claim PSR-15 middleware dispatch, so treat the middleware support as EasySwoole's own mechanism with PSR-7 messages underneath.

Installing EasySwoole and starting a first server

The README gives a three-command Quick Start. The first pulls the framework through Composer at the 3.x line.

bash
composer require easyswoole/easyswoole=3.x

The second runs the installer that ships inside the vendor directory.

bash
php vendor/bin/easyswoole.php install

The third starts the server. The README shows this exact form, run from the project root where the installer placed easyswoole.php.

bash
php easyswoole.php server start

The README's own example controller lives at App\HttpController\Index and extends EasySwoole\Http\AbstractInterface\Controller, with an index method that calls $this->response()->write('Hello World'). The ab output in the README targets port 9501, so that is the port to check once the server is up.

Where EasySwoole is the wrong tool

The hard dependency is the Swoole extension. It is a PHP extension, not a Composer package, so it has to be compiled or installed against the exact PHP build you run. On shared hosting, on a managed platform that fixes your PHP runtime, or anywhere you cannot rebuild the interpreter, EasySwoole is not an option at all.

The second constraint follows from the first: a resident process changes how you debug and deploy. A fatal error in a worker takes down that worker, not one request. Code that assumes a fresh global state per request will behave differently here, and the README does not document a rollback or graceful-restart procedure, so plan your own restart story before you put it behind traffic.

Release cadence is the third thing to look at honestly. The repository's most recent release listed is 3.8.1, dated 2026-10-18. The two before it are 3.7.2, dated 2025-09-19, and 3.7.1, dated 2023-03-13, roughly two and a half years apart. The last push to the repository was on 2026-10-18, so the codebase is not frozen, but a tagged release is what most teams pin to and the tags are sparse. If your organisation requires a predictable upgrade path with frequent minor releases, this is a real friction point. The README does not publish a support policy or an end-of-life schedule for the 3.x line.

EasySwoole against Hyperf and MixPHP

All three are PHP frameworks built on Swoole, and the difference is in what each one assumes about your code.

Hyperf is the closest in ambition. It is also a Swoole-based PHP framework with coroutines, dependency injection and an ecosystem of components. The practical difference for an evaluator is the shape of the application you write and the size of the component set you inherit. EasySwoole's README presents its own list of built-ins, including the ORM, the validator, the connection pools and the remote console, and describes the framework as encapsulating the Swoole Server while keeping its original features. That encapsulation is the design bet: you get a structured application skeleton, and in exchange you work within its conventions.

MixPHP is the other recurring comparison. It targets the same underlying extension but positions itself differently in scope, and the README here gives no comparison table, so the honest move is to read both sets of documentation rather than pick from a summary. What EasySwoole's README does make clear is where its emphasis sits: protocols and server features (HTTP, TCP, WebSocket, UDP, custom user processes, timers, RPC) rather than a web application toolkit.

Licence and the cost of staying current

The repository is licensed Apache-2.0. Apache-2.0 is a permissive licence with an explicit patent grant and a requirement to preserve notices and state changes. If you modify and redistribute EasySwoole, or ship it inside a product, those obligations travel with the code. This is a description of the licence text, not legal advice; check with your own counsel if the distribution model is unusual.

The upgrade cost is dominated by the Swoole extension, not by EasySwoole itself. A PHP upgrade usually means a Swoole rebuild, and that rebuild is the step that breaks. The README's install command pins Composer to the 3.x line. Between the sparse tags and the extension dependency, budget for upgrade work as a scheduled task rather than a background one.

The README also lists paid support channels, a VIP QQ group and a commercial contact, alongside several free groups. For a team that needs an escalation path, that is worth knowing before adoption rather than after.

Editorial conclusion

Adopt EasySwoole if you already run PHP in production, can install the Swoole extension on your hosts, and want HTTP, TCP, WebSocket and UDP endpoints inside one resident process. Do not adopt it if you cannot control the PHP build, if your application is a short-lived script or a classic request-per-process site, or if you need a framework whose release cadence you can predict. Before committing, verify that your target PHP version has a matching Swoole build, then run the install command and start the server on the port you intend to expose.

Frequently asked questions

What is EasySwoole and what is it used for?

EasySwoole is a PHP framework built on the Swoole extension, described in its README as a distributed, persistent memory framework created for APIs. It provides HTTP, TCP, WebSocket and UDP servers along with a router, dependency injection container, ORM, connection pools and middleware.

How do I install EasySwoole?

The README's Quick Start uses three commands: composer require easyswoole/easyswoole=3.x, then php vendor/bin/easyswoole.php install, then php easyswoole.php server start.

Does EasySwoole require the Swoole extension to be installed?

Yes. The README states the framework is based on the Swoole extension, and that extension is a PHP extension rather than a Composer package, so it must be available for the PHP build you run.

What is the difference between EasySwoole and Hyperf?

Both are PHP frameworks built on Swoole. EasySwoole's README emphasises server and protocol features such as simultaneous HTTP, TCP and UDP monitoring, custom user processes and a remote console; the README does not publish a direct feature comparison with Hyperf.

Is EasySwoole actively maintained?

The repository is not archived and the last push was on 2026-10-18. The most recent tagged release listed is 3.8.1 from 2026-10-18, preceded by 3.7.2 from 2025-09-19 and 3.7.1 from 2023-03-13.

What licence does EasySwoole use?

The repository carries the Apache-2.0 licence. That is a permissive licence with a patent grant and notice-preservation requirements if you redistribute the code.

Official sources

  1. easy-swoole/easyswoole on GitHub
  2. License: Apache-2.0
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/easy-swoole-easyswoole.svg)](https://hysenlabs.com/projects/easy-swoole-easyswoole)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/easy-swoole-easyswoole.svg)](https://hysenlabs.com/projects/easy-swoole-easyswoole)

Was this useful?