perf(worker): opt-in FrankenPHP/Symfony worker mode (PRISMARR_WORKER) - #95
Open
ndandan wants to merge 2 commits into
Open
perf(worker): opt-in FrankenPHP/Symfony worker mode (PRISMARR_WORKER)#95ndandan wants to merge 2 commits into
ndandan wants to merge 2 commits into
Conversation
Setting PRISMARR_WORKER=1 boots the Symfony kernel once and keeps it resident, skipping the per-request bootstrap. OFF by default (classic per-request mode unchanged); PRISMARR_WORKER_NUM pins the worker count. No APP_RUNTIME or extra Composer package — Symfony's default runtime drives FrankenPHP's worker loop. HealthService and DashboardController now implement ResetInterface so their per-request memo is cleared between requests (also fixes a latent staleness edge in classic mode).
…ISMARR_WORKER_NUM
Two hardening fixes to the env parse:
- PRISMARR_WORKER now enables worker mode only on explicit truthy values
(1/true/yes/on or a positive integer); any unrecognized value (e.g.
"disabled", "none", "OFF " with a stray space) logs a warning and stays
in classic mode instead of silently enabling a mode that changes
request-isolation semantics.
- PRISMARR_WORKER_NUM is interpolated verbatim into the Caddyfile's global
frankenphp{} block, so a non-integer value used to fail Caddy's parse and
restart-loop the whole container. It is now accepted only as a pure
positive integer; anything else is ignored with a warning.
Parse matrix verified for 17 input combinations.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Setting PRISMARR_WORKER=1 boots the Symfony kernel once and keeps it
resident, skipping the per-request bootstrap. OFF by default (classic
per-request mode unchanged); PRISMARR_WORKER_NUM pins the worker count.
No APP_RUNTIME or extra Composer package — Symfony's default runtime
drives FrankenPHP's worker loop. HealthService and DashboardController
now implement ResetInterface so their per-request memo is cleared
between requests (also fixes a latent staleness edge in classic mode).