I am evaluating a few different CMS solutions for my company's new website. Everything about Craft looks great according to my research. After installing version 3 onto an Azure App Service Linux instance I'm growing concerned about the viability, though, due to poor performance. The control panel is taking at least 4 seconds TTFB regularly. The "Welcome Thanks for installing Craft CMS!" default page is taking about 3 seconds TTFB consistently.
I've ensured I followed the installation and setup steps properly. I've ruled out a network issue. I've run the installation in an App Service plan that far exceeds what should be required for even moderate performance. After running the (very awesome) diagnostic tool it seems that the twig rendering is mostly to blame, although my DB queries aren't running as quickly as I would hope. That might just be due to an undersized MySQL instance on Azure. I can deal with that if I get the more blatant twig issues resolved.
I've run non-Craft php web pages from the instance and they return very quickly, sub 100ms. So I don't think the php or webserver installation that Azure provides is fundamentally bad. I'm banging my head against the wall at this point. Can someone shed any light on next steps? I really want Craft to be an option for our new platform, but I can't sell it to the stakeholders unless I can make it significantly more performant.
Thanks for any help you can offer.
Please see the performance results below.
- PHP version 7.4.9
- OS version Linux 5.4.0-1031-azure
- Database driver & version MySQL 220.127.116.11
- Image driver & version Imagick 3.4.4 (ImageMagick 6.9.10-23)
- Craft edition & version Craft Pro 18.104.22.168
- Yii version 2.0.40
- Twig version v2.14.3
- Guzzle version 7.2.0