| Citus Data 2 The story before the story… Citus Data Co-Founders, Left to Right Ozgun Erdogan, Sumedh Pathak, Umur Cubukcu Photo credit: Willy Johnson 2017
| Citus Data Hidden costs of NoSQL What if a relational database could scale out ? TRANSACTIONS JOINS DATABASE CONSTRAINTS Re-architect application (more code) to provide missing database functionality
| Citus Data 7 Citus Scales Out PostgreSQL COORDINATOR NODE Table metadata SELECT FROM table_1001 SELECT FROM table_1003 SELECT FROM table_1002 SELECT FROM table_1004 WORKER NODE 1 Table_1001 Table_1003 WORKER NODE 2 Table_1002 Table_1004 WORKER NODE ‘N’ Each node PostgreSQL instance with Citus installed Replication not shown in diagram • • • • • • SELECT create_distributed_table(‘table’, ‘device_id’);
| Citus Data • Distributed transactions could lead to distributed deadlocks. • To avoid deadlocks, we introduced a distributed deadlock detector. Distributed transactions in Citus
| Citus Data 13 Citus Architecture COORDINATOR NODE Table metadata SELECT FROM table_1001 SELECT FROM table_1003 SELECT FROM table_1002 SELECT FROM table_1004 WORKER NODE 1 Table_1001 Table_1003 WORKER NODE 2 Table_1002 Table_1004 WORKER NODE ‘N’ Each node PostgreSQL instance with Citus installed Replication not shown in diagram • • • • • • SELECT create_distributed_table(‘table’, ‘device_id’);
| Citus Data 1.High write throughput 2.Query planning times for large deployments 3.High Availability (HA) for each node What if you could talk to any node?
| Citus Data • Citus coordinator routes queries to worker nodes. • For workloads that require high write throughput (10B+ writes per day), coordinator could become a bottleneck. High Write Throughput
| Citus Data • The coordinator plans analytical queries for distributed execution. Query Planning in Large Deployments >650K ½-1 shards seconds concurrency L
| Citus Data • When coordinator fails, your cluster can become unavailable up to 1 minute. That’s a long time. • When any node can coordinate, you get higher availability for on a per-shard basis. High Availability (HA) for each shard
| Citus Data • What if better HA were possible? • What if higher write throughput were possible? • What would such a solution’s performance look like? What if we had such a solution?