Dev Enock retweeted
1/ My complete System Design notes, handwritten, in one place
2/ Part 1 – Core concepts: monolithic vs distributed, latency, throughput, availability, CAP theorem, scalability, load balancers.
3/ Part 2 & 3 – Caching, cache eviction, normalization, indexing, N+1, NoSQL, replication, sharding, consistent hashing.
4/ Part 4 & 5 – Sync vs async, WebSockets, auth & JWT/OAuth, API gateway, rate limiting, circuit breaker, distributed locks.
5/ Read all 20 chapters in order here:
claude.ai/artifact/J2gNaifjr…
Repost if it helps someone prepping for interviews
Dev Enock retweeted
We finally signed to the contract today, Big big client with lots of expectations, kick off on Monday, will be in the hunt for like 2 roles which i will share here
Dev Enock retweeted
Hosting a private event?
@event_parlour now supports Attendee Approval!
Guests request to join, organizers review their requests, and approved attendees receive an email confirmation.
You stay in control of who gets in. 🎟️
Dev Enock retweeted
Ranking millions of players in real time is brutal in SQL. Redis sorted sets keep the ranking live: O(log n) to insert a new score, O(log n) to fetch rank, instant top-N reads.
Dev Enock retweeted
A huge thank you to @Google for sponsoring #GopherConAfrica2026
Your support helped bring together Go devs from across the continent to learn, connect, and build. None of this happens without partners who believe in growing the African dev ecosystem.
Thank you, @Google!
#Go
Dev Enock retweeted
RabbitMQ deletes a message once it is acknowledged. Kafka appends it to a log and leaves it there for as long as retention says. That one difference drives most of the choice.
Dev Enock retweeted
Officially launched @event_parlour 📌
With 200 + users,
Got accepted at Claude,Neon and Atlasflow for startups🎉
Dev Enock retweeted
Designed a Distributed Rate Limiter as part of my System Design practice. 🚀
Here is how I would design one for a distributed API system.
1. API Gateway
Apply rate limiting at the API Gateway. This allows us to reject requests before they reach backend services.
2. Token Bucket Algorithm
Use the Token Bucket algorithm.
It allows clients to send short bursts of requests while keeping their average request rate within the configured limit.
3. Redis Cluster
Store token bucket state in Redis.
All API Gateway instances use the same Redis state. This prevents each instance from maintaining a separate request count.
4. Redis Lua Scripts
Use Lua scripts to make token refill and request validation atomic.
This prevents two requests from consuming the same available token at the same time.
5. PostgreSQL
Store rate limit rules in PostgreSQL.
For example:
100 requests per minute.
5,000 requests per hour.
Different limits for different API keys or endpoints.
6. Kafka + Transactional Outbox
When an admin changes a rate limit, save the change and an event in the same database transaction.
A background worker reads the event and publishes it to Kafka.
All API Gateway instances receive the update and refresh their local configuration.
7. Local Configuration Cache
Each API Gateway keeps a local copy of the rate limit rules.
This avoids a database query for every API request.
Important design trade-offs:
1. Shared Redis State vs Local State
With Redis, all API Gateway instances use the same token bucket for a customer.
This helps enforce one common rate limit across all gateways.
However, every request needs to contact Redis. This adds network latency and increases Redis traffic.
With local state, each gateway maintains its own token bucket.
This removes the Redis call, but each gateway has an independent limit. A customer can exceed the intended global limit by sending requests through different gateways.
2. Centralised Token Buckets vs Local Token Leases
With centralised token buckets, every request checks Redis before it can proceed.
This provides more accurate rate limiting, but increases the number of Redis calls.
With local token leases, a gateway reserves a batch of tokens from Redis and uses them locally.
This reduces Redis calls, but some reserved tokens may remain unused on one gateway while another gateway needs them.
We gain lower latency, but give up some flexibility in how tokens are shared.
3. Fail Open vs Fail Closed
What happens if Redis becomes unavailable?
Fail open: Allow requests without checking the rate limit. The API remains available, but customers may exceed their limits.
Fail closed: Reject requests because the rate limit cannot be checked. This protects our infrastructure, but valid customers may lose access.
The choice depends on the cost and risk of allowing unchecked requests.
4. Global vs Regional Token Buckets
With a centralised Redis cluster, all regions share the same token bucket for a customer.
This provides a common view of token usage, but requests from distant regions may have higher network latency.
With regional token buckets, each region maintains its own bucket and quota.
This reduces network latency, but unused tokens in one region cannot automatically be used by another region.
A shared global limit requires coordination between regions, which adds latency and complexity.
Key takeaway:
System design is not only about choosing the right components.
It is about understanding what we gain, what we give up, and why a particular design makes sense for our requirements.
Dev Enock retweeted
Container running deployment done!
Silent payload bugs had my FastAPI returning 200s for bad data—DictVectorizer was just silently dropping unknown categories while Pydantic checked types.
Validate your inputs, people!github.com/devotuoma/machine…
Dev Enock retweeted
Thank you @engineersincode for joining @event_parlour , join their community on event parlour and follow up on their events and updates !
engineersincode.eventparlour…
Dev Enock retweeted
Heads up @event_parlour been approved for neon DB for startups, thank you so much for the support @neondatabase 🩷🫶
Dev Enock retweeted
Module 3 of #mlzoomcamp ✅
Logistic regression for lead conversion → 0.645 val accuracy.
TIL: dropping annual_income gave 0.724. Unscaled income (~54k) swamps L2-regularized LR, and StandardScaler gets 0.728.
Thanks @Al_Grigor @DataTalksClub 🙏 github.com/devotuoma/machine…
Dev Enock retweeted
Heads up @event_parlour just got accepted on Claude for Startup 🎉🥁
Thanks @claudeai time to ship 🚀🚀































