Skip to content

Instantly share code, notes, and snippets.

@luisbosque
Last active January 7, 2021 18:22
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save luisbosque/7c3a6f24245378fe43ff7b9af340244e to your computer and use it in GitHub Desktop.
Infrastructure @ CARTO dev technical test - DB resources usage control

DB resources usage control

Imagine you offer a service that is heavily based on PostgreSQL databases. Your users can load their own data in the database and run scientific analysis operations and custom queries against the data they have loaded previously. CPU usage on every individual operation can be very different. There are 2 different user tiers with different features, quotas, and performance level agreement.

In order to simplify the problem, let's say you only have one instance with a limited amount of CPU resources and that instance hosts 1K users. With limited CPU resources it may happen that any user can affect other user's performance.

There are many possible different solutions to this problem. From low level PostgreSQL patching to high level architecture design.

You need to find a way to manage resource allocation (CPU mainly) that minimizes the risk of affecting other user's performance for the described scenario and perform a basic implementation.

The result should be a README with all the information about your solution, including possible patches, configurations, etc.. and a step by step about how to do a demo with your code and see the results. We will also want to see a description about how you got to the solution and what would be the trade offs.

There's no need to focus on delivering a perfect documentation, code style, clean configurations, etc.. This is hacking mode, so we just need to be able to follow the steps you tell us in order to see your PoC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment