B
B
Bone2017-09-19 00:40:32
System administration
Bone, 2017-09-19 00:40:32

Loaded service in the cloud. How to limit resources for each individual user?

Hello!
The question is this: I'm making a service where users can create tasks that run in the background. Tasks are all about the same type, but can (and will) differ greatly in resource costs, depending on what the user wants to receive. Thus, some of the users can consume few resources, while others can consume a lot, respectively, I see two solutions:
1. Each user has his own limit on the consumption of CPU, RAM and disk space. This option is preferred. It is also desirable that individual users can painlessly increase the limits.
2. The user replenishes the internal account and money is debited from there depending on the consumed resources.
All this business should be in the cloud so that you can easily scale to your growing needs.
As a matter of fact, here is the question. Are there any standard practices on how to manage the load generated by each individual user in the cloud? What can I read about this, where to look?
If it helps, then the service uses python, flask, celery, mysql.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nikolayvaganov, 2017-09-19
@Bone

It depends on how much access you have in the cloud. If root, then cgroups/docker is fine.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question