[meta] Make Drupal compatible with persistent app servers like ReactPHP, PHP-PM, PHPFastCGI

Created on 16 March 2014, over 10 years ago
Updated 19 December 2023, 12 months ago

Problem

Without proper caching, Drupal is SLOW, just like many extensible PHP frameworks. Despite the great cache tag feature of Drupal 8, not everything can be fully cached.
One major problem is Drupal's bootstrap is very resource-intensive. Regardless of how much time we put into optimizing it, it can only become slightly faster. The reason for this as i believe is because we're using the wrong approach. Bootstrapping the whole application for every request is just wrong. Things get even worse when one wants to use Drupal as a headless REST API for something like a progressive application with many small simultaneous requests.

Why is this critical

The web is becoming much faster and the content is extremely customized. In many cases caching just wouldn't cut it.
just to name few related technologies: Progressive Apps, HTTP2, IoT, REST, Li-Fi, 5G, etc.
With Drupal headless initiative which makes using Drupal for modern web much easier and semantic versioning which makes it possible to add many new features to core every several months, can Drupal really compete with Walled Garden ? Will 200-300ms for dynamics content acceptable for users and clients? Drupal can be used for sites with heavy traffic and dynamic content, but if we put aside how challenging it's, it can never deliver the same performance as more modern Web solutions written by likes of Node.js

I think this is important enough to become an initiative.

Solution

It's simple, not to bootstrap Drupal every time. Up until a few years ago, there wasn't any reliable solution fast enough worth the effort. But now there are several open-source projects already in production (PHP-PM, PHPFastCGI, Icicle, AppServer.io , etc). And it is fast, we're talking about 10-30ms and few kilobytes of memory usage without any caching or optimization against 100-150ms and megabytes of memory usage (The numbers come from my experiment with ReactPHP HTTP server and a custom Silex application). This is without any optimization, just changing the approach! But when the application bootstraps only once and objects are persistent, a lot of things can be greatly optimized.

Demonstration

I haven't been able to find any benchmarks for Drupal, but for other frameworks the are several :

More information on the wiki page: https://groups.drupal.org/node/417723

Work already done

There has been several attempts, discussions and experiments so far using different approaches :

Roadmap

๐ŸŒฑ Plan
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component
Baseย  โ†’

Last updated 27 minutes ago

Created by

๐Ÿ‡ญ๐Ÿ‡บHungary giorgio79

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024