EasySwoole is a Swoole-based PHP framework for APIs and long-lived services with HTTP, WebSocket, TCP, and UDP servers in one app.
Overview
EasySwoole is a distributed, resident-memory PHP framework built on the Swoole extension. It targets API and similar workloads where avoiding repeated process startup and file loading improves throughput. The framework wraps Swoole Server while keeping native Swoole capabilities.
An application can expose HTTP, custom TCP, UDP, and WebSocket services together, using coroutines to build multi-process, asynchronous systems. Built-in pieces include dependency injection, PSR-7 HTTP messages, middleware, an ORM, coroutine clients for MySQL, Redis, RPC, and HTTP, connection pools, routing, validation, logging, scheduled Crontab tasks, and custom user processes.
Documentation and the project site describe it as an enterprise-oriented coroutine stack for high-concurrency PHP services, with RESTful routing and an install flow that can generate example HTTP projects. Public load-test figures are published using the ab benchmark tool on sample hardware.
The framework is used in production by several companies listed on the official site for gaming, finance, and internet services in China.
Key features
- Swoole HTTP, TCP, UDP, WebSocket servers
- Coroutine clients and task dispatch
- Dependency injection container
- Database ORM and connection pools
- HTTP middleware and routing
- RPC extension support
- Crontab scheduled jobs
- Remote management console support
Use cases
- High-concurrency HTTP APIs in PHP
- WebSocket and TCP microservices
- Long-running coroutine worker processes
- Distributed game and finance backends