Skip to content

Commit

Permalink
chore: add adr
Browse files Browse the repository at this point in the history
  • Loading branch information
Shezad Khan committed Jul 8, 2024
1 parent f6bf212 commit 1b47c5f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/decisions/2024-07-08-multiserver
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.

0 comments on commit 1b47c5f

Please sign in to comment.