Pinned Tweet
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.
Recently I interviewed a Senior Engineer.
Strong candidate.
Kafka? β
Redis? β
Microservices? β
Distributed systems? β
Then I asked:
βYouβre building the system that generates unique short links (like bit.ly).
Users are creating thousands of links per second.β
Two requests arrive at the exact same millisecond.
Both generate the same short code βx7k9pβ.
Both try to insert it into the database.
Both succeed in writing the mapping.
Now two completely different long URLs point to the same short link.
How do you guarantee every short code is unique β even with concurrent requests, retries, and multiple service instances?
βJust generate a UUID.β
UUIDs are long and ugly. Users want short, memorable codes.
βCheck if the code exists, then insert if not.β
What happens when both checks see βdoes not existβ at the same time?
βUse Redis SETNX.β
What happens if Redis is temporarily unavailable, or the set succeeds but the DB write fails?
Your turn:
How would you design this short-link generation service so concurrent requests never produce duplicate codes?
Thereβs a specific distributed-systems concept behind this.
And youβll hit it every time you need guaranteed uniqueness under concurrency (usernames, referral codes, coupon codes, order IDs, etc.).
2
4
374
Unpopular opinion:
AI wonβt replace software engineers.
It will replace engineers who only know how to write code and canβt explain system design, trade-offs, or why something should exist.
7
12
580
If the interviewer says βdesign Twitterβ
and you start drawing boxes immediately, never do this:
- Jump straight into microservices
- Start with the database
- Say βIβd use Kafkaβ
Instead say:
3
7
1,095
Hey @grok , If Apple is just selling
iPhones and MacBooks to rich people,
how is it still the largest company in the world
β bigger than Microsoft and Google,
which are used by almost everyone?
4
8
584
Tier-3 college β Amazon SDE-2 (L5) at ~64 LPA! π
3.5 YOE from PocketFM, landed the offer via referral. Skills > college tag β always. π₯
Unpopular opinion:
Weβre burning tokens on coding and dev work. The real use of AI is curing cancer and other diseases.
2
219
Mid-level engineer: βWe should use Kafka for this.β
Senior engineer: βWhatβs the actual throughput and what happens if this fails?β
The biggest jump in interviews isnβt more knowledge.
Itβs asking better questions.
1
7
1,037
If the interviewer asks βHow would you design Instagram?β
and you immediately start talking about microservices, youβve already lost.
Most candidates fail because they design before they understand the problem.
Spend the first few minutes asking about scale and what actually matters.
6
405
Hey @grok,
with AI writing more and more code,
what system design skills will still matter
the most for software engineers in the next 3 years?
1
2
698
THE DIFFERENCE BETWEEN A MID-LEVEL AND SENIOR ENGINEER IN INTERVIEWS:
Mid-level: βIβll use Redis for caching.β
Senior: βWhat are the read/write patterns and whatβs the acceptable staleness?β
Stop naming tools. Start asking better questions.
4
15
2,306
Unpopular opinion:
Most engineers fail system design interviews not because they donβt know the concepts.
They fail because they start designing before they understand the requirements.
Always spend the first 5 minutes clarifying scale, constraints, and what actually matters.
6
8
497
BREAKING: Nvidia CEO Jensen Huang faces removal calls after second affair report.
WSJ says board preparing to oust him following NYT report of a relationship with VP Kimberly Powell (who reports to him), on top of his admitted affair with Alice Huang β an executive U.S. officials suspect is a Chinese spy. Stock has tanked, investigations are underway, and succession risk is now front and center.
@grok confirm this news
1
6
719
Mansi π©βπ» retweeted
Hey @grok , Who is this Indian man next to Jensen Huang β and is he being groomed as the next CEO of NVIDIA?








