3 ms·
> performant I've been away from Drupal for ~10 years, but I recently helped a friend spruce up a Drupal site he's working on and still found it's largely powe
by wbobeirne 3y ago
> performant
I've been away from Drupal for ~10 years, but I recently helped a friend spruce up a Drupal site he's working on and still found it's largely powered in production by heavy caching, and the page load speeds in development are a slog. I didn't know enough about how he built the site to know if that's still the case everywhere in Drupal or just his configuration, but my impression is still that it's absolutely not production ready without heavy caching in front of the site.
- solardev 3y agoDrupal IS slow, but many "modern" sites in JS or Wordpress are pretty heavily cached too. There's just no beating "static HTML file served over CDN, with portions rehydrated". Whether you generate that HTML in Drupal, Wordpress, or some other system, having to run code to generate it is always going to be slower than caching. Drupal is plenty fast for internal previews (i.e. when the server is not overloaded), but at the end of the day it's still a PHP app, and LAMP/LEMP is generally harder to scale up and across vs plain files. And for what it's worth, a Drupal site cached behind Acquia/Pantheon/etc and their CDN can -- usually will -- be faster than an uncached JS site served from any single data center.
- KaoruAoiShiho 3y agoSo it's slow for any dynamic site? Like if I want to use it to serve a site with user generated content recommended by AI, like a reddit or twitter it's bad for that usecase?
- solardev 3y agoDrupal? I think that would be very slow for that use case (if you want it to be real-time, as opposed to write-rarely-read-often, for a large number of users). I haven't tried to optimize it for that particular case, but out-of-the-box, the Acquia/Pantheon setups aren't really meant for something like that. You could, however, use Drupal (or any other CMS) to manage the relatively infrequently-changing parts of the website (static assets, the layout, introductory text, landing pages, much of the Javascript, etc.). And then use AJAX to dynamically fetch in the dynamic portions (the user content) from some other API. I doubt that's the best approach though... probably there are better systems for something like that. Not my specialty though, sorry =/ ------ edit: It's also very different if you're operating at reddit scale vs "small website with a few dozen comments a month" scale. If you're not expecting heavy, consistent real-time traffic, it'll probably be OK. Not as fast as it could be with better architecture, but fast enough that users will put up with it. Hell, we all did it for years with phpBB, the Drupal forums, etc.
- ksenzee 3y agoIt’s great for that use case, if - you host at one of the Drupal-optimized services (Amazee, Pantheon, Acquia) - you put a Varnish service like Fastly in front of the site - you use BigPipe to serve the dynamic content - you have experienced Drupal engineers available for your project If you’re missing one of those pieces, I’d recommend pretty strongly that you find a different platform.
- solardev 3y agoWhat in this stack allows mass real time writes and cache invalidations? Bigpipe looks like it chunks data from the server to the client, but it's not clear to me how that helps with real time updates to the database? Varnish can help to a degree, but if you're on a big provider you're going through their Varnish setup anyway (among other caches) and it's not super configurable.
- ksenzee 3y agoDrupal 8 introduced an entirely new caching system, with actually good cache invalidation. Right now if I save new content on one of my sites, it queues an invalidation request that gets sent to Varnish (which can be run either as a shutdown function or via a queue runner on cron) and the new content shows up within seconds. I’m not sure I read the OP the same way you did. If you read it as “can I build a site on the scale of Reddit or Twitter with Drupal” then no, don’t build Reddit or Twitter with Drupal. If you read it as “will Drupal serve a site with user generated content” then yes, it will, but if you’re planning to be a top 10 site on the internet, you’ll need a custom stack.
- solardev 3y agoGotcha. Thanks for the clarification! > if you’re planning to be a top 10 site on the internet, you’ll need a custom stack. And yeah, that's what I thought the OP was hinting at (or at least hoping to become). It'll handle small-medium scale forums just fine. Probably any stack would.
- 3y ago
- ksenzee 3y agoRight, the caching is how you get the performance. Ideally you’re behind, say, Varnish. (Like I said, it’s not a hobbyist platform anymore IMO.) There’s pretty slick cache invalidation now, so you can set up Varnish with long cache lifetimes, and still get near-instant updates as authors save content.