Recent stories
Grouped by topic area, with each story's summary and the places it was discussed.
Summaries are written by AI from the linked sources. Open the source for full context.
Backend
Why you shouldn't do application-level sharding
Backend · Database · Distributed Systems · Software Architecture
Application-level sharding turns database routing into a long-term application responsibility rather than a simple scaling change.
As a marketplace grows, resharding risks lost writes; missing shard keys require fan-out, IDs, or lookup tables; hot customers need exceptions; cross-shard transactions require sagas or two-phase commit; and schema changes, failover, and connection pools multiply operational work. A sharding layer such as Vitess or Neki handles routing and operations, though applications still own cross-shard atomic writes and shard-key choices.
Designing a reliable unplanned failover
Backend · Database · Distributed Systems · PostgreSQL · Software Architecture
Neki’s unplanned Postgres failover uses replica evidence rather than Admin’s health check alone.
It declares a primary dead only when reachable replicas report broken replication without contradiction, then disconnects them to prevent the old primary from returning and to freeze WAL positions. It promotes the replica with the highest received, preferably fully replayed, WAL, reconfigures the shard, and tears down the old primary. Synchronous `ANY 1` durability helps establish write unavailability, while TCP and WAL receiver timeouts detect silent or frozen failures.
Network-attached storage is flexible and durable, but its network hop can hide significant latency inside cloud databases.
SSDs made storage fast enough that this hop became a bottleneck, while locally attached NVMe avoids it and removes EBS IOPS caps. PlanetScale Metal combines local NVMe with primary-replica clusters across availability zones, cross-zone commit acknowledgements, and failover. It can improve read-heavy, cache-miss, or IOPS-bound workloads, though RAM-cached workloads may not need it.
Designing a planned switchover for minimum disruption
Backend · Database · Distributed Systems · PostgreSQL · Software Architecture
Neki minimizes planned Postgres primary switchovers by validating candidates beforehand, establishing a final WAL position, preserving synchronous replication, and buffering primary-bound queries.
Admin makes the old primary read-only, disconnects other replicas, waits for the target to replay all required WAL, prepares replication, and promotes it only when safety checks pass. Routers then replan buffered queries, so applications usually see delay rather than errors. A deadline enables rollback to the old primary, while acknowledged commits remain durable.
Shard design doesn't start from your tables
Backend · Database · Distributed Systems · PostgreSQL · Software Architecture
Neki shard-group design should start from query and transaction patterns, not table structure.
Tables sharing a key can be co-located across Postgres shards using a common shard index, keeping joins and transactions local and preserving full single-shard semantics. Reference tables are replicated to every shard, while differently keyed data can use separate groups. Global secondary indexes support lookups without shard keys. MoveTables and Reshard later change placement, shard keys, or shard counts as workloads evolve.
Neki update: $50 Metal, read-only replicas, Azure, and more
Backend · Database · DevOps · Distributed Systems · PostgreSQL
Neki, PlanetScale’s sharded Postgres, added read-only replicas, Metal nodes starting at $50/month, Azure regions, and broader Terraform, CLI, MCP, and configuration support during its platform preview.
The query layer now supports more SQL, standard exports via COPY, and EXPLAIN (NEKI_PG_PLAN); distributed INSERT ... SELECT is 76x faster and COPY ingest 5x faster than launch. More than 650 changes have shipped, enabling evaluation for production workloads.
Databases
PlanetScale used its own Rails API to test and improve Insights Agent, which detects inefficient queries or schema, traces code, and opens fixing pull requests.
It cut feature-flag database calls from 28.7 million to 8.3 million daily, reducing database time by 71%. An initially harmful index exposed missing context about empty results and expanded IN lists; filtering in Ruby cut database time 14x. Another composite index reduced query latency from seconds to milliseconds. Insights Agent now evaluates rows, SQL size, and when no change is best.
PlanetScale built the open-source Heroku Migrator to move standard Heroku Postgres databases with minimal downtime despite lacking logical replication.
Using Bucardo trigger-based replication, it copies the schema and data, tracks changes, verifies consistency, and enables a controlled cutover. The latest version uses staged index rebuilding, connection keepalives, and txntime indexes to prevent restarts, network stalls, and replication backlogs, increasing copy speed from roughly 60 to 300 GB/h. It also supports Postgres 18 and pg_partman.
Postgres became today’s default through a sequence of moments rather than one decisive event, with Heroku’s 2011 decision to make hosted Postgres effortless arguably the pivotal catalyst.
Its open governance and extensibility ensured survival; JSONB preserved relevance against MongoDB, while MySQL’s Oracle acquisition weakened its momentum. Postgres overtook MySQL in Stack Overflow’s 2023 survey (45.6% vs. 41.1%) and reached 86% of 32,955 LLM database recommendations, reinforced by cloud availability and pgvector.
ON DELETE CASCADE can turn simple deletions into outages and replication failures as foreign-key trees grow.
A cascading delete removes matching rows in one transaction, generating dead tuples, index updates, and WAL while holding locks; migrations may queue writes, unindexed keys can trigger scans, and logical replication can leave orphans or fail without replica identity. Soft deletes avoid this by marking one row, then reaping descendants in small background batches, keeping transactions short and bounded.
Neki implements PostgreSQL sequences in its sharded query planner by making sequence operations router-only and coordinating allocation through an authoritative shard.
Because nextval() is volatile, Neki must evaluate it once per output row, even when rows arrive from multiple shards, while stable expressions such as now() are evaluated once per statement. Shard-local joins and immutable expressions can still be pushed down. For UPDATE, Neki locks and streams row IDs to the router, then sends parameterized per-row updates with globally unique sequence values.
Postgres TOAST activates when a row exceeds 2,032 bytes: it compresses variable-length values or moves them into a `pg_toast` table in chunks.
A 2,001-character `text` value therefore compresses with LZ4 while 2,000 characters remain uncompressed. Postgres 19 makes LZ4 the default where supported. LZ4 is generally the best choice for speed, while pglz can produce smaller repetitive JSON and better preview reads; `EXTERNAL` suits already-compressed data and random byte-range access.
TIN v1.0.6 adds language-specific stemming for 18 languages, supports heap-attribute tiebreakers in ranked top-k queries, and improves top-k performance without changing the index format.
Benchmarks on 150 million Stack Exchange documents show TIN outperforming ParadeDB across conjunction, disjunction, phrase, and mixed queries: default scoring delivers 3.1–5.0x higher throughput and 2.7–4.4x lower p99 latency on x86-64. Existing indexes need no rebuild for the performance update; stemming requires rebuilding.
Leaky buckets, first used as ancient water clocks, became a low-cost software pattern for admission control: work is admitted when capacity exists and throttled as the bucket refills over time.
Shopify uses query-cost buckets for GraphQL rate limiting. In 2026, PlanetScale brought similar decision gates to Postgres with Database Traffic Control, which estimates query costs, applies tagged resource budgets, and can warn or block queries based on server share, burst capacity, per-query limits, and concurrent workers.
Business
PlanetScale ranked #24 in Deloitte’s 2026 Technology Fast 500 after revenue grew 3,493% from fiscal 2022 to 2025, and ranked #1 in cloud services.
Since placing #188 in 2023, it expanded from a Vitess-based MySQL platform to include Postgres and Neki, sharded Postgres. Major releases include Metal, Database Traffic Control™, and availability on Azure alongside AWS and GCP. Postgres starts at $5/month, while Neki provides horizontal sharding and online resharding.
AI & Machine Learning
PlanetScale introduced Insights Agent, built-in agents that use application code, database schemas, and Query Insights data in temporary sandboxes to investigate and propose database-performance fixes.
Scheduled or on-demand schema-recommendation and slow-query runs can create pull requests, using codebase conventions for frameworks or SQL; Vitess also receives deploy requests. Changes are never merged or deployed automatically. Runs are token-based, chargeable on completion, support spend limits, use zero-retention OpenAI and Anthropic models, and are available on all plans, engines, and hosts.
Cloud & DevOps
PlanetScale is now available on Microsoft Azure, initially supporting PlanetScale Postgres and Neki databases in centralus, eastus2, and westeurope; Vitess is not yet supported.
Azure deployments include high availability across three availability zones, Query Insights, schema recommendations, automated backups, and Metal clusters. PlanetScale built custom Kubernetes networking that assigns pod IPs in /28 blocks, increasing capacity 16x to over one million pod IPs per network. Existing databases can be migrated through support.