<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>Ankur Anand — Writing</title><description>Long-form writing about Go, distributed systems, databases, performance, and the craft of building software.</description><link>https://ankuranand.com/</link><language>en-us</language><item><title>Building a Key-Value Database on S3 in Go</title><link>https://ankuranand.com/blog/2026/08/12/building-a-key-value-database-on-s3-in-go/</link><guid isPermaLink="true">https://ankuranand.com/blog/2026/08/12/building-a-key-value-database-on-s3-in-go/</guid><description>How an LSM tree gives us the right building blocks, and where object storage changes the design.</description><pubDate>Wed, 12 Aug 2026 00:00:00 GMT</pubDate><category>Go</category><category>Databases</category><category>Object storage</category><category>LSM trees</category></item><item><title>Timing Wheels: Expiring 10 Million Keys in Go</title><link>https://ankuranand.com/blog/2025/10/04/killing-o-n-how-timing-wheels-expire-10-million-keys-effortlessly-in-golang/</link><guid isPermaLink="true">https://ankuranand.com/blog/2025/10/04/killing-o-n-how-timing-wheels-expire-10-million-keys-effortlessly-in-golang/</guid><description>How hierarchical timing wheels expire millions of cache entries efficiently in Go without periodic O(n) scans or a timer per key.</description><pubDate>Sat, 04 Oct 2025 00:00:00 GMT</pubDate><category>Go</category><category>Data structures</category><category>Performance</category><category>Caching</category></item><item><title>Illustrated Tales of the Go Runtime Scheduler</title><link>https://ankuranand.com/blog/2020/03/19/illustrated-tales-of-go-runtime-scheduler/</link><guid isPermaLink="true">https://ankuranand.com/blog/2020/03/19/illustrated-tales-of-go-runtime-scheduler/</guid><description>An illustrated tour of Go’s runtime scheduler: operating-system foundations, the G-M-P model, work stealing, preemption, and scheduler traces.</description><pubDate>Thu, 19 Mar 2020 00:00:00 GMT</pubDate><category>Go</category><category>Runtime</category><category>Concurrency</category><category>Scheduling</category></item><item><title>How to mock? Go Way.</title><link>https://ankuranand.com/blog/2020/01/07/how-to-mock-in-your-go-golang-tests/</link><guid isPermaLink="true">https://ankuranand.com/blog/2020/01/07/how-to-mock-in-your-go-golang-tests/</guid><description>How to use small interfaces, structs, and hand-written test doubles to isolate dependencies and write focused unit tests with Go&apos;s standard library.</description><pubDate>Tue, 07 Jan 2020 00:00:00 GMT</pubDate><category>Go</category><category>Testing</category><category>Mocking</category></item><item><title>An Introduction to the 99th Percentile for Programmers</title><link>https://ankuranand.com/blog/2019/09/29/an-in-depth-introduction-to-99-percentile-for-programmers/</link><guid isPermaLink="true">https://ankuranand.com/blog/2019/09/29/an-in-depth-introduction-to-99-percentile-for-programmers/</guid><description>Why averages and medians hide tail latency, how the 99th percentile exposes it, and how to calculate and interpret p99 with examples in Go.</description><pubDate>Sun, 29 Sep 2019 00:00:00 GMT</pubDate><category>Go</category><category>Performance</category><category>Statistics</category><category>Latency</category></item><item><title>Communicating Sequential Processes in Go</title><link>https://ankuranand.com/blog/2019/03/14/communicating-sequential-processes-csp-for-go-developer-in-a-nutshell/</link><guid isPermaLink="true">https://ankuranand.com/blog/2019/03/14/communicating-sequential-processes-csp-for-go-developer-in-a-nutshell/</guid><description>A concise introduction to CSP through processes, synchronous input and output, guarded commands, and the ideas that shaped Go channels.</description><pubDate>Thu, 14 Mar 2019 00:00:00 GMT</pubDate><category>Go</category><category>csp</category><category>paper</category></item><item><title>A Visual Guide to Go&apos;s Memory Allocator</title><link>https://ankuranand.com/blog/2019/02/20/a-visual-guide-to-golang-memory-allocator-from-ground-up/</link><guid isPermaLink="true">https://ankuranand.com/blog/2019/02/20/a-visual-guide-to-golang-memory-allocator-from-ground-up/</guid><description>A visual guide to Go&apos;s memory allocator, from virtual memory and TCMalloc to mspan, mcache, mcentral, mheap, arenas, and object allocation.</description><pubDate>Wed, 20 Feb 2019 00:00:00 GMT</pubDate><category>Go</category><category>memory</category><category>internals</category></item><item><title>A Closer Look at Go&apos;s Type System</title><link>https://ankuranand.com/blog/2018/11/29/a-closer-look-at-go-golang-type-system/</link><guid isPermaLink="true">https://ankuranand.com/blog/2018/11/29/a-closer-look-at-go-golang-type-system/</guid><description>A practical guide to Go&apos;s named, unnamed, and underlying types, with examples of assignability, conversion, type identity, and compatibility.</description><pubDate>Thu, 29 Nov 2018 00:00:00 GMT</pubDate><category>Go</category><category>Type system</category></item><item><title>Diving Deep into Go Channels</title><link>https://ankuranand.com/blog/2018/09/29/diving-deep-into-the-golang-channels/</link><guid isPermaLink="true">https://ankuranand.com/blog/2018/09/29/diving-deep-into-the-golang-channels/</guid><description>A source-level tour of Go channels: hchan, sudog, wait queues, buffered storage, blocking sends and receives, select, and goroutine wake-ups.</description><pubDate>Sat, 29 Sep 2018 00:00:00 GMT</pubDate><category>Go</category><category>channels</category><category>internals</category></item><item><title>The Performance Cost of CORS in Single-Page Applications</title><link>https://ankuranand.com/blog/2018/09/02/the-terrible-performance-cost-of-cors-api-on-the-single-page-application-spa/</link><guid isPermaLink="true">https://ankuranand.com/blog/2018/09/02/the-terrible-performance-cost-of-cors-api-on-the-single-page-application-spa/</guid><description>How CORS preflight requests add latency to cross-origin APIs, why URL-specific preflight caching may not help, and what SPA designers should consider.</description><pubDate>Sun, 02 Sep 2018 00:00:00 GMT</pubDate><category>JavaScript</category><category>spa</category><category>cors</category><category>performance</category></item><item><title>Building a Single Sign-On Server in Node.js</title><link>https://ankuranand.com/blog/2018/08/28/building-a-simple-single-sign-on-sso-server-and-solution-from-scratch-in-node-js/</link><guid isPermaLink="true">https://ankuranand.com/blog/2018/08/28/building-a-simple-single-sign-on-sso-server-and-solution-from-scratch-in-node-js/</guid><description>Build a minimal token-based single sign-on flow in Node.js, covering redirects, global and local sessions, consumer validation, and single sign-off.</description><pubDate>Tue, 28 Aug 2018 00:00:00 GMT</pubDate><category>JavaScript</category><category>Node.js</category><category>sso</category></item><item><title>The Cost of Parameter Destructuring in JavaScript</title><link>https://ankuranand.com/blog/2018/06/29/es6s-function-destructuring-assignment-is-not-free-lunch/</link><guid isPermaLink="true">https://ankuranand.com/blog/2018/06/29/es6s-function-destructuring-assignment-is-not-free-lunch/</guid><description>Compare ordinary parameters with object destructuring in Node.js through V8 bytecode, heap usage, garbage collection, and microbenchmarks.</description><pubDate>Fri, 29 Jun 2018 00:00:00 GMT</pubDate><category>JavaScript</category></item><item><title>Implementing call(), apply(), and bind() in JavaScript</title><link>https://ankuranand.com/blog/2018/06/15/implement-your-own-call-apply-and-bind-method-in-javascript/</link><guid isPermaLink="true">https://ankuranand.com/blog/2018/06/15/implement-your-own-call-apply-and-bind-method-in-javascript/</guid><description>Reimplement JavaScript&apos;s call(), apply(), and bind() to understand this binding, variable arguments, return values, constructor behavior, and edge cases.</description><pubDate>Fri, 15 Jun 2018 00:00:00 GMT</pubDate><category>JavaScript</category></item><item><title>The Missing Introduction to React</title><link>https://ankuranand.com/blog/2018/03/28/the-missing-introduction-of-react-js/</link><guid isPermaLink="true">https://ankuranand.com/blog/2018/03/28/the-missing-introduction-of-react-js/</guid><description>Build the ideas behind React step by step: reusable components, state, setState, declarative rendering, and efficient DOM updates.</description><pubDate>Wed, 28 Mar 2018 00:00:00 GMT</pubDate><category>JavaScript</category><category>React</category></item><item><title>Building Express.js from Scratch, Part 1</title><link>https://ankuranand.com/blog/2018/03/23/learning-express-js-by-creating-one-from-scratch-part-1/</link><guid isPermaLink="true">https://ankuranand.com/blog/2018/03/23/learning-express-js-by-creating-one-from-scratch-part-1/</guid><description>Build a small Express-like framework in Node.js, starting with an HTTP server and GET routes, then adding Router, Route, and Layer abstractions.</description><pubDate>Fri, 23 Mar 2018 00:00:00 GMT</pubDate><category>JavaScript</category><category>Node.js</category><category>Express</category></item><item><title>A Gentle Introduction to JavaScript Prototypes</title><link>https://ankuranand.com/blog/2017/12/28/learning-notes-javascript-prototype/</link><guid isPermaLink="true">https://ankuranand.com/blog/2017/12/28/learning-notes-javascript-prototype/</guid><description>How JavaScript&apos;s prototype chain works, how constructor prototype properties differ from object [[Prototype]] links, and how inheritance resolves properties.</description><pubDate>Thu, 28 Dec 2017 00:00:00 GMT</pubDate><category>JavaScript</category><category>Prototype</category><category>Self notes</category><category>Node.js</category></item><item><title>Diving Deep into Node.js Buffers</title><link>https://ankuranand.com/blog/2017/08/31/learning-notes-node-js-buffer/</link><guid isPermaLink="true">https://ankuranand.com/blog/2017/08/31/learning-notes-node-js-buffer/</guid><description>How Node.js stores and transmits binary data with Buffer, including allocation APIs, memory behavior, performance, and the internal 8 KB slab pool.</description><pubDate>Thu, 31 Aug 2017 00:00:00 GMT</pubDate><category>JavaScript</category><category>Buffer</category><category>Node.js</category><category>8k-pool</category><category>Self notes</category></item><item><title>setTimeout vs setImmediate in Node.js</title><link>https://ankuranand.com/blog/2017/06/03/understanding-non-deterministic-order-of-execution-of-settimeout-vs-setimmediate-in-node-js-event-loop/</link><guid isPermaLink="true">https://ankuranand.com/blog/2017/06/03/understanding-non-deterministic-order-of-execution-of-settimeout-vs-setimmediate-in-node-js-event-loop/</guid><description>Why setTimeout(0) and setImmediate() can run in either order, explained through Node.js event-loop phases, libuv, clock updates, and process timing.</description><pubDate>Sat, 03 Jun 2017 00:00:00 GMT</pubDate><category>JavaScript</category><category>event-loop</category><category>Node.js</category><category>libuv</category><category>setImmediate</category><category>setTimeout</category></item><item><title>The Basic Relational Mathematics Behind SQL</title><link>https://ankuranand.com/blog/2016/06/18/the-basic-mathematics-of-sql/</link><guid isPermaLink="true">https://ankuranand.com/blog/2016/06/18/the-basic-mathematics-of-sql/</guid><description>A short introduction to relations, Cartesian products, schemas, attributes, and how those mathematical ideas are represented as SQL tables.</description><pubDate>Sat, 18 Jun 2016 00:00:00 GMT</pubDate><category>SQL</category><category>Mathematics</category><category>Self notes</category><category>Programming Paradigms</category></item><item><title>Mutable Default Arguments in Python</title><link>https://ankuranand.com/blog/2016/04/24/dont-use-mutable-as-defualt-parameter/</link><guid isPermaLink="true">https://ankuranand.com/blog/2016/04/24/dont-use-mutable-as-defualt-parameter/</guid><description>Why Python evaluates default arguments once, how mutable defaults retain state between calls, and how the None sentinel pattern avoids the problem.</description><pubDate>Sun, 24 Apr 2016 00:00:00 GMT</pubDate><category>Python</category><category>Function</category><category>First-Class Function</category><category>Python basics</category></item><item><title>Understanding Python&apos;s Object Model, Part 1</title><link>https://ankuranand.com/blog/2016/04/23/object-mechanism-in-python-part1/</link><guid isPermaLink="true">https://ankuranand.com/blog/2016/04/23/object-mechanism-in-python-part1/</guid><description>An introduction to CPython&apos;s object representation through PyObject, PyVarObject, reference counting, type pointers, and variable-sized objects.</description><pubDate>Sat, 23 Apr 2016 00:00:00 GMT</pubDate><category>Python</category><category>Object</category></item><item><title>Private Fields Are Class-Private in Java</title><link>https://ankuranand.com/blog/2016/04/23/private-access-in-java/</link><guid isPermaLink="true">https://ankuranand.com/blog/2016/04/23/private-access-in-java/</guid><description>Why code inside a Java class can access private fields on another instance of the same class, with examples using mutation and equals().</description><pubDate>Sat, 23 Apr 2016 00:00:00 GMT</pubDate><category>Java</category><category>OOP</category><category>Encapsulation</category></item><item><title>Efficient Factorial Algorithms</title><link>https://ankuranand.com/blog/2016/04/19/efficient-factorials-algorithms/</link><guid isPermaLink="true">https://ankuranand.com/blog/2016/04/19/efficient-factorials-algorithms/</guid><description>A comparison of recursive, iterative, paired-multiplication, and prime-decomposition approaches to computing large factorials in Python and Java.</description><pubDate>Tue, 19 Apr 2016 00:00:00 GMT</pubDate><category>Factorial</category><category>Efficiency</category><category>Python</category><category>Java</category><category>Algorithms</category></item></channel></rss>