System Design: Building a Payment Gateway and Double-Entry Ledger for 100M Daily Transactions

System Design: Building a Payment Gateway and Double-Entry Ledger for 100M Daily Transactions

I recently broke down the system design of a payment gateway and double-entry ledger platform handling 100M daily transactions (~5,800 peak write TPS).

The article focuses on the real-world engineering challenges: stopping accidental double-charges with distributed idempotency locks, enforcing strict double-entry bookkeeping (Debits = Credits) using insert-only tables, recovering from card network timeouts without duplicate charges, and running midnight three-way reconciliations against bank settlement files.

For those who have built financial or checkout infrastructure: what was your biggest challenge in production? How do you handle partial failures and asynchronous discrepancies across multiple bank networks?

medium.com
u/RummanSid1990 — 12 days ago

The reason ChatGPT keeps giving you generic answers and how to fix it

If ChatGPT's writing feels robotic or misses the mark, it’s usually because the prompt is forcing the AI to guess what you actually want. I put together a quick breakdown of how to fix this using a simple 4-step checklist (Audience, Scope, Format, Purpose) to stop the AI from guessing.

I'd love to hear from you all. What is the most frustrating or generic response you consistently get from ChatGPT? Have you found any specific prompt tweaks that actually fix it for you?

reddit.com
u/RummanSid1990 — 1 month ago

Shared AI chats are not as private as people think

I wrote about how AI share links can expose conversations beyond the intended recipient. The key point is that a private chat and a shared-link snapshot are not the same thing. Even when search engines do not index a page, anyone with the URL may still be able to view, copy, screenshot, or repost it.

Curious how others handle this: do you review old ChatGPT, Claude, or Grok shared links, or avoid using them entirely?

medium.com
u/RummanSid1990 — 1 month ago
▲ 3 r/microservices+1 crossposts

Designing a ride-hailing backend for 250k location writes/sec, without double-booking drivers

Wrote this deep-dive looking at spatial indexing trade-offs, managing ~3M persistent WebSockets, and atomic driver matching at scale.

The trickiest architectural decision was handling Redis failovers: if primary crashes right after a Lua reservation script executes, do you pay the latency penalty for Redlock, or accept the failover race and let an optimistic lock in Postgres catch the collision?

Curious how folks here handle this consistency-vs-latency trade-off in high-throughput dispatch systems.

medium.com
u/RummanSid1990 — 1 month ago
▲ 2 r/microservices+1 crossposts

System Design: How to build a Chat System for 50M Users (2B Messages / Day)

I recently broke down the system design of a chat architecture handling 50 million daily users and 2 billion messages a day. The article skips the generic stuff and focuses on the messy parts: tracking active connections, surviving dropped network retries without duplicating messages, and keeping multiple devices in sync.

For those of you who have had to scale real-time systems, what was your biggest "this architecture isn't going to hold" moment? How did you end up managing the chaos when millions of connections hit at once?

medium.com
u/RummanSid1990 — 2 months ago
▲ 7 r/softwarearchitecture+1 crossposts

The 3 AM API Outage: Why Every API Needs a Rate Limiter

Adding more servers during a sudden traffic spike is a trap. I wrote a quick breakdown on why you have to block bad traffic early with a Redis rate limiter, rather than just auto-scaling and waiting for the database to crash.

How do you guys handle bad traffic and rate limiting in production?

medium.com
u/RummanSid1990 — 2 months ago
▲ 0 r/softwarearchitecture+1 crossposts

Everyone thinks URL shorteners are easy to build until they crash

I always thought building a URL shortener was a basic weekend project, but creating the link is the easy part. The real issue is when a link goes viral and your database gets overwhelmed by read traffic. 


I wrote this breakdown on how to survive heavy traffic by separating read/write traffic, handling database collisions, and stopping cache stampedes. 


Would love to hear how you all handle database bottlenecks like this!
medium.com
u/RummanSid1990 — 2 months ago