Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why not use PHP-FPM ? #35

Open
quenode opened this issue Aug 27, 2019 · 4 comments
Open

Why not use PHP-FPM ? #35

quenode opened this issue Aug 27, 2019 · 4 comments

Comments

@quenode
Copy link

quenode commented Aug 27, 2019

Hi thank you very much for this project,

I was wondering any advantage of using PHP-FPM vs Apache2 (Modphp option)

Tnx

@fballiano
Copy link
Owner

there were other projects using FPM, also I never liked FPM 100%.

I think FPM it's great for website that serve static content (or pages generated by other languages) + some percentage of PHP pages, but with magento most of the requests are PHP handled, thus I think it's always better to have them directly inside the web server. All non-php requests (in this infrastructure at least) are cached by varnish never to be served again so actually (with warm cache) all requests are PHP requests.

Also, apache handles htaccess.

I've to say that now that SSL is a must and we've to have nginx as SSL incapsulator (which this project have since a while now)... it would make sense to migrate to FPM and get rid of apache, which would mean removing 1 component from the infrastructure and making it more simple, but I still like the htaccess support a lot.

@fballiano
Copy link
Owner

actually I'm not sure it would work cause nginx is before varnish, thus after varnish we'd need another web server before FPM right? if that's the case I can't see any benefit in switching.

@ThomasNegeli
Copy link

@fballiano when you look at the network of your browser, you see that a minimum of Magento requests are PHP requests. Most of them are static content requests, which can be directly served without coming to the PHP interpreter.

Mixing the PHP interpreter and the webserver, as it is when you install Magento and Apache with PHP in the same container, does not take into account that there should be one container for one job. Only when you respect this you have the benefit if exchanging components in the infrastructure, without influencing each other.

@fballiano
Copy link
Owner

all those requests are cached and served by varnish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants