What is a data topology?
Aug 17, 2026Harshit Gangal, Ahmed Darwich

Summary
This post introduces and details the concept of a 'data topology' within the Neki system. It explains that a data topology is a JSON configuration used to map logical PostgreSQL tables to physical shards, enabling query routing. The post breaks down the three core components of a data topology: shard indexes (specifying how to route rows based on shard keys using hash, modulo, or range strategies), shard groups (defining sets of physical shards and routing key ranges), and databases (binding tables to shard groups following PostgreSQL hierarchy). It provides an example of a data topology for a `store` database partitioning around `customer_id` and explains how these components work together to inform the Neki router.