-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Shezad Khan
committed
Jul 8, 2024
1 parent
f6bf212
commit 1b47c5f
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
Date: 2024/07/09 | ||
Authors: @Xopherus, @shezadkhan137 | ||
Status: Accepted | ||
--- | ||
|
||
# Multi-Server Fair Weighted Queues | ||
|
||
## Context | ||
|
||
ZeroFox needs to prioritize messages within SQS queues, especially when services receive data from multiple sources with varying latency requirements. Prioritization is key to meeting SLAs for high-priority messages while ensuring lower-priority messages are not starved. Additionally, we need to dynamically allocate throughput based on message priority to ensure fairness and efficiency. | ||
|
||
## Decisions | ||
|
||
1. Implement an experimental Weighted Fair Queue algorithm as a decorator for the go-msg library (receiver). | ||
This decorator, called `WeightedFairReceiver`, will enable message prioritization based on assigned weights. | ||
|
||
2. Implement a `MultiServer` wrapper around `WeightedFairReceiver`. | ||
This server will consume messages from multiple underlying servers into a single receiver, guaranteeing consumption in proportion to assigned weights. |