Skip to content

Commit 881e665

Browse files
committed
Add rate-limiting-token-bucket-leaky-bucket-implementation article
1 parent 2a2b0f0 commit 881e665

5 files changed

Lines changed: 706 additions & 1550 deletions

File tree

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@
8585
"gotk",
8686
"GSAP",
8787
"hikari",
88+
"HMGET",
89+
"HMSET",
8890
"hocho",
8991
"HSTS",
9092
"htmlcsstoimage",
@@ -250,6 +252,7 @@
250252
"tfsec",
251253
"TIMESTAMPTZ",
252254
"tktco",
255+
"topk",
253256
"toxiproxy",
254257
"Traefik",
255258
"Trino",

COVERS.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,3 +1193,25 @@ Create an image of two gardens side by side. The bounded garden has neat rows wi
11931193
### Prompt 5: The Label Filter
11941194

11951195
Design an image of a water filtration system where raw metrics flow in with many labels attached. Filters remove unbounded labels (user_id, request_id falling into reject bin). Clean, bounded metrics flow through. The reject bin overflows but the output stream is controlled. Style: filtration process, data hygiene, separation mechanics, 16:9 aspect ratio.
1196+
1197+
## rate-limiting-token-bucket-leaky-bucket-implementation
1198+
1199+
### Prompt 1: The Token Bucket
1200+
1201+
Create an image of a literal bucket being filled with tokens (coins) from above at a steady rate. Requests are hands reaching into the bucket, each taking a token. When the bucket is full, tokens overflow. When empty, hands wait. A gauge shows current token count. Style: resource allocation metaphor, flow control, capacity management, 16:9 aspect ratio.
1202+
1203+
### Prompt 2: The Leaky Bucket
1204+
1205+
Design an image of a bucket with a hole at the bottom. Water (requests) pours in from multiple sources at different rates. Water leaks out at a constant rate. The bucket smooths the chaotic input into steady output. Overflow spills when input exceeds capacity. Style: traffic smoothing, flow regulation, queue visualization, 16:9 aspect ratio.
1206+
1207+
### Prompt 3: The Sliding Window
1208+
1209+
Illustrate a window frame sliding across a timeline, with requests represented as dots. The window counts dots within its frame as it moves. Fixed windows show harsh boundaries; sliding windows show smooth transitions. Style: time-series visualization, windowing concept, temporal smoothing, 16:9 aspect ratio.
1210+
1211+
### Prompt 4: The Fair Queue
1212+
1213+
Create an image of multiple lanes (per-client buckets) merging into a single highway (backend). Each lane has its own gate (rate limit). Cars (requests) queue in their lanes. No single lane can dominate the merge. Style: traffic management, fairness enforcement, multi-tenant queuing, 16:9 aspect ratio.
1214+
1215+
### Prompt 5: The Protection Shield
1216+
1217+
Design an image of a service protected by a shield made of interconnected gates. Each gate has a meter showing capacity. Normal traffic flows through easily. A flood of malicious traffic hits the shield, most deflected, only controlled amounts passing through. The service behind remains calm. Style: defensive infrastructure, protection layers, controlled access, 16:9 aspect ratio.

_TODO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ To overlay an article title and published date on a cover image, use CSS positio
203203
- The articles list page should show tags at top for quick navigation. There's another note about this. Show the count of articles per tag unless they're all the same on the tag.
204204
- Maybe duplicate - scrunch the header and set at absolute position when you scroll down, expand back when scroll up
205205
- 404 page should show search results based on query
206+
- Times like "11:59:59" are breaking across two lines - src/content/articles/rate-limiting-token-bucket-leaky-bucket-implementation/index.mdx in "Algorithm Overview" section
206207

207208
## Reading position indicator
208209

@@ -269,7 +270,6 @@ There are two pricing variants: part-time stream and full-time stream. How to ha
269270
error-budget-policy-slo-velocity-reliability-tradeoffs
270271
event-schema-versioning-compatibility-evolution
271272

272-
rate-limiting-token-bucket-leaky-bucket-implementation
273273
release-quality-gates-automated-deployment-validation
274274
retry-storm-prevention-exponential-backoff-jitter
275275
reverse-engineering-documentation-legacy-systems

0 commit comments

Comments
 (0)