Hacker News new | ask | show | jobs
by francislavoie 2082 days ago
The issue with that to me is the concern of memory leaks. With PHP/FastCGI, it's not a problem because after every request, the memory is thrown away. You just need to trust that PHP-FPM itself doesn't leak.

But that said, I do use https://reactphp.org/ occasionally for certain types of tasks (like running a websocket server) and that works great too, but it takes extra care to make sure not to use blocking IO and to take more care of memory management.

1 comments

Modern C++ greatly simplifies the situation with the memory (unless you specifically want to play with with it). My latest code for server application contains exactly zero explicit de-/allocations.