Backend Development 8 min read

Introducing Fend: A High‑Performance Open‑Source PHP Framework from TAL Education

The article presents Fend, an open‑source high‑performance PHP framework released by TAL Education's technology team, detailing its design philosophy, feature set, dual FPM/Swoole engine support, performance benchmarks, installation procedures for multiple versions, and its widespread adoption across the company's online services.

Xueersi Online School Tech Team
Xueersi Online School Tech Team
Xueersi Online School Tech Team
Introducing Fend: A High‑Performance Open‑Source PHP Framework from TAL Education

TAL Education (好未来) is a technology‑driven education company that provides smart education platforms and extracurricular tutoring services worldwide.

To date, the group has developed over 100 AI capabilities across eight domains—including image, speech, data mining, and natural language processing—to serve various educational scenarios.

Its technical strategy emphasizes a "big middle platform, small front end" approach, unified infrastructure, and an open‑source culture that encourages shared development and organizational transformation.

Recently, the TAL technology team officially launched the high‑performance PHP framework Fend . The framework can handle up to 4,000 QPS on a single machine, and more than 30 internal teams are already using it.

Preface : PHP is simple and convenient, but many frameworks become overly complex for flexible development. 后续灵活

Fend has a long history; after its initial release it spread widely within the company, spawning many forks. It combines large‑scale internet experience with historical traces.

In July 2019 the TAL technology team refined, packaged, and promoted Fend, leading to extensive internal adoption and maintenance.

The team values a "grounded yet visionary" spirit. 脚踏实地、仰望星空

They invite the community to star the project, submit pull requests, and help improve the framework.

Design Principles

简单实用 : Emphasizes rapid onboarding, one‑step feature expansion, and reduced complexity.

单层内核 : Avoids inheritance; each function implements its own logic.

内聚归类 : Highly cohesive feature grouping to lower low‑level complexity.

持续积累 : Continuously incorporates large‑scale internet operational experience.

内核设计 : Simple, high‑cohesion core that leaves ample space for business logic.

开源心态 : Open, transparent contributions with strict code review.

Key Features

Swoole/FPM dual‑engine seamless switching.

Composer autoload with PSR‑4 support.

Debug mode activated via wxdebug=1 for exception analysis and performance tracing.

Improved coroutine variable encapsulation for easier coroutine usage.

Gray‑shadow database support for load testing.

High‑speed map routing and FastRouter regex routing.

Trace‑log design compatible with big‑data pipelines (ELK, ClickHouse, HBase) for real‑time alerts.

Exception handling using throw new Exception for rapid error discovery.

Performance Testing – FPM Engine

Test environment: KVM virtual machine (4‑core Xeon 2.2 GHz, 12 GB RAM, CentOS 7.6) with 500 FPM processes.

Observed QPS: 5,331 (baseline hello test 10k QPS, after Composer autoload 7,000 QPS, with trace logging 6,000 QPS, framework echo 5,000 QPS).

Performance Testing – Swoole Engine (1.10.x)

Same hardware configuration as above.

Observed QPS: (image omitted) – demonstrates comparable high throughput.

Release Versions

Tag 1.2.x – supports FPM and Swoole 1.10.x with smooth switching.

Tag 1.3.x – supports FPM and Swoole 4.5.x coroutine mode with smooth switching. 此版本还在调整

Installation – 1.2.x (FPM)

Start the FPM engine (see image). Configure Nginx and access http://127.0.0.1/ in a browser.

Installation – 1.2.x (Swoole)

Start the Swoole engine (see image) and access http://127.0.0.1:9572/ in a browser.

Installation – 1.3.0 Coroutine Version

Follow the provided steps (image omitted) to install the coroutine-enabled version.

Open‑Source Contributors

List of project authors and contributors (images omitted).

Partners

Partner logos displayed (images omitted).

Approximately 90 % of TAL Education Group's online services are built on this framework.

Co‑building Rules

Encourages challenging component functionality, allowing competing implementations, judged by performance, simplicity, and practicality.

Project Links

Issue tracker: https://github.com/tal-tech/fend/issues

Repository: https://github.com/tal-tech/fend

Hundreds of developers have starred the project, and interested peers can join the WeChat discussion group (contact image omitted).

backendperformanceopen sourcePHPframeworkSwoolefpm
Xueersi Online School Tech Team
Written by

Xueersi Online School Tech Team

The Xueersi Online School Tech Team, dedicated to innovating and promoting internet education technology.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.