How many users can a single kolibri Instance host
For instance a PC with 8 GB RAM and Core i7
Also whats the most effective way to increase number of users by kolibri Instance
Does increasing hardware specifications automatically increase number of users !
Hello @Masomotele I’m afraid I’ll have to respond that “it depends”.
In Frequently Asked Questions — Kolibri User Guide you can see a pdf with recommended hardware configurations and a spreadsheet with checked installations.
Increasing hardware specs will increase the number of users if no bottlenecks are in the middle.
Main points to bear in mind:
- Concurrency: if you don’t have simultaneous users, the limit is in your hard drive capacity, that could be thousands of users but that’s not going to happen if multiple need to access to the database at the same point.
- Operative System and deployment: Kolibri is made in Python, Python is limited to one process at a time, so having more cores in your cpu won’t improve it… unless you deploy it using some wsgi implementation as uwgsi or Gunicorn that are able to launch multiple processes of the server. Default installation of kolibri is a python standard application so it’s only one process at one time.
- Networking: if you have your clients connected to the server using wifi you’ll have to divide your wifi bandwidth by the number of users. Your server capability will be quite limited. In this case it’s very recommended to connect the server to the wifi access point using a cable, and clients can use wifi without adding this bottleneck.
There are many other elements to consider that can affect. With your server, if you have a good networking you should be able to handle around 100 concurrent users without much problem , but it’s still something that can’t be ensured as… it depends
Hope this helps.
José
Hi @jredrejo
I had a look at your FAQ’s and I am looking for some info on hosting multiple users that will span 100-1000 and 1000-10000 users for online instances. Do you have any hardware recommendations for this sort of usage. What is your recommendation of maximum users per instance. I am guessing it may make sense to split into multiple servers and load balance.
Kind Regards,
Guy
Hello @Guy,
It depends on several factors. The total number of users is less important than how many are on the site concurrently. Other factors, like visibility of coach reports or the type of content being accessed, can also impact bandwidth, CPU, memory, and other server needs.
Based on LE’s experience with server maintenance, I would recommend moving to the cloud for the usage you’re describing. The cloud offers flexibility in fine-tuning resources and handling traffic spikes, such as those during exam preparation or teacher training sessions.
If you expect thousands of concurrent users, a load balancer is essential. For hundreds of users, I suggest configuring Kolibri to use a PostgreSQL server, which handles concurrent writes much better than the default SQLite option (good for reads, less so for writes).
In any case, I strongly advise consulting with an expert engineer who can assist with your cloud/server setup. Managing such a large user base will require dealing with additional network protocols and applications like Nginx/Apache, uWSGI, etc.
Hope this helps,
José
Hello @jredrejo Thank you for the quick and detailed response, I am one of the engineers on the team, my question was far too vague, apologies. We will not be starting with more than a 100 users. So a cloud solution would be ideal to see how that goes and to grow from there. I guess we can test and see how things go. I was hoping for some rough guidelines on concurrent usage and I realise there are many nuances to this e.g would it may be better, cost effective or efficient to run a few smaller instances that are load balanced vs say two large memory intensive instances. I realise this depends on many things. Any info you may have in your experience will at least help us to determine a few starting points to test with. We will definitely be using PostgresSQL.
Hello @Guy,
For 100 concurrent users, I wouldn’t set up a load balancer. A single good instance with a uWSGI setup that allows multiple threads (to utilize all available cores on the machine) should be sufficient.
If you can resize PostgreSQL as needed to prevent the database from becoming a bottleneck, I believe that’s a setup that balances simplicity with efficiency.
I wouldn’t recommend setting up multiple instances and load balancers in this case. If your user base grows significantly, you’ll need them, but in the meantime, you’ll save time, money, and avoid unnecessary complications. The filesystem can be an issue in these scenarios, as you’ll need to have shared folders among all instances to store content or enable some kind of replication for this. LE has some setups with load balancers where NFS is used in these cases.
In case it helps, this kind of configuration, like the one found at kolibri-server repository is similar to what we use in some of our setups (currently Kubernetes is used for deployment, but the uWSGI/Nginx configurations are based on this).
Best
José
Hello @jredrejo Thank you, this is exactly the kind of information that is needed. Appreciate all that you and the rest of the Kolibri team are doing!
Best Regards,
Guy