Hacker News new | ask | show | jobs
by kitsune_ 4599 days ago
Are you insinuating that Drupal lacks page caching? Because that would be a patently false statement.
2 comments

No, but Drupal's out-of-the-box page cache caches pages in... the database.

Even with pages cached in Memcache, Drupal would open a DB connection by default (it's possible to override this using page_cache_without_database, but not everyone is going to do that).

Using something like Varnish as the primary page caching mechanism would work around this, albeit with some trade-offs.

Generally though, the fault with issues like this is often that the MySQL connection limit is set lower than it needs to be. Often, this is set at a level far below that which would actually cause the DB server to become overloaded, and it just starts rejecting further connections even if capacity exists to handle more.

EDIT: typos

Without cache, Drupal would never run as it drinks database connections in the hundreds per user request.
"Hundreds per user request" is just wrong. Generally, Drupal opens a single connection per request (and does not use any kind of connection pooling). Perhaps you mean that Drupal issues hundreds of queries per connection? (Which is definitely much closer to the truth).
Yes I was going overboard but indeed it is truly hundreds of queries and sometimes numerous connections per user.

Some sites I have had to deal with on initial inspection have 250+ queries per user (sometimes the same ones over and over due to plugins/modules) and people wonder why after 10 users it breaks the database/site.

Without cache on wordpress you might be in trouble, without cache on Drupal you don't run.

Still, Drupal is orders of magnitude more useable than other PHP frameworks like Joomla. The PHP that is fun is using microframeworks like limonade, flight etc if PHP is used.