0

Recently I have a website which has a 4GB MySql database and 30,000 posts on WordPress. The average response time is 1,5 seconds without caching. I had 2 requests per second on a 4CPU / 8GB Machine and when I moved to a 32GB & 8CPU machine, nothing changed. Still, 2 requests per second and most of the RAM is used for caching. So I thought instead of having one bigger machine, setting up 4 smaller machines is better for concurrency. Is this correct? Anybody can suggest a better solution? I use Apache, PHP8 (.2), and MySql on the same server.

doraemon
  • 99
  • 3
  • 1
    Without knowledge of why you're not getting the performance you expect you're only guessing. A bigger server is good a guess for a (temporary) solution in many cases. That didn't work out? Then Horizontal scaling is a also a good guess. (But know that that is usually a fairly complicated solution to get right.) I would not go that route based on only a guess. - Please add in-depth monitoring , learn exactly what your current bottleneck is, get data and numbers. Then start with the black art of tuning ; make adjustments , collect more data , revert or keep that change, investigate further. – HBruijn Aug 03 '23 at 10:14
  • 1
    Also, some mysql optimization might make one hell of a difference - with default settings it's dead slow. At the end of the day you will need to do some profiling and testing. – Zac67 Aug 03 '23 at 10:28

0 Answers0