Ritesh Roushan

7.4K posts

Ritesh Roushan banner
Ritesh Roushan

Ritesh Roushan

@devXritesh

Building prod-grade backend systems at scale 🇮🇳 • System Design • Microservices • AI Infra • Real prod lessons | Founder: The 1% Engineers

172.16.0.1 Присоединился Şubat 2018
748 Подписки1.2K Подписчики
Ritesh Roushan
Ritesh Roushan@devXritesh·
@Inosukeei_coder These types of DSA problems asked in Big tech. Just need practice and get the job .
English
0
0
0
2
Inosuke
Inosuke@Inosukeei_coder·
@devXritesh Amazing breakdown bro 🔥, & Here i understood they used trie data structure & also top k frequent concept we see this type of problems on many platforms.
English
1
0
1
4
Ritesh Roushan
Ritesh Roushan@devXritesh·
🧠 Google autocomplete is straight-up sorcery. You type just "how to..." And it instantly drops: • how to make money • how to cook pasta • how to tie a tie This happens across 16.4 BILLION searches every single day in 2026. How the hell does it return perfect suggestions in under 100ms at this scale? Deep technical breakdown 👇 1. Trie (Prefix Tree) - The Magic Data Structure Every character is a node in a tree. Typing “h-o-w- -t-o” walks straight to the exact prefix node in O(K) time (K = length of input). No scanning billions of queries just instant pointer to all completions. 2. Precomputed + Smart Ranking Offline pipelines crunch trillions of past searches daily. Each trie node stores top-K suggestions pre-ranked by: • Frequency & trends • Click-through rate • Personalization (your history) + location + freshness ML models keep everything updated in real-time. 3. Production-Grade Scaling • Sharded & replicated across global data centers • In-memory layers (custom + Redis-style caching) for hottest prefixes • Edge/CDN caching + microservices load balancing • Handles 100,000+ queries per second with p99 latency <100ms This exact pattern powers autocomplete on LinkedIn, Amazon, YouTube anywhere you see instant suggestions. Backend & system design devs: this is the gold standard. Saved this thread? Drop 🔥 below. What Google feature should I break down next?
Ritesh Roushan@devXritesh

As a developer, Have you ever wondered : You type just "how to" in Google search and it instantly shows full suggestions like "how to make money", "how to cook pasta" etc... There are 8.5+ billion searches globally every day. How is this autocomplete so fast?

English
1
0
4
36
Ritesh Roushan
Ritesh Roushan@devXritesh·
Here is the solution 👇 x.com/i/status/20348…
Ritesh Roushan@devXritesh

🧠 Google autocomplete is straight-up sorcery. You type just "how to..." And it instantly drops: • how to make money • how to cook pasta • how to tie a tie This happens across 16.4 BILLION searches every single day in 2026. How the hell does it return perfect suggestions in under 100ms at this scale? Deep technical breakdown 👇 1. Trie (Prefix Tree) - The Magic Data Structure Every character is a node in a tree. Typing “h-o-w- -t-o” walks straight to the exact prefix node in O(K) time (K = length of input). No scanning billions of queries just instant pointer to all completions. 2. Precomputed + Smart Ranking Offline pipelines crunch trillions of past searches daily. Each trie node stores top-K suggestions pre-ranked by: • Frequency & trends • Click-through rate • Personalization (your history) + location + freshness ML models keep everything updated in real-time. 3. Production-Grade Scaling • Sharded & replicated across global data centers • In-memory layers (custom + Redis-style caching) for hottest prefixes • Edge/CDN caching + microservices load balancing • Handles 100,000+ queries per second with p99 latency <100ms This exact pattern powers autocomplete on LinkedIn, Amazon, YouTube anywhere you see instant suggestions. Backend & system design devs: this is the gold standard. Saved this thread? Drop 🔥 below. What Google feature should I break down next?

English
0
0
0
7
Ritesh Roushan
Ritesh Roushan@devXritesh·
As a developer, Have you ever wondered : You type just "how to" in Google search and it instantly shows full suggestions like "how to make money", "how to cook pasta" etc... There are 8.5+ billion searches globally every day. How is this autocomplete so fast?
Ritesh Roushan tweet media
English
15
1
22
343
Ritesh Roushan
Ritesh Roushan@devXritesh·
@LuckyGoldx They have used Trie data structures and edge caching to serve this massive results.
English
0
0
0
14
LuckyGold🏅
LuckyGold🏅@LuckyGoldx·
..autocomplete looks up your keystrokes in a massive prefix tree stored in memory across data centers. edge servers cache the hottest prefixes, rank them by popularity/context, and return top results in milliseconds, no full web search needed. with 8.5 billion daily queries, they pre-compute and shard the index for speed.
English
1
0
1
21
Ritesh Roushan
Ritesh Roushan@devXritesh·
@shub0414 It's trie DS and edge cache is real game in this massive result.
English
0
0
0
11
pravinemani
pravinemani@pravinemani·
@devXritesh I assumed it was tries as well, the comments confirmed that:)
English
1
0
1
14
Rowan
Rowan@knowRowan·
@devXritesh Google's autocomplete runs on tries + massive caching
English
1
0
1
18
Shub
Shub@shub0414·
html ↓ css ↓ javascript ↓ git & github ↓ react ↓ node.js ↓ express ↓ mongodb ↓ rest apis ↓ authentication (jwt / oauth) ↓ typescript ↓ next.js ↓ docker ↓ ci/cd congrats you are a full-stack developer now
English
28
1
35
349
Ritesh Roushan
Ritesh Roushan@devXritesh·
@0xlelouch_ Throughput is limited by partition parallelism. Adding consumers beyond partition count doesn’t help. Also check processing latency per message could be the real bottleneck.
English
0
0
2
363
Abhishek Singh
Abhishek Singh@0xlelouch_·
Your Kafka consumer is processing messages very slowly. Increasing consumer count from 3 to 10 doesn't help. Why not and what's the bottleneck?
English
9
4
57
9K
Ritesh Roushan
Ritesh Roushan@devXritesh·
@SumitM_X I’d rebase. Keeps history clean and avoids a messy merge commit. But only if the branch isn’t shared otherwise, merge to avoid rewriting history.
English
0
0
0
310
SumitM
SumitM@SumitM_X·
Your feature branch has 50 commits. Main has moved ahead with 300 commits. What will you do: Rebase your branch or merge main into your branch?
English
19
0
40
7.5K
ChillxLife
ChillxLife@ChillxxLife·
@devXritesh Trie data structure 🤧 Last topic of DSA 💀🤧
English
1
0
2
26
Ritesh Roushan
Ritesh Roushan@devXritesh·
@thekevinqi DS using trie + edge cache for faster lookups and result serving
English
0
0
1
21
Ritesh Roushan
Ritesh Roushan@devXritesh·
@Itstheanurag Totally agree! Diversifying from field experts > one creator grind. Unemployed dev wisdom hits different .
English
0
0
1
12
gaurav
gaurav@Itstheanurag·
See i believe if you want to learn something learn from the experts in that field. Learning about databases from ezsnippet would be stupid if Hussain nasser and arpit bhayani exist. Learning DSA from code with Harry would be stupid if kunal's videos exists. Learning rust from technical thapa would be stupid if let's get rusty exists. The point is stop working one guy, everyone on YouTube has something they are best known for. By not following them all you are hindering your progress. You are learning things from the top layer only but never from the core of it. Thanks for this matter, an unemployed dev and not the president of United States.
English
2
1
10
116
Inosuke
Inosuke@Inosukeei_coder·
30 tech companies with massive workforce + strong engineer pay.. - Amazon — 1,576,000 employees — SWE avg pay: ~$190k–$230k . - IBM — ~270,000 employees — SWE avg pay: ~$150k–$190k. - Microsoft — 228,000 employees — SWE avg pay: ~$220k–$250k . - Accenture — ~210,000 tech total company is far bigger — SWE avg pay: ~$120k–$170k. - Alphabet (Google) — 190,820 employees — SWE avg pay: ~$250k–$340k . - Apple — 166,000 employees — SWE avg pay: ~$230k–$280k. - Oracle — 162,000 employees — SWE avg pay: ~$180k–$230k. - Cisco — ~90,000 employees — SWE avg pay: ~$190k–$230k. - Salesforce — 76,453 employees — SWE avg pay: ~$210k–$260k . - Lenovo — 72,000 employees — SWE avg pay: ~$120k–$170k . - HP — 55,000 employees — SWE avg pay: ~$140k–$180k. - Intel — ~124,800 employees — SWE avg pay: ~$180k–$230k. - Dell — ~97,000 employees — SWE avg pay: ~$140k–$180k . - SAP — 109,973 employees — SWE avg pay: ~$160k–$210k . - Meta — ~74,000 employees — SWE avg pay: ~$280k–$380k . - Adobe — 31,360 employees — SWE avg pay: ~$210k–$260k . - NVIDIA — ~36,000 employees — SWE avg pay: ~$240k–$320k. -Uber — ~31,000 employees — SWE avg pay: ~$220k–$300k. LinkedIn — ~18,000 employees — SWE avg pay: ~$316k. - Intuit — 18,200 employees — SWE avg pay: ~$210k–$260k . - Airbnb — ~7,300 employees — SWE avg pay: ~$250k–$330k. - Atlassian — ~14,400 after recent layoffs — SWE avg pay: ~$180k–$240k . - ServiceNow — ~26,000 employees — SWE avg pay: ~$210k–$270k. - Workday — ~20,400 employees — SWE avg pay: ~$190k–$240k. - PayPal — ~27,000 employees — SWE avg pay: ~$170k–$220k. - Shopify — ~8,100 employees — SWE avg pay: ~$170k–$230k . - Expedia — 16,000 employees — SWE avg pay: ~$160k–$210k . - Block — ~12,000 employees — SWE avg pay: ~$200k–$270k. - Pinterest — ~4,200 employees — SWE avg pay: ~$220k–$300k. - Dropbox — ~2,300 employees — SWE avg pay: ~$210k–$280k.
English
3
1
8
73
Inosuke
Inosuke@Inosukeei_coder·
@devXritesh It means DSA handles main role.
English
1
0
1
4
Prajwal
Prajwal@0xPrajwal_·
@devXritesh Bro what a coincidence 😂 I posted similar
English
1
0
1
27
Ritesh Roushan
Ritesh Roushan@devXritesh·
@0xPrajwal_ Using DS and caching to serve data faster. Trie + Edge Cache.
English
2
0
1
24
Prajwal
Prajwal@0xPrajwal_·
Interviewer :- If Google shows results in milliseconds, how does it search the whole internet so quickly?
English
10
1
14
184