r/PHPhelp • u/Anuiran • May 26 '20
PHP FPM vs Apache mod_php
Looking to support http2 and have read about switching to fpm to support it. I can handle all that, but I’m curious on a technical level.
Performance wise how does fpm compare to mod_php?
Is FPM the “future?” and is Apache planning on supporting http2 for their php module?
Am I an ancient for still using mod_php
15
Upvotes
4
u/_thegingerninja May 26 '20
mod_php/prefork will never support HTTP/2, in fact, that feature was specifically removed from it as of version 2.4.27+. So in a "modern standards" conversation, yes you'd be considered "old" using mod_php. But still, the world isnt perfect, hundreds of thousands of servers still run it.
FPM is a lot more efficient in terms of resource usage when handling multiple connections, and obviously the MPM's (worker and event) both support HTTP/2.
In short I guess, if you want to, and/or need to, then switching to FPM is the way to adopt HTTP/2