Khushal Agrawal

Engineering notes

Blog

Long-form notes on internals, tradeoffs, failures, measurements, and the useful edges of infrastructure work.

Jun 10, 2026 / 8 min read

System Design Chapter 1 Notes: How Web Systems Start Scaling

Notes from the first chapter of System Design Interview, covering load balancers, replication, caching, CDNs, sharding, denormalization, sticky sessions, and operational automation.

system-designdistributed-systemsdatabasescachingscalability

Jun 6, 2026 / 6 min read

Building a Redis Clone in Rust, Then Making It 49x Faster With Profiling

Benchmarking a Redis-compatible Rust server against Redis, profiling the slow paths, and using indexes to remove pathological scans.

redisrustperformanceprofilingdatabases

Jun 1, 2026 / 8 min read

Concurrent Servers: Notes on Threads, Event Loops, libuv, Redis, and async/await

A series-level writeup from Eli Bendersky's concurrent servers articles, tracing the design space from sequential sockets to threads, event-driven I/O, libuv, Redis, and async/await.

network-programmingconcurrencyevent-loopsredissystems

May 20, 2026 / 1 min read

Redis Internals: The Event Loop as a Systems Primitive

A concise walkthrough of how Redis uses a single-threaded event loop, multiplexed I/O, and careful data structure choices to stay predictable under load.

redislinuxperformancedatabases

May 13, 2026 / 1 min read

Kafka Architecture Notes: Logs, Segments, and Consumer Lag

Engineering notes on Kafka's log-oriented architecture, segment lifecycle, replication, and why consumer lag is an operational signal rather than just a metric.

kafkadistributed-systemsstorage

May 2, 2026 / 1 min read

eBPF Tracing Notes for Runtime Latency

A practical outline for using eBPF to observe syscall latency, scheduler pressure, and runtime behavior with minimal application changes.

ebpflinuxobservabilityperformance