multi-tenant-fairness

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

README

Multi-tenant fairness

Enqueues a backlog of 200 jobs for a big tenant, then 5 jobs for a small tenant, and runs them with Fairness: true and PerKeyLimit: 3. The small tenant finishes long before the backlog drains.

Run

docker compose -f deploy/docker-compose.yml up -d --wait postgres
go run ./examples/multi-tenant-fairness

The example connects to FOREMAN_DATABASE_URL (default postgres://foreman:foreman@localhost:55432/foreman?sslmode=disable) and recreates its own schema on every run.

Expected output

small tenant served before the backlog drained: true

Documentation

Overview

Command multi-tenant-fairness shows a small tenant served promptly despite a large tenant's backlog, with a per-tenant concurrency limit.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL