recently we migrate our website based in wordpress from a Virtual Machine to App Service to enable Auto Scale. is working fine. BUT is really slow (1,4 seconds in initial load).

we are Using: - App Service PHP - MySQL Database (AZURE, not the local one) - CDN

The only reason i could think for this slowness is the MySQL database, since connects through internet and do not have the option to add a direct connection (Like SQLSERVER Databases does).

did you know some way to optimize this?

Thanks a lot


Although the endpoint to connect MySQL is a public address, as long as the frontend and the backend are in the same region, there will be zero latency related issues between them compared to having a private address. I'd suggest getting rid of ClearDB MySQL if that's what you're using. It's not good enough for production environments. Try MySQL as VM or the new MySQL as a Service from Microsoft.

Azure App Service does not stacks up with VMs regarding performance if you're comparing 1:1 especially if you are using Apache, Nginx or any other web server platform on the virtual machines. App Service running Windows can be very slow for Php applications because they run on IIS. If you deployed App Service on Linux, performance is better, but still not as good as running on VMs, and still in preview.

One thing you can do to improve performance is to enable Cache via WP plugin. From previous work with customers, enabling page/database cache was enough to increase load speeds to almost the same level as the virtual machines.

  • but when dealing with an Rest API the database connection most of it cannot be cached... Also doing a local mysql in VM will out away the good side of using the Azure Mysql ( auto scalling etc..) – Miguel Sep 7 '18 at 11:25

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.