2

I use Moodle on centos7 with Php, Mariadb, Nginx. There are huge number of users that use this Moodle. If the number of users grows more than 300user per sec, the Moodle has delay in response and seems to be hanged!

I read about:

  • Galera (multi master clustering with 3nodes)

  • slave-master (separate read and write)

  • MaxScale

  • increase ram and cpu (I have up to: 288GB ram, 24coreCPU, SSD drive)

What is the best practice to serve huge number of requests without delay? How can I scale my database (because it is the bottleneck)? I want scale it for serve huge request (most of them is read from database)

m.Azadi
  • 23
  • 4

2 Answers2

2

Obviously you can do generic MySQL/MariaDB tuning first, and use a recent version of Moodle (3.7 is current right now)

After that, one thing you can check is how you have sessions implemented.

https://docs.moodle.org/37/en/Session_handling

This page also has many more tips:

https://docs.moodle.org/37/en/Performance_recommendations

2

MariaDB (and MySQL) can scale 'infinitely' for reads by using Replication and sending read requests to Slave servers.

500 connections per second is very high. (But I don't know what the practical limit is.)

There are several extra tools that can do "connection pooling". Search for this; it may let you go well past 500 logical connections on a single server.

In the case of Galera, you could have 3 read-write nodes, plus any number of Slaves hanging off each of the 3.

For simple Master-Slave, there can be any number of Slaves hanging off the one Master.

Rick James
  • 135,179
  • 13
  • 127
  • 222