Posts tagged “performance”
-
What happens when you type a search into Google and press Enter?
A tour from the keystroke to the painted page: the browser, DNS, TCP/TLS vs QUIC, the edge, a query fanned out to thousands of index servers, and the response streamed back. What each step costs, what can fail, and why the slowest server decides how fast the page is.
-
Why does one long-running transaction slow down the whole database?
Databases keep old row versions for as long as any open transaction might need them. One idle transaction on an unrelated table made PostgreSQL's busiest table 200× bigger and its writes 3× slower; in MySQL it made the old transaction's own reads 250× slower. Measured, with the settings that…
-
Why does my Postgres query get slower as the table grows, even with an index?
An index only helps when Postgres can stop early or touch few pages. Six measured reasons it can't, from 10K to 10M rows, and the fix for each.
-
How do you check "have we seen this?" for millions of items cheaply?
An exact set of a million emails took 56 MB; a Bloom filter answering the same question with 1% false positives took 1.2 MB. Bloom vs cuckoo vs an exact set, measured: memory, false positives, deletes, and what happens when you overfill them.
-
Why are some databases fast at writes and others at reads?
Under the hood, most databases are either a B-tree or an LSM tree. A B-tree updates data where it lives and pays for random writes; an LSM tree appends and sorts later, and pays at read time. Measured with the engines under etcd and CockroachDB: 54× vs 7× bytes written per byte stored, and reads…
-
A user says a page has started lagging: how do you debug it end to end?
Narrow it down before you open a profiler: who, which page, since when. Then measure one layer at a time (browser, network, server, database, dependencies) until one of them owns the time. Five server-side causes measured with OpenTelemetry traces, and the signature each leaves.
-
How do you scale an API?
Find the bottleneck first, then use the cheapest lever that removes it: fix the query, cache the read, pool the connections, add replicas, queue the slow writes, limit each client. Each lever measured on one machine: what it bought, and what it cost.