News for hackers. Stuff that matters.
Re:Building a fair multi-tenant queuing system by paulddraper on Monday January 22, 2024 @02:48PM (#39094416)
The solution is to maintain two queues.

One queu is your normal queue.

A second queue that is your tenant queue (one record for each tenant that has queued items).

You select from your tenant queue, then select from your normal queue. All the while keeping your tenant invariant (one record for each tenant that has queued items).

---

It's certainly more complex but no one said that fair was easy.

There are no comments on this comment yet.