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.

1 Like

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.

2 Likes

Hi @hugodutka,

How was your experience doing scaling with Kubernetes. We’re looking to scale up to 10,000 users and curious to learn from you.

1 Like

@hugodutka, you ready to share your impressions?

1 Like

@hugodutka , @regis , @tuananh-pham , @ak00001 any update on this? I just wanted to know it is feasible or not? any documentation regarding that will be very helpful.

Thanks in Advance.

In my experience, it’s as easy as simply increasing the number of replicas for the service that you want to scale (e.g: lms, cms, forum).