Skip to content

Architecture overview

PgDog is written in the Rust programming language. It is also asynchronous, powered by the Tokio runtime. This allows PgDog to serve hundreds of thousands of connections on one machine and to take advantage of multiple CPUs.

Plugins

Plugins are shared libraries (.so on Linux, .dylib on Mac, .dll on Windows) loaded at startup. This allows to change many aspects of PgDog functionality without altering or recompiling internal source code.

PostgreSQL protocol

PgDog speaks the PostgreSQL frontend/backend protocol. This allows it to act as an application layer (OSI Level 7) proxy and multiplex client/server connections. It can also alter connection state to suit operational needs, e.g. rolling back unfinished transactions, changing server settings, clearing session variables.

Learn more