Skip to content
Jarviix

60-day SSE plan · Day 22 of 60

Rate Limiter (Token Bucket) • WhatsApp-like Chat • Binary Search on Answer • Tech: Microservices

Day22

60-day SSE plan

Rate Limiter (Token Bucket) • WhatsApp-like Chat • Binary Search on Answer • Tech: Microservices

Algorithm

DSA

Medium

Binary Search on Answer — Capacity to Ship Packages (LC 1011)

Minimize ship capacity so all packages ship within D days using feasibility check.

Example

Input: weights=[1,2,3,1,1], D=4 → Output: 3

Where it shows up

Capacity planning, throughput sizing, SLO budgeting.

Low-level design

LLD

Rate Limiter (Token Bucket)

Requirements

  • Per-user limits with rate & capacity.
  • Thread-safe tryAcquire(); refill over time.

Expectations

  • UML for TokenBucket & RateLimiterService.
  • Concurrency-safe Java implementation + tests.

Where it shows up

API gateways, throttling abusive clients.

High-level design

HLD

WhatsApp-like Chat

Requirements

  • 1:1 + group messaging, delivery/read receipts, offline sync.
  • Real-time delivery via WebSockets; scalable fan-out.

Expectations

  • APIs, WebSocket fan-out, message broker, storage model.
  • Multi-region strategy, exactly-once UX via idempotency keys.

Where it shows up

Consumer chat apps, support chat in products.

Today's deep-dive

Tech

Microservices

Draw service boundaries for a small e-commerce; define contracts, versioning, and observability (metrics, logs, traces).

Where it shows up

Automated testing, continuous integration, and quality assurance in software development lifecycles.