Closed barryvdh closed 5 years ago
Nice, if we don't loose performances then 👍 it's better to stay on the most popular solution.
@barryvdh You should put clear_env = no in php-fpm conf in order for FPM to pass on Lambdas ENV Variables.
Do we need those? They aren't used in the other scenarios, right?
If We intend to pass values through ENV Variables yes.. They are not used in other scenarios because FPM is the only one that "Cleans" the environment
; Clear environment in FPM workers
; Prevents arbitrary environment variables from reaching FPM worker processes
; by clearing the environment in workers before env vars specified in this
; pool configuration are added.
; Setting to "no" will make all environment variables available to PHP code
; via getenv(), $_ENV and $_SERVER.
; Default Value: yes
There are some more interesting options for this, but it doesn't matter much for benchmarking. But FPM can run in either background or foreground (which might matter for coldstart). And has options to restart workers after x runs etc. But you could make a PR with some nice settings, I'm not really an expert on this :)
it doesn't matter much for benchmarking
Agreed, let's not worry about the implementation details here unless they affect performances. This repo is about benchmarking, then in Bref we'll focus on making it perfect (and your help will be most welcome @atrope :)).
Actually use php-fpm now. Setup is similar but requires a config, which could be placed in the layer like the php.ini, but easier to test this way for now. Performance seems similar, perhaps slightly faster. Bootstrap also seems slightly faster (around 180ms or so, but haven't tested extensively). Anyway, this seems as the preferred method, so this might be better to use.