Introducing a credit-based system to control JupyterHub resource usage

Hey,

managing resource usage in JupyterHub can be tricky. While allow_named_servers = False lets every user start one server, there are few fine-grained mechanisms available to control usage. The JupyterHub Credit Service ( JupyterHub Credit Service ) introduces a credit-based system directly into JupyterHub. By using a customized Authenticator + Spawner, each user receives a configurable number of credits, and each server costs a certain number of credits (also configurable per Spawner).

This allows administrators to fine-tune how resources are used:

  • Give well-known users more credits so they can fully utilize the resources.

  • Assign fewer credits to new users to let them explore the setup without consuming too much.

  • Charge more credits for high-demand resources like GPUs or high-memory servers, while smaller servers cost fewer credits.

The service is designed to integrate easily into existing JupyterHub infrastructures. It does not charge for actual resource usage like jupycost. Instead, it limits usage based on the resources a server reserves (e.g., via Kubernetes resources.requests).

Please let me know what you think about this “extension”. Might this be a relevant addition to JupyterHub? Do you have ideas how to improve it? Do you know use-cases where this might be helpful?

4 Likes