I have a wordpress website that has gotten too big for a single server. I need to decide whether I should host the database externally i.e. purchase another server for the DB or if i should host the images on a CDN.
Moving the DB externally is the quickest and easiest solution. It will lower I/O and RAM usage which will help a lot. On the other side moving all the images to another server (i am thinking about using AWS S3 bucket) will mean a lot less requests to the core server and I wont have to separate the site and DB. This is of course a highly complicated procedure since there are other community based tools on the site that allow people to upload images.
It would seems as though moving the images over to S3 would give the best benefit since there are 15+ images on most pages when you account for "recent posts" and stuff in the sidebar. However, since browser caching is enabled, this might not be as significant as it might initially seem. Due to the dynamic, user driven nature of this site, i am unable to cache DB queries since most contain a join to the users table where ID = session value. For this, i think that the DB may benefit best. The drawback of course being that moving the DB away from localhost means I need to make a request across the internet. It is not possible right now to store the DB in a cluster or any internal network. The DB will be on a remote server and i will use its public IP to communicate.
Generally speaking, for the average website, what will provide the best benefit if you can only choose 1. Moving all images to a remote location and serving them via a subdomain e.g. images.mysite.com or should i move the DB to its own dedicated server?
I currently have a dedicated standalone server with a 2TB disk, 8 core xeon @2.7ghz and 16GB ram. I have unlimited bandwidth on a 100mb connection. The cost of upgrading to something bigger is crazy money, i could more multiple of the same server i have now for the same price. It appears that apache and mysql are hogging most of the CPU, but apache serves all the images, so this is where my issue lies.