Nilesh 🐧

3.1K posts

Nilesh 🐧 banner
Nilesh 🐧

Nilesh 🐧

@knileshh

Spec Driven Developer | Distributed Systems | AI Integration & Workflows

India Katılım Ekim 2017
239 Takip Edilen658 Takipçiler
Sabitlenmiş Tweet
Nilesh 🐧
Nilesh 🐧@knileshh·
We are not the same bruh. How do you turn on your computer. "startx" #Linux
English
5
2
27
8.7K
Nilesh 🐧
Nilesh 🐧@knileshh·
@TreeApostle @avrldotdev I guess, we can have the simple rule of just peeling away a layer below, and then enjoying the abstraction provided by the lower levels, so we know enough and not too in depth that we leave the breadth on the table.
English
1
0
1
11
Sushruth
Sushruth@TreeApostle·
For real. At my internship, I work with a platform that uses so many tech like kafka redis, queues, grpc and few more. But I only learn the surface level because of how everything is abstracted behind patterns. Im trying to dive deep into every part so that I can learn as much as possible.
English
2
0
4
76
avrl ☘
avrl ☘@avrldotdev·
Not learning enough in this AI era is the worst thing you can do as a dev. Learn a new language, peel away the layers of a system; how a server works, a browser renders a page, how file systems work, anything! AI is literally the best mentor, but are you ready to become better?
English
14
9
84
1.6K
Nilesh 🐧
Nilesh 🐧@knileshh·
Only things to be in my recycle bin.
Nilesh 🐧 tweet media
English
0
0
0
26
Nilesh 🐧
Nilesh 🐧@knileshh·
How to allow LLMs to measure time?
English
0
0
0
16
Nilesh 🐧 retweetledi
Theo - t3.gg
Theo - t3.gg@theo·
I spent a lot of time bugging many companies about my keyboard problems. Framework listened. They built my dream keyboard. I am so excited.
Theo - t3.gg tweet media
English
409
117
6.4K
696.7K
Nilesh 🐧 retweetledi
Wes Winder
Wes Winder@weswinder·
hey anthropic if you really wanna flex your models clone the entire adobe creative suite i dare you
English
279
576
20K
497K
Edgex
Edgex@SahilExec·
Interviewer: Your API gets flooded with 1M fake requests. How do you survive a DDoS attack?
English
34
7
127
27.8K
Anirudh Sharma
Anirudh Sharma@anirudhology·
12/12 Production Rules and Takeaways Based on these experiments, here are the non-negotiable rules for production retry logic. 1/ Always bound your retry count to a maximum of 2-3 attempts. 2/ Always implement exponential backoff starting around 50-100ms. 3/ Always add jitter to prevent synchronized retries. 4/ Set your timeout based on p99 latency plus a reasonable buffer, not an arbitrary small number. 5/ Monitor your retry rates in production because a sudden spike in retries is often the first sign of an impending cascading failure.
English
2
0
2
186
Anirudh Sharma
Anirudh Sharma@anirudhology·
Think retries are the heroes in your microservices? Think again as they are often the villain turning minor glitches into total outages. 1/12 It is very common that retries in microservices are implemented incorrectly. This is not a small mistake; it can have major repercussions such as causing complete system failure from a small downstream hiccup. I built a small experiment that shows how naive retry logic creates cascading failures, and how to fix it with three simple patterns. Here's what I learned by breaking things systematically. A thread 🧵 ↓
Anirudh Sharma tweet media
English
1
3
11
5.5K
Nilesh 🐧
Nilesh 🐧@knileshh·
@anirudhology Interesting, I was only using retries with Exponential Backoffs, This Jitter with randomness is a new idea in my toolkit. Thanks
English
0
0
1
7
Anirudh Sharma
Anirudh Sharma@anirudhology·
8/12 Fix #1 - Exponential Backoff with Jitter The most effective fix is combining exponential backoff with jitter. In exponential backoff, we don't retry after fixed interval but with each retry the interval increases exponentially. First retry after 50ms, second after 100ms, third after 200ms and so on... The jitter adds +-50% randomness to these delays. Result: only 272 total retries and queue depth of 7. That's almost 53% reduction in retries compared to naive, and we are back to near-baseline queue depth.
English
2
0
0
230
Nilesh 🐧
Nilesh 🐧@knileshh·
@sesigl @SumitM_X Can you elaborate more on the access patterns? Where can I learn more about them?
English
0
0
0
3
Sebastian Sigl
Sebastian Sigl@sesigl·
The trap here: everyone says normalize without asking why the 2MB exists. I have watched this 3 times. Team A normalized, 30% faster reads, but now every query joins 7 tables. Six months later they are over-normalized. They never understood their actual access patterns. Team B kept it JSON with caching. 95% cache hits, zero issues in 2 years. The question is not Is 2MB bad. It is What are you querying and how often. Design the schema backwards from access patterns, not from what you think good schema looks like.
English
2
0
1
217
SumitM
SumitM@SumitM_X·
A single row in one of your Table contains a JSON column that can grow up to 2 MB. How would you refactor the schema?
English
9
0
55
11.9K
Abhishek Vaishnav
Abhishek Vaishnav@Parinda_01·
Ever wondered how your phone and your friend’s phone show the exact same time even in different places? Behind the scenes, there’s a hero: Network Time Protocol (NTP). It keeps billions of devices in sync, down to milliseconds. Interesting article: @RocketMeUpNetworking/understanding-the-role-of-network-time-protocol-ntp-96225a9dd4a7" target="_blank" rel="nofollow noopener">medium.com/@RocketMeUpNet
English
1
0
1
137
Jahir Sheikh
Jahir Sheikh@jahirsheikh8·
Interviewer: Redis is single threaded, then how does it handle millions of requests per second?
English
23
10
176
54.6K
Nilesh 🐧
Nilesh 🐧@knileshh·
@KaiXCreator Depends on the file type, if you keep it normal its easy to read, so it takes less time to process. If you compress it, it will take time to decompress and process. Huffman Encoding
English
0
0
0
122
Kaito
Kaito@KaiXCreator·
Interviewer: A 10GB file becomes 3GB when zipped. No quality lost. No data removed. So the real question is: Why was it 10GB in the first place?
English
12
0
27
2.4K
Imtiyaz Nandasaniya
Imtiyaz Nandasaniya@CodeClashIG·
@SumitM_X views are just saved queries you treat like a table. real use case: fintech app. you don't want every dev querying raw transactions table directly. create a view with only what's needed, hide sensitive columns, control access. security + simplicity in one shot 🤷‍♂️
English
1
1
38
4.8K
SumitM
SumitM@SumitM_X·
Sometimes Candidates aren't able to explain very basic questions like - Why are Views needed in DB , just explain with a real use case...
English
20
15
339
65.4K
Abhishek Vaishnav
Abhishek Vaishnav@Parinda_01·
@SumitM_X Ohh man! I can think of many use cases I have seen in my team -> customer will see all cols without a view, later if upstream team deprecating a column, you will end dropping this column and get it from a different meta data table, better if u have view later you can join tables
English
3
0
2
3.1K
Nilesh 🐧
Nilesh 🐧@knileshh·
@TreeApostle @javarevisited Yeah, True. Also, personally if there's option to preprocessing 90% of the gains can be taken from it. But, conditions apply the data shouldn't be actively updated.
English
0
0
0
8
Sushruth
Sushruth@TreeApostle·
Id say I know for HDD it was ~100 ms for disk seeks whereas for ssds ~10 ms or so. I know nvme ssds are even faster but not sure of the exact math. When we are not considering mechanical drives, then disk seeks become less expensive, but end of the day they still will remain the significant part of any process and as such all optimizations would still start there in my opinion.
English
1
0
1
18
Javarevisited
Javarevisited@javarevisited·
Technical interview question: You have a sorted file of 50GB. You need to search for a value. You can’t load it fully in memory. How would you optimize search?
English
6
1
17
3.7K
Abhishek Vaishnav
Abhishek Vaishnav@Parinda_01·
Out of 3 pillars of System design, you should follow them in below order: >> Reliability: With few users, system should work fine & consistent >> Availability: As user base grows, make sure system is up & running >> Scalability: with exp growth, make sure to scale up servers
English
2
0
1
102
Nilesh 🐧
Nilesh 🐧@knileshh·
@BenjDicken @NarutoUzmaki201 I hope you mentioned the threshold before we start to shard. Most people start the conversation of scaling with the sharing. Vertical scaling cna take you really long way.
English
0
0
1
430
Ben Dicken
Ben Dicken@BenjDicken·
Sharding is: 1) The foundation of database scalability 2) Super interesting architecturally If you want to Design Data Intensive Applications (at scale) you must learn it, and learn it well.
English
15
176
1.7K
81.9K
Nilesh 🐧
Nilesh 🐧@knileshh·
@TreeApostle @javarevisited Things would change when we're not considering a mechanical drive right? What's will happen with modern hardware i wonder? Most servers now use nvme ssds
English
1
0
1
27
Sushruth
Sushruth@TreeApostle·
Searching for a sorted file of 50GB that cant fully be loaded into memory is a kind of system design question. The way to ans this is to go sequentially, even if you think you know the ans, ask clarifying ques. Will there be multiple searches or single search? What is the RAM available? Is the file on disk(HDD/SSD) or in remote S3 or blob storage? Is preprocessing allowed? After we establish the problem state, then we are able to think of solutions in an increasing scale of complexity. Binary search would be the starting point since the file is sorted. It would be O(logN). But one disadvantage is the disk seeks which can be expensive. If we are allowed to preprocess, then establish a sparse index. An in memory mapping of Nth key/nodes. For a few mb used up, we can reduce the disk seeks drastically. If there are expected to be multiple misses, then a bloom filter would be useful as a prefilter.
English
1
1
7
353