Repository navigation
Conversation
Replace the swoole-src stage with a Cargo build of appwrite-labs/swoole-rs v0.1.0, Swoole v6.2.5's PHP extension rewritten in Rust, with the same switches. The weekly updater follows swoole-rs's tags, and the v6.2.4 exclusion and the version test that assumed the pin is the reported Swoole version go with swoole-src. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Built locally on arm64 (OrbStack,
Not run locally: the xdebug target, amd64, and Appwrite e2e on this base. |
Appwrite benchmark: stock Swoole vs swoole-rsTwo Appwrite images ( Writes are clearly slower. All 0 failures and 0 non-2xx.
CPU and memory are the same.
The same work costs the same CPU but takes 21% longer, so swoole-rs spends more time waiting rather than more time computing. The slow endpoints are the ones that write to PostgreSQL (document and session creates, and document-list's p99), so the coroutine pgsql path is the first suspect. My guess is that it blocks a worker or serialises queries where stock Swoole yields. That needs confirming before this ships. Caveats: this ran on a laptop with other things running, and read throughput swings around 2× between trials for both variants. The write gap holds in every trial. Both images use the |
Builds the image's
swoole.sofrom appwrite-labs/swoole-rs v0.1.0, Swoole v6.2.5's PHP extension rewritten in Rust, in place ofswoole/swoole-src. Replaces appwrite/appwrite#15690, which did this in Appwrite's own Dockerfile.What changed
3451658, tagv0.1.0) and builds it with Cargo throughtools/build_ext.py. The switches are the same as before: c-ares, mysqlnd, the curl hook and the coroutine pgsql driver are passed through--configure. Sockets, Brotli, zstd and OpenSSL are always built in. Rust comes from Alpine'srustup, and the toolchain is the one swoole-rs'srust-toolchain.tomlpins (1.100.0). It builds from source because the release binaries leave out the curl and pgsql hooks.swooledependency now follows swoole-rs's tags. The v6.2.4 exclusion was a swoole-src release, so it's gone.StructureTest's Swoole-version test assumed the pin is the version Swoole reports. With swoole-rs the pin isv0.1.0while the extension reports 6.2.5, so that test is deleted.tests.yamlstill assertsswoole version 6.x.y, andtests-swoole.phpstill guards theSwoole-Upload-Filefix (refactor(http): harden multipart parsing and upload lifecycle swoole/swoole-src#6309).CHANGES.md2.4.0.Risk
swoole-rs is experimental: its README says nothing runs it in production yet, and its nightly AddressSanitizer run failed on three of the five nights to 2026-11-16. It passes upstream's PHPTs wherever upstream does, and its scheduled run of Appwrite's e2e suite matched stock Swoole on 2026-11-11. The Swoole stage now compiles about 209k lines of Rust, so cold builds are slower.
Testing
composer test(158 tests),composer lint,composer checktests-swoole.php🤖 Generated with Claude Code