Sushruth

310 posts

Sushruth banner
Sushruth

Sushruth

@TreeApostle

21 | building stuff i care about (breaking most of it) | react • typescript • java at work | gym + 学汉语

Hyderabad Katılım Mayıs 2024
95 Takip Edilen20 Takipçiler
Sabitlenmiş Tweet
Sushruth
Sushruth@TreeApostle·
hi, i'm sushruth 👋 cs undergrad interning at a fintech company. outside work, i build things (rn it's a LIMS app for a civil lab.) i write about prod bugs, building from scratch, and the messy in-between. follow along if that sounds like something you wanna read abt!
English
0
0
3
399
Sushruth
Sushruth@TreeApostle·
@devXritesh Precomputation and edge caching using a trie its near zero latency. a trie helps with prefix matching but ranking what shows up uses popularity, trending and your search history
English
1
0
2
38
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
14
1
22
321
Sushruth
Sushruth@TreeApostle·
We use microservices at work for a fintech app. The complexity overhead involved is no way something that can be handled by a 5-person team. good luck with that. Separate CI/CD pipelines, distributed tracing and cross-service coordination would eat more time than actual feature dev start with a monolith, modularize well, split only when traffic and team size demand it
English
0
0
1
52
Abhishek Singh
Abhishek Singh@0xlelouch_·
If microservices enable teams to deploy independently and scale components separately, why not split our 5-person startup into 50 microservices?
English
2
0
18
1.2K
Sushruth
Sushruth@TreeApostle·
So how kafka works is, Kafka has topics. Each topic has a bunch of partitions which are commonly compared with queues but are not exactly queues. Each partition can only be consumed by one consumer. So if you have 3 partitions and scale to 10 consumers, 7 just sit idle doing nothing The true way to improve processing time is to increase partition count along with consumer count.
English
0
0
5
918
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
55
8.6K
Sushruth
Sushruth@TreeApostle·
It's a combination of message queues, autoscaling and building the applications using event-driven architecture. Message queues help by buffering the incoming traffic, protecting the downstream services from getting flooded Autoscaling can be configured to ensure more instances of the applications are spun up with increasing traffic Load balancing also plays a key role in ensuring that none of the instances have unequal load Unlike sports streaming, Black Friday has predictable traffic spikes so teams pre-warm instances ahead of time, caches loaded, connection pools ready, everything initialized so theres no cold start latency when the spike hits
English
0
0
2
126
Javarevisited
Javarevisited@javarevisited·
Interviewer: How does Amazon handle millions of orders during Black Friday without crashing?
English
2
1
9
1.9K
Sushruth
Sushruth@TreeApostle·
@levelsio @steipete telegram having a billion MAU is not surprising at all lol, the rest of the world has been on it for years
English
0
0
5
323
@levelsio
@levelsio@levelsio·
SF's tech scene is finally discovering Telegram has 1 billion MAU Which why it's finally in Claude (And of course thanks to @steipete)
@levelsio tweet media
@levelsio@levelsio

Telegram has 1 billion users It's the #1 or #2 chat app in most countries around the world Complete blindspot for most Americans And NOBODY uses it for its encryption (or lack of it), we use it because it has the best UX of any chat app! Also best API to develop bots with

English
49
16
384
52.3K
Sushruth
Sushruth@TreeApostle·
@0xlelouch_ Yep they will, as long as the SLA is breached
English
0
0
1
421
Abhishek Singh
Abhishek Singh@0xlelouch_·
An interesting question if you are into tech infra and observability! Your service has 99.9% uptime SLA (43 minutes downtime/month). You had 2 outages: 20 minutes and 30 minutes. Customer demands refund. Do they get it?
English
16
0
31
10.4K
Sushruth
Sushruth@TreeApostle·
@mysticwillz adaptive bitrate streaming, the video is pre-encoded in multiple resolutions and the client switches between them in real time based on bandwidth and buffer health
English
0
0
1
54
THE CODE SCIENTIST
THE CODE SCIENTIST@mysticwillz·
Interviewer: How does Netflix automatically adjust video quality during playback?
English
3
1
7
1.7K
Sushruth
Sushruth@TreeApostle·
built a collaborative notepad using CRDTs and websockets so this is a fun one There are 2 main approaches here 1. OT(Operational Transformation) where a central server transforms conflicting ops to converge (google docs uses this) 2. Conflict-free Replicated Data Types (CRDTs) where the data structure itself stores change type, location and timestamp to merge without conflicts or a central server CRDT is a more modern and, imo, a better way to deal with concurrent editing
English
0
0
2
132
Abhishek Singh
Abhishek Singh@0xlelouch_·
You're building a collaborative doc editor like Google Docs. When two users edit the same paragraph simultaneously, one user's changes disappear. How do you handle concurrent editing?
English
9
1
35
4.8K
Sushruth
Sushruth@TreeApostle·
@javarevisited The output: true false part is a variable so concatenation happens in runtime, creating a new object
English
0
0
1
250
Javarevisited
Javarevisited@javarevisited·
What prints? String a = "Ja" + "va"; String b = "Java"; System.out.println(a == b); Now try this: String part = "Ja"; String c = part + "va"; System.out.println(c == b); Why different results?
English
4
0
29
4.6K
Sushruth
Sushruth@TreeApostle·
stateless app servers are easy to scale because theres no shared state but databases hold state and keeping that consistent across nodes is the real problem. read scaling is doable with replicas but write scaling is painful since every node needs to agree on write order. sharding helps but cross shard queries add a whole new layer of complexity
English
0
0
0
141
Javarevisited
Javarevisited@javarevisited·
Interviewer: If horizontal scaling is easy with cloud platforms, why is scaling databases still hard?
English
8
0
19
4.3K
Sushruth
Sushruth@TreeApostle·
@yongfook honestly if someone can ship(and maintain) working products with vibe coding who cares how they got there.
English
0
0
1
140
Jon Yongfook
Jon Yongfook@yongfook·
There's a new type of dev. They don't get dev humor because they only know vibe coding. And they think they are experts because they have the latest .md files from wherever. Insufferable.
English
108
21
750
28.3K
Khushi🪐
Khushi🪐@_khusheyyy·
goodd morningg y'all <3
English
15
0
48
775
Sushruth
Sushruth@TreeApostle·
@devXritesh in my own projects, not yet but its on my radar, currently most of my endpoints dont paginate deep enough for it to hurt but i know itll bite eventually when data grows
English
1
0
2
14
Ritesh Roushan
Ritesh Roushan@devXritesh·
@TreeApostle Offset pagination silently kills perf by forcing the DB to scan + discard every prior row (pure O(n) at depth). Cursor-based (e.g. `WHERE id > :last_id LIMIT 20`) stays O(1) index-fast forever. Switched any of your APIs yet?
English
1
0
2
42
Ritesh Roushan
Ritesh Roushan@devXritesh·
System Design Series - Day 4/90 API RESPONSE DESIGN: Pagination and Filtering You built an API. User asks: Get all orders. You return 100,000 records. Result: API dies, 30-second delay, memory explodes, user leaves. Thread below 👇 #SystemDesign #APIPagination
Ritesh Roushan tweet media
English
17
5
34
1.7K
Sushruth
Sushruth@TreeApostle·
@SumitM_X Looks correct to me? To remove during iteration, iterator.remove() after calling next() is safe unlike list.remove() inside a for each loop.
English
0
0
1
575
SumitM
SumitM@SumitM_X·
What's the issue with this code : Iterator<String> it = list.iterator(); while (it.hasNext()) { if (it.next().equals("B")) it.remove(); }
English
7
1
32
10K
Sushruth
Sushruth@TreeApostle·
@0xlelouch_ it sucks in Hyd as well, thats approx the same time it takes for my commute as well. 2 hrs gone for commute which couldve been spent more in gym and hobbies. Or just getting a better sleep :(
English
0
0
2
2.3K
Abhishek Singh
Abhishek Singh@0xlelouch_·
Tuesday in Bangalore as a software dev: WFH vs WFO and money saved/spent. 1. WFO - Commute: 2 hrs/day - Fuel/metro + parking: ₹150–₹300/day - Lunch + coffee: ₹250–₹500/day - “One quick smoke/tea”: another ₹100 2. WFH - Extra power + AC: ₹60–₹120/day - Internet: ₹20/day - Lunch at home: ₹80–₹150 Net: WFH saves ~₹300–₹900/day and 2 hours. If you go office 12 days/month, that’s ₹3.6k–₹10.8k and ~24 hours gone. Track it for 2 weeks atleast. Then decide what culture is worth to you!
English
8
6
99
27.4K
Sushruth
Sushruth@TreeApostle·
@javarevisited collaborative filtering mostly, find users with similar listening patterns and recommend what they liked that you havent heard yet. they also analyze the actual audio features of songs and layer that on top to handle new tracks with no listens
English
0
0
1
73
Javarevisited
Javarevisited@javarevisited·
Interviewer: How does Spotify recommend the perfect song for you?
English
2
0
10
2.1K
Sushruth
Sushruth@TreeApostle·
@levelsio the real servitude is thinking there's only one path, most people never even consider that they have options outside the default script
English
0
0
1
279
Sushruth
Sushruth@TreeApostle·
@javarevisited Refactor a legacy service saving the team hours every week and nobody notices but fumble one leetcode medium and suddenly I'm "not a strong candidate"
English
0
0
0
16
Javarevisited
Javarevisited@javarevisited·
Software engineering is the only career where real impact isn’t always measurable… but interview performance is brutally measurable.
English
1
0
11
879