Yash Agarwal (@yashagw) header
Yash Agarwal (@yashagw) profile picture

I write about databases & distributed systems • Building cloud security @ Averlon • Built CraneDB from scratch

Joined October 2013
Photo by Yash Agarwal (@yashagw)Photo by Yash Agarwal (@yashagw)Photo by Yash Agarwal (@yashagw)Photo by Yash Agarwal (@yashagw)Photo by Yash Agarwal (@yashagw)Photo by Yash Agarwal (@yashagw)Photo by Yash Agarwal (@yashagw)Photo by Yash Agarwal (@yashagw)Photo by Yash Agarwal (@yashagw)Photo by Yash Agarwal (@yashagw)
Database recovery isn't optional. It's what makes the difference between "your data is safe" and "hope you had backups". Every time a database says "commit successful," it's making a promise and ARIES is how modern databases keep that promise. But ARIES can be confusing. Three phases, CLRs, pageLSNs, Steal/No-Force - it's a lot. So I wrote an interactive blog that builds up from first principles: why naive designs fail, how WAL solves durability, and how ARIES ties it all together. You can literally see the database crash mid-transaction and watch recovery piece it back together. Huge thanks to @BenjDicken for tips in the early stages and for reviewing the final draft. It meant a lot. Blog: yashagw.github.io/blog/db-re…
13
31
5
312
60,201
Excalidraw is my favourite whiteboard, but the free version gives you one board, saved in your browser. Boards, folders and their MCP are part of Excalidraw+, which is paid and runs on their cloud. So I built Excalidraw Boards. Open source, and you host it yourself: > unlimited boards in nested folders > every board is a plain .excalidraw file on your own disk, and still opens on excalidraw.com > autosave, version history and a trash, so nothing gets lost > an MCP server, so Claude (or any MCP client) can read and draw on your boards > a board you have open updates live while the agent draws > agents can use your icon library, so AWS diagrams get real AWS icons I run it on my own server over Tailscale and connected it to Claude Code. Asking Claude to sketch a system design and watching it appear on my board has been a superb experience. Under the hood it's the official Excalidraw editor, not a fork. github.com/yashagw/excalidra…
21
6
2
109
5,416
If you're into search engines, there's a lot to learn from this post. I already knew about postings lists, but this was my first proper dive into BlockMax pruning and the tradeotts between WAND and MAXSCORE. The idea behind BlockMax is pretty neat: divide the postings list into blocks, keep an upper bound on the maximum score each block can produce, and skip the entire block if it can't possibly make it into the Top-K results. Really enjoyed this one from @paradedb
4
2
40
3,468
Why is a hash join sometimes 1000x faster than a nested loop join? The hardware doesn't change. The algorithm does far less work. A naive join is a nested loop: for every row on the left, scan every row on the right and check if they match. Join 12,000 users with 1,200 orders and that's ~14 million comparisons, and you throw away 99.9% of them. It's O(N×M). Double the data, 4x the work. A hash join does it in two passes instead: Build: scan the smaller table once and drop every row into a hash table, keyed on the join column. Probe: scan the bigger table, hash each row's key, and jump straight to the matching bucket. A lookup replaces a full scan. Work drops from N×M to N+M. ~14 million comparisons become ~13,000. Same answer, a thousand times less work, and the gap widens as the data grows. But hash join has a catch: the build side has to fit in memory. You're holding a whole table in a hash table. When it's bigger than RAM, this naive version breaks. The fix is called grace hash join: hash both tables into partitions on disk first, then join one partition at a time so only a slice is ever in memory. (video is from CraneDB, the database I'm building from scratch in Go. That clip is a real query going 4.9s → 4ms. code: github.com/yashagw/cranedb)
3
1
26
1,468
What happened to @digitalocean design? I logged in after almost 2.5 years and was genuinely surprised. I remember DigitalOcean feeling so clean, simple, and cool. Now… it just looks weird.
1
7
634
Part 2 coming today. If you haven’t read Part 1 yet, go through it first. I have also written about Replication & Partitioning check them out on my profile. Hopefully, this series helps build a clearer understanding of the basics of distributed systems.
2
27
1,750
Database maxxing. Don’t miss this one
This quoted post is unavailable.
1
25
2,309
drop everything and go read it
Fast backups at-scale are made possible by sharding. These require an amazing amount of engineering to nail the infrastructure, orchestration, and reliability. I wrote all about it... with the help of some PlanetScale database geniuses, of course!
1
13
1,393
made it to the cursor delhi roadshow.
Got accepted for the Delhi stop! Can’t wait to meet the Cursor team and fellow builders. See you on July 26! 🚀
1
13
541
Got accepted for the Delhi stop! Can’t wait to meet the Cursor team and fellow builders. See you on July 26! 🚀
Cursor is coming to India 👀 Build with us on 26th, July with @ExaAILabs @firecrawl and more! DELHI RSVP NOW!
3
1
15
1,648
something different from my usual database ramblings found lifeweeks.app, loved the idea of seeing your life as a grid of weeks. but it wanted a signup, and my memories aren't going in someone else's db. so I built a fully local version: photos, videos, multiple profiles, everything in plain JSON + files on your disk. all it took from me was ~30 minutes of talking to @claudeai and another hour of refining. 1,600 lines of code later - i present you mylife. github.com/yashagw/mylife
1
12
980
today's read: the new jepsen report on mariadb galera. it loses committed transactions with the config they recommend in the docs turns out it acks commits before fsync, so 2 node crashes close together and your data is just gone jepsen.io/analyses/mariadb-g…
4
265
Super proud of this! An entire RPG generated with AI in real time. Check out what they built 👇
Still can't believe it. We won 🥇 1st place at the @GoogleDeepMind × @cerebral_valley Hackathon Bangalore! 🎉 We built an AI-powered RPG where worlds, assets, dialogues, and quests are generated in real time using @NanoBanana. Every playthrough is unique.
2
260
One of the best database engineering posts I’ve read recently. If you want to understand how SlateDB approaches compaction differently from traditional LSM trees, this is a must-read. The idea of segment-oriented compaction is incredibly elegant. slatedb.io/blog/segment-orie…
2
2
17
1,042
Normal people unwind after work. I apparently collect infra problems for fun.
3
218
spent 3 days deep in rust again. now everything else feels illegal to write. Go still gets a free pass :)
2
1
36
1,483
Been heads down on other work for the past month Starting today, back to databases on the side. Reading as much as possible until query planners start showing up in my dreams.
1
6
501
Had a few interviews with @PlanetScale recently. @samlambert connected me directly with the CTO, and we went from there. Didn’t work out, but the process stood out deep discussions on DB internals and even my work on CraneDB(github.com/yashagw/crandb) A refreshing break from typical DSA loops. As someone with 2–3 yrs experience, I knew it’d be tough - maybe another time.
8
1
1
246
21,283