The repo contains the Symfony 7 application skeleton to be run in different runtimes:
- Apache(prefork mode) + mod_php
- Apache + PHP-FPM
- Nginx + PHP-FPM
- Nginx Unit
- Roadrunner
- Nginx + Roadrunner
- FrankenPHP
- FrankenPHP (worker mode)
- Swoole
- http://localhost/
- http://localhost/?firstName=Randomlfirstname&lastName=Randomlastname
- http://localhost/phpinfo
- http://symfony7site/
- http://symfony7site/?firstName=Randomlfirstname&lastName=Randomlastname
- http://symfony7site/phpinfo
Load tests are run inside docker container, which is in the same network as the runtime.
make run/loadtest/bombardier-c5-d30s # Run bombardier concurrent connections: 5, duration: 30s
make run/loadtest/bombardier-c10-d30s # Run bombardier concurrent connections: 10, duration: 30s
make run/loadtest/bombardier-c100-d30s # Run bombardier concurrent connections: 100, duration: 30s
make run/loadtest/bombardier-c1000-d30s # Run bombardier concurrent connections: 1000, duration: 30s
make run/loadtest/bombardier-c10000-d30s # Run bombardier concurrent connections: 10000, duration: 30s
make run/loadtest/ab-n100-c5
make run/loadtest/ab-n1000-c100
make run/loadtest/ab-n10000-c1000
See js scripts in 001_symfony7_wo_db/testing-tools/k6
make run/loadtest/k6-vus5-dur30s
make run/loadtest/k6-vus10-dur30s
make run/loadtest/k6-vus100-dur30s
make run/loadtest/k6-vus1000-dur30s
make run/loadtest/k6-vus10000-dur30s
make start/runtime/001-apache-modphp
make stop/runtime/001-apache-modphp
make rebuild/runtime/001-apache-modphp
make down/runtime/001-apache-modphp
make shell/runtime/001-apache-modphp
make start/runtime/002-apache-phpfpm
make stop/runtime/002-apache-phpfpm
make rebuild/runtime/002-apache-phpfpm
make down/runtime/002-apache-phpfpm
make shell/runtime/002-apache
make shell/runtime/002-phpfpm
To calculate PHP-FPM pm.max_children, the following formula was used:
pm.max_children = Memory available to container / Memory consumed by 1 process
Memory consumed by 1 process:
ps --no-headers -o "rss,cmd" -C php-fpm | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"Mb") }'
make start/runtime/003-nginx-phpfpm
make stop/runtime/003-nginx-phpfpm
make rebuild/runtime/003-nginx-phpfpm
make down/runtime/003-nginx-phpfpm
make shell/runtime/003-nginx
make shell/runtime/003-phpfpm
make start/runtime/004-nginx-unit
make stop/runtime/004-nginx-unit
make rebuild/runtime/004-nginx-unit
make down/runtime/004-nginx-unit
make shell/runtime/004-unit
The symfony/runtime component is used
make start/runtime/005-roadrunner
make stop/runtime/005-roadrunner
make rebuild/runtime/005-roadrunner
make down/runtime/005-roadrunner
make shell/runtime/005-roadrunner
The symfony/runtime component is used
- https://roadrunner.dev/docs/app-server-nginx-with-rr/current/en
- https://github.com/baldinof/roadrunner-bundle
make start/runtime/006-nginx-roadrunner
make stop/runtime/006-nginx-roadrunner
make rebuild/runtime/006-nginx-roadrunner
make down/runtime/006-nginx-roadrunner
make shell/runtime/006-nginx
make shell/runtime/006-roadrunner
The symfony/runtime component is used
make start/runtime/007-frankenphp
make stop/runtime/007-frankenphp
make rebuild/runtime/007-frankenphp
make down/runtime/007-frankenphp
make shell/runtime/007-frankenphp
The symfony/runtime component is used
make start/runtime/008-frankenphp-workermode
make stop/runtime/008-frankenphp-workermode
make rebuild/runtime/008-frankenphp-workermode
make down/runtime/008-frankenphp-workermode
make shell/runtime/008-frankenphp-workermode
- FrankenPHP can't start with production version of php.ini, which is provided with official PHP image
The symfony/runtime component is used
make start/runtime/009-swoole
make stop/runtime/009-swoole
make rebuild/runtime/009-swoole
make down/runtime/009-swoole
make shell/runtime/009-swoole