3 ms·
Look, if you want to use something other than PHP, don't let me get in your way. However, if PHP is one thing, it is fast and always has been. > Varnish, mem
by combatentropy 10y ago
Look, if you want to use something other than PHP, don't let me get in your way. However, if PHP is one thing, it is fast and always has been.
> Varnish, memcache, php-fpm, redis, what-have-you are basically mandatory
We don't use any of that. We don't even use database connection pooling. Every request has to reopen the database. Every request has to reopen an LDAP connection to Active Directory for authentication. We are still on PHP 5.3 and we aren't using an opcache. We are using the memory-hungrier mod_php instead PHP-FPM, and we are using the slower, memory-hungrier Apache prefork instead of its newer event MPM. We are also running PostgreSQL on the same server. And yet PHP is connecting to the database over the slower network instead of UNIX domain sockets.
Every request takes just a split second. The server's processor is running at 1-2%, with about half a gigabyte of RAM in use, a lot of which is probably the database.
All those inefficient design decisions are artifacts of history that I hope eventually to revise out --- except for connection pooling, which I've read has its own problems. On my personal website I've been able to choose the newer and better things, but none of them were really more work to set up: Apache event MPM, Unix domain-socket connections, PHP-FPM, and PHP's OPcache.