PHP-FPM vs FrankenPHP vs Caddy Benchmark | WebifyGO

Published ·

Your website feels fast when you test it alone. Then a campaign goes live, 1,000 people arrive at once, and pages start taking seconds to load, or don't load at all. Most of the time the code isn't the problem. The problem is how PHP is being served.

We wanted a clear answer to a question our clients ask us often: which PHP runtime handles heavy real-time traffic best? So we load-tested three popular setups with 1,000 concurrent users on the same server and the same real application.

The short version

  • Apache + PHP-FPM gave the best balance of CPU, memory and throughput. CPU peaked at around 500%.
  • FrankenPHP was very fast on light load, but CPU climbed to around 1500% at 1,000 users, which made capacity hard to plan.
  • Caddy + PHP-FPM was stable and the easiest to configure, with slightly higher latency than Apache.
  • Choosing the runtime is half the job. Tuning PHP-FPM, OPcache, Redis sessions and MySQL makes the real difference.

The three stacks we tested

  • FrankenPHP: a modern PHP application server built on Caddy, now officially supported by The PHP Foundation.
  • Caddy + PHP-FPM: Caddy as the web server, with automatic HTTPS, and PHP-FPM handling PHP.
  • Apache + PHP-FPM: the traditional, battle-tested pairing, with Apache passing requests to PHP-FPM.

Test setup

  • Server: 16 CPU cores, 40 GB RAM
  • Database: MySQL 8 with a tuned innodb_buffer_pool_size and caching parameters
  • Load tools: ApacheBench (ab) and wrk, simulating 1,000 concurrent users
  • Application: a real-world PHP project with sessions and database queries, not a "hello world" script

That last point matters. Synthetic benchmarks that return a static string flatter every runtime. Real applications open sessions, query databases and build pages, and that's where the differences show up.

Results at a glance

StackWhat we saw at 1k usersStabilityBest for
Apache + PHP-FPMCPU peaked around 500%PredictableBusiness-critical apps, CRMs, high-traffic sites
Caddy + PHP-FPMSlightly higher latency than ApacheStableSimple deployments that need automatic HTTPS
FrankenPHPCPU peaked around 1500%Inconsistent under heavy loadModern apps built for worker mode

FrankenPHP: fast, but hungry under pressure

On light load, FrankenPHP was impressively quick. It's easy to run, and it includes modern features like HTTP/2, HTTP/3 and early hints.

At 1,000 concurrent users the picture changed. CPU usage climbed to around 1500%, which means almost all 16 cores were busy. Requests were still served quickly, but resource usage became unpredictable. When the CPU is that close to its limit, a small extra spike leaves no headroom.

A note on worker mode: FrankenPHP's biggest advantage is worker mode, which keeps your application loaded in memory between requests. It can give large gains, but only for applications written to support it, because state must not leak from one request to the next. If you're evaluating FrankenPHP, test worker mode with your own application before deciding.

Caddy + PHP-FPM: the easiest to run

Caddy is a pleasure to configure. HTTPS certificates are issued and renewed automatically, the config file is short and readable, and it spread the load well. Paired with PHP-FPM it was stable throughout the test.

In our runs, though, latency was slightly higher than with Apache in front of the same PHP-FPM pool, and PHP worker handling was a little less efficient.

Apache + PHP-FPM: the most predictable

The traditional stack gave the best balance of CPU usage, memory consumption and request throughput. At 1,000 concurrent users, CPU stayed at around 500%, about a third of FrankenPHP's peak, which left plenty of room for traffic spikes.

Its only real downside was a slightly higher memory footprint than Caddy. For a business application, we'll take that trade-off for predictability every time.

Why CPU usage matters more than raw speed

A benchmark winner on paper isn't always the winner in production. What business owners care about is simple: does the site stay fast when it matters most? Think of a product launch, a newsletter send, or Monday morning when the whole sales team logs into the CRM.

A stack with steady, moderate CPU usage gives you:

  • Headroom for unexpected spikes, without downtime
  • Predictable scaling, so you know when to add resources before users notice
  • Room for everything else on the server, such as background jobs, cron tasks and the database

How we tune PHP-FPM for 1,000+ users

Choosing Apache + PHP-FPM is the starting point. These are the settings our team adjusts on every high-traffic project. The values below are example starting points; the right numbers depend on your application.

1. Size the worker pool to your memory

Measure how much memory an average PHP-FPM worker uses in your application, then set pm.max_children to the memory available for PHP divided by that figure. If it's too low, requests queue. If it's too high, the server starts swapping.

pm = static            ; or dynamic for servers with varying load
pm.max_children = 200  ; example: RAM available for PHP / avg worker size
pm.max_requests = 1000 ; recycle workers to contain memory leaks

2. Turn on OPcache properly

opcache.enable=1
opcache.memory_consumption=256
opcache.max_accelerated_files=20000
opcache.validate_timestamps=0  ; reload PHP-FPM on every deploy

3. Move sessions to Redis

File-based sessions lock and slow down under concurrency. Redis keeps them in memory:

session.save_handler = redis
session.save_path = "tcp://127.0.0.1:6379"

4. Use Apache's event MPM

Run Apache with mpm_event and mod_proxy_fcgi, not the old prefork + mod_php combination. That way Apache handles connections and PHP-FPM handles PHP, and each can be tuned on its own.

5. Don't forget the database

Many "PHP is slow" problems are really database problems. Size innodb_buffer_pool_size so your working data fits in memory, add indexes for your slowest queries, and check the slow query log before you blame PHP.

Which stack should you choose?

  • Apache + PHP-FPM: if your site or app is business-critical, has many logged-in users, or runs a CRM like vTiger. Predictability wins.
  • Caddy + PHP-FPM: if you want a simple, modern setup with automatic HTTPS and your traffic is moderate.
  • FrankenPHP: if you're building a new application designed for worker mode and can test it thoroughly before launch.

What this means for your website, CRM or web app

Most slow PHP sites we're asked to look at don't need new hardware. They need the right stack and sensible tuning. When a client brings a slow website, a busy vTiger CRM or a custom web app to WebifyGO, we start by measuring: worker usage, slow queries, session handling and cache hit rates. Then we fix what's actually holding it back.

Performance and security go hand in hand. The same PHP-FPM setup that won this benchmark also closes the door on risky configurations like PHP-CGI. We cover that in our guide to two critical PHP vulnerabilities and how to fix them.

If your site slows down whenever traffic picks up, the WebifyGO team can tell you why, and fix it.

Is your PHP site slowing down under load?

Talk to our team. We'll review your server stack and show you exactly where the performance is going.

Book a free consultation

Frequently Asked Questions

WebifyGO builds custom digital platforms for businesses, combining a professional website, booking system, ecommerce store, CRM, invoicing, email and SMS marketing, and more, all managed from a single dashboard. Every deployment is custom-built for your industry, not a generic template.

A CRM (customer relationship management) system keeps every contact, deal, and interaction in one place, so your team can sell, support, and follow up without losing track of anything.

On light load it can be, especially in worker mode. In our 1,000-user test, Apache + PHP-FPM used far less CPU and stayed more predictable, so we recommend it for business-critical sites.

WebifyGO is priced as a project, not a monthly subscription. You pay a one-off build fee based on the modules and features you need, plus an optional maintenance plan. There are no per-seat fees and no recurring SaaS charges. Get in touch for a clear proposal.

Yes. WebifyGO is built to start simple and scale — solo founders can begin free, and the platform grows with your team without ever needing to migrate.

Size pm.max_children to the memory available for PHP divided by your average worker size, enable OPcache, and move sessions to Redis. The right values depend on your application.

WebifyGO is built for small and medium businesses that want a professional online presence, booking system, or ecommerce store, without stitching together multiple tools. It works across industries, from restaurants, salons, and clinics to law firms, agencies, and ecommerce brands.

Absolutely. Unlike spreadsheets, a CRM tracks full history, automates follow-ups, and keeps everyone working from the same live data.

Yes. We review your server stack, PHP-FPM pool, database and caching, then fix what is slowing your site down, without rebuilding it.

Yes. Every WebifyGO deployment runs in its own isolated instance on your own domain, with SSL encryption and automatic backups. Your data is never shared with other customers or other WebifyGO deployments.

They remove repetitive work — logging activity, sending follow-ups, and even making calls — so your team spends more time with customers and less on admin.

Yes. The platform is fully modular. You can start with a website and add a booking system, ecommerce store, CRM, or campaigns later, without rebuilding anything. Your existing pages and data stay exactly as they are.