Johnathan Sanders
1 min readSep 3, 2022

--

Thanks for the question!

Note that I have not personally used ReactPHP, and am basing this response only on research that I have done into it.

1. Running PHP-FPM and a web server such as Apache or Nginx provides true separation of duties. The web server handles the connections, and PHP-FPM handles the processing of the PHP code. Plus, Nginx is extremely fast and efficient and is also asynchronous in nature (the same as ReactPHP provides).

This also means that PHP-FPM can be installed on separate server(s) than the web server(s), allowing for maximum control over resource consumption and optimization - in addition to optimized scaling.

2. NodeJS is typically a more suitable choice for asynchronous application development, specifically in the context of REST services.

3. PHP-FPM can unblock longer running requests by "yielding" via fastcgi_finish_request().

4. ReactPHP appears to be more suited to running scripts locally vs. serving requests to callers. No web server is needed, so overhead when used in that regard is reduced.

With that said, I would encourage anyone to explore the benefits and disadvantages of both for their specific projects!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Johnathan Sanders
Johnathan Sanders

Written by Johnathan Sanders

Johnathan Sanders is an engineer at Microsoft, a veteran technologist, digital transformation expert, cloud and software architect, and polyglot developer.

No responses yet

Write a response