Overhang.io

Horizontal scaling with Kubernetes

Hi!

I have deployed Open edX on k8s with tutor and would like to increase the number of replicas from 1 to n on the following deployments:

  • lms
  • lms-worker
  • cms
  • cms-worker
  • nginx

I believe that the lms and cms keep session data and cache in memcached, and persistent data is stored in MySQL and mongoDB. This leads me to suspect that the pods in these deployments are stateless, and scaling them horizontally should be as easy as increasing the number of replicas. Are these assumptions correct?

I have read about Open edX architecture and watched appsembler’s talk but these sources do not provide information about the tutor distribution. I also haven’t found any information about scaling in the tutor docs.

Hi @hugodutka!

I believe that the lms and cms keep session data and cache in memcached, and persistent data is stored in MySQL and mongoDB. This leads me to suspect that the pods in these deployments are stateless, and scaling them horizontally should be as easy as increasing the number of replicas. Are these assumptions correct?

Absolutely. The only “tricky” storage layer is the on-disk filesystem for uploaded files, but this is no longer used as soon as you use the MinIO plugin, as documented.

We did not document the scaling of LMS/CMS because we did not try it ourselves yet. I see no reason that it should not work out of the box. It would be great if you could post your findings here, send me an email, or even contribute a documentation change yourself :slight_smile:

Great, thank you! I will be trying to scale over the weekend and I will see how the platform performs during the following week. I’ll post my impressions here.