# Service & load

> Where does a service saturate under load, and what happens there?

- Status: Open
- Record count: 2
- Source: https://muhammetsafak.com/research/program/servis-yuk/
- Language: en-US
- Author: Muhammet Şafak

---
Latency distribution, saturation point and queue behaviour under load — p95/p99, not the mean; backpressure and circuit breakers included.

## Findings ledger

### One core carries 14,330 OAuth2 requests in Go and 5,152 in PHP-FPM

- Question: The same API verifies an RS256 bearer token on every request and then reads or writes one row in PostgreSQL — on one, two and four cores, how much mixed traffic does it carry in Go, PHP-FPM and FrankenPHP worker mode?
- Finding: On four cores Go carried 57,321 mixed requests a second, FrankenPHP 25,659 and php-fpm 20,606 — 14,330, 6,415 and 5,152 per core. The number that goes into a capacity plan is not that one but application CPU per request: 66.8, 110.7 and 187.7 microseconds. At saturation FrankenPHP uses only 2.84 of its four cores, against Go's 3.83 and php-fpm's 3.87. The database is not the constraint: on the same four cores PostgreSQL alone writes 68,212 rows a second, above the mixed ceiling of the fastest candidate.
- https://muhammetsafak.com/research/capacity-per-core-go-php-oauth2/
- Markdown: https://muhammetsafak.com/research/capacity-per-core-go-php-oauth2.md

### Seven PHP frameworks under identical load: the gap narrows as soon as the request does real work

- Question: On the same hardware, the same PHP build and the same seven routes, how many requests a second do Laravel, Symfony, CodeIgniter, Yii2, Phalcon, Laminas and Slim serve, and at what latency?
- Finding: On an empty route the fastest is 4.4× the slowest (Slim 25,975, Laravel 5,966 req/s). As soon as the request does real work the gap closes: 3.7× for a single row from the database, 3.5× for twenty rows. Phalcon is third on an empty route and fifth once a query is involved — being a C extension buys nothing while the process waits on MySQL. And the expensive decision is not the framework: Laravel's own default `web` middleware group takes the same response from 5,858 to 2,176 req/s, so one default costs more than most of the distance between the frameworks.
- https://muhammetsafak.com/research/php-framework-load-test/
- Markdown: https://muhammetsafak.com/research/php-framework-load-test.md
