
нечестивые пиздец просто. Victory to Ukraine | ru/eng | any pronounce | art: @steblynka
Joined March 2014
- Tweets56.6K
- Following643
- Followers369
- Likes229K
сиблинги по оружию, правители враждующих фракций, красавица и чудовище но они оба чудовища и оба красавицы, от врагов к союзникам к ?????? к врагам к разводу к союзникам
бля буду, Тралл и Джайна должны были быть канонным пейрингом
Replying to @laterlater
Это в вебе нудятина, в эмбеддеде весело!! (На пикче я после нескольких лет эмбеддеда)
Replying to @dead_ithriel
Да..... Батяпостинг который мы заслужили
Recently I interviewed a Senior Engineer.
Strong candidate.
Kafka? ✅
Redis? ✅
Microservices? ✅
Distributed systems? ✅
Then I asked:
"You're building the inventory service for a flash sale.
Only 1 item left in stock."
Two users hit “Buy Now” at the exact same millisecond.
Both requests pass the “is available?” check.
Both create an order.
Both deduct stock.
Now you’ve sold 2 items when only 1 existed.
How do you guarantee you never oversell — even with concurrent requests, client retries, and partial failures?
"Just use a database transaction."
Doesn’t fully solve it if both requests read `stock = 1` before either writes, or if the response is lost and the client retries.
"Check stock before deducting."
What happens when both checks happen at the same time?
"Use Redis DECR and reject if it goes negative."
What happens if Redis is down, or the decrement succeeds but the order is never persisted?
Your turn:
How would you design this inventory reservation API so concurrent buyers and retries never oversell the last item?
There’s a specific distributed-systems concept behind this.
And you’ll encounter it everywhere inventory, tickets, seats, coupons, and limited resources are involved.





















