1

We have what appears to be a very large website. We have a strong content strategy which has led us to develop a huge number of pages (over 10k) for our website, as well as building out a significant amount of internationalized pages (over a dozen). We're currently on Craft 2 and working on migrating to Craft 3. As part of that, I figured we'd re-evaluate our current hosting strategy. However, all the hosts I've spoken with have agreed that our situation is unique relative to their other customers.

Here's our 2GB database breakdown (with removal of smaller sections):

+--------------------------------------+-----------+
| Table                                | Size (MB) |
+--------------------------------------+-----------+
| searchindex                          |    868.14 |
| content                              |    728.73 |
| entryversions                        |    215.70 |
| elements_i18n                        |    194.59 |
| matrixcontent_comparisonpagetablerow |     10.72 |
| structureelements                    |     10.52 |
| elements                             |      6.97 |
| entrydrafts                          |      5.58 |
...
+--------------------------------------+-----------+

We currently host on Digital Ocean through Forge. We have a 4vCPU CPU optimized server with 8GB of ram.

What we find is that things like assets are slow, navigating the admin is slow, etc etc. Without fastcgi caching, the entire website would be very slow.

Should we just throw more CPUs at it? What's the ideal solution to really improve performance for such a big website? I'd prefer not to have to get super complex with our hosting strategy (ie break out database, have a read-only database, use a caching layer in front, etc), but if that's what's necessary I'd consider it.

4

"Digital Ocean through Forge" is a good solution. Sounds like you're on a well-powered droplet as well.

I'd recommend moving your assets into the cloud to speed things up a bit. Something like Amazon S3 with CloudFront.

Honestly, the biggest drag is probably the use of multiple locales. Craft is making duplicates of pretty much all of the content in your database, whether you need it or not. It's also contributing to the massive size of your database.

Anecdotally... I recently removed 11 of 12 languages in a Craft 2 site (leaving only a single locale), and it reduced the size of the database by close to 90%. It made the transition to Craft 3 much, much easier.

Lastly, I'd recommend asking this question in the #devops channel on Discord. Lots of smart folks in that channel who would be able to give you even better advice than I can.

  • We already have assets on S3/Cloudfront :) - Thanks for the recommendation on #devops. I also think I'll do an evaluation of the languages that are unnecessary or aren't converting and remove them. – hisnameisjimmy Oct 25 at 20:40
  • 1
    Sounds good. At a glance, seems like the languages are the heart of your problem. – Lindsey D Oct 25 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.