SShortSingh.
Back to feed

Hashing tenant IDs cannot prevent load skew from one large tenant

0
·1 views

A multi-tenant system that hashes tenant_id keeps each tenant's rows together and spreads tenants evenly, but it cannot even out load when one tenant generates most of the writes. In a lab with 100,000 writes across eight shards, one shard received nearly four times the average load while another sat almost idle, so throughput was limited to roughly two machines' worth. Salting the large tenant's key across sixteen variants evens writes but forces every read of that tenant to fan out to multiple shards. Composite keys that add an order sequence also balance load, though queries must then reach all shards, while a dedicated placement for the big tenant isolates it at the cost of needing a larger machine. The author notes that each fix trades write balance against read cost or hardware.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingHacker News ·

Neil Fraser Reports the .name Domain Has Been Grandfathered

A post on neil.fraser.name, dated November 10, 2026, discusses the status of the .name top-level domain as having been grandfathered. The item was shared on Hacker News, where it received 26 points and 3 comments. The source text available is limited to the link and discussion metadata, so the full details of the grandfathering decision are not confirmed here. Readers are directed to the original post for the author's complete account.

0
ProgrammingHacker News ·

Tailscale's DNS IPv6 address reportedly spells out the company name

A Reddit post in the Tailscale community highlights that the IPv6 address used for Tailscale's DNS resolves to a pattern that spells out the word 'Tailscale'. The discovery was shared as an Easter egg and drew attention on Hacker News, where it gathered 17 points and 7 comments. The post appears to be a community observation rather than an official company announcement. The source material provides limited detail beyond the link and engagement figures, so the exact address and any official response are not confirmed here.

0
ProgrammingDEV Community ·

Random UUIDv4 Primary Keys Can Silently Degrade Database Write Performance

A backend engineer reported a 340% spike in database write latency after their table passed 50 million rows, with CPU usage normal and storage I/O saturated. The cause was using random UUIDv4 values as primary keys, which were chosen to avoid enumeration attacks and simplify distributed ID generation. Relational databases store primary keys in sorted B-Tree indexes, so random keys land in arbitrary positions, forcing cold page reads, frequent page splits, and bloated, half-empty index pages. The problem is worse in MySQL's InnoDB, where the primary key also determines physical row order, fragmenting the entire table. The author benchmarks UUIDv4 against the time-ordered UUIDv7 standard, which places a timestamp first so new keys append near the end of the index.

0
ProgrammingDEV Community ·

Why Logo File Formats Matter for Print and Web, and What to Request

A common problem arises when clients send low-resolution JPGs with white backgrounds that look poor on dark or high-density screens and in large-format print. The article argues that most logo issues stem from missing file types rather than design flaws. It recommends requesting a vector master file such as AI or SVG, print-ready PDF or EPS files, and transparent PNGs in several sizes. It also suggests color variants, multiple layouts, and color codes in HEX, RGB, CMYK, and Pantone. The core advice is that every other format can be exported from a vector source, while small raster images cannot be scaled up well.

Hashing tenant IDs cannot prevent load skew from one large tenant · ShortSingh