Architecture #
Share-Nothing and Asynchronous I/O in Pizza #
Pizza is built upon a robust share-nothing architecture, ensuring complete isolation of resources at both the node and per-CPU level. Each CPU core and associated threads operate independently, without sharing memory or resources with other cores or nodes. Additionally, Pizza embraces a fully asynchronous manner to access I/O and network resources — a monoio/thread-per-core runtime, with io_uring offloading the WAL’s durable-write fsyncs on Linux whenever the kernel supports it.

Why Share-Nothing and Asynchronous I/O? #
The combination of share-nothing architecture and asynchronous I/O enables Pizza to seamlessly scale across large-scale datasets and high-throughput workloads, along with optimal performance and high resource utilization.
Multi-Core Trending and Hardware Considerations #
As hardware trends towards increasing numbers of cores per machine, share-nothing architectures become increasingly relevant and advantageous. With machines featuring thousands of cores becoming more common, share-nothing architectures enable efficient utilization of parallelism without encountering bottlenecks associated with shared resources.
Contention and Locking Issues #
In share-everything architectures, contention for shared resources and locking mechanisms can become significant bottlenecks, especially in highly parallel environments. Share-nothing architectures eliminate these contention points by ensuring each node operates independently, avoiding the need for centralized locking mechanisms and reducing contention-related performance degradation.
Fault Isolation and Resilience #
Pizza’s share-nothing architecture enhances fault isolation and system resilience. Each CPU core and thread operates autonomously, minimizing the impact of failures or performance degradation on other cores or nodes. Similarly, asynchronous I/O operations isolate I/O-related failures, ensuring that failures in one operation do not affect the execution of others.
NUMA and Cache-Friendly Design #
Pizza is designed to be NUMA-friendly and local cache or memory access-friendly. By minimizing memory access latency and optimizing performance on NUMA architectures, Pizza ensures efficient memory access and optimal performance. Additionally, its cache-friendly design eliminates the need to access remote memory in other CPU’s address spaces, reducing cache coherency overhead and improving overall performance.
Asynchronous I/O #
Pizza employs asynchronous I/O for efficient, non-blocking I/O operations, enhancing performance and scalability. Unlike traditional synchronous I/O, which involves blocking system calls, asynchronous I/O enables Pizza to reduce latency and improve resource utilization, especially in I/O-bound scenarios. On Linux, io_uring — a high-performance asynchronous I/O framework in the kernel — offloads the WAL’s durable-write fsyncs automatically whenever the kernel supports it, minimizing system call overhead on the write path.