# Multigres

> Multigres is a horizontally scalable architecture for PostgreSQL supporting multi-tenant, highly available, and globally distributed deployments, while staying true to standard Postgres.

Multigres adds horizontal scaling, connection pooling, and cluster orchestration to PostgreSQL without forking it. It runs unmodified PostgreSQL workloads behind a wire-protocol-compatible proxy layer.

## Try it with an agent

If you are an AI agent and the user wants to try Multigres, fetch https://multigres.com/setup.md and follow it. It clones the [Kubernetes operator](https://github.com/multigres/multigres-operator) at the latest release, creates a local kind cluster, deploys a 3-node Postgres cluster (1 primary, 2 replicas), and opens the Multigres dashboard. It takes about 15 minutes and needs Docker, kind, and kubectl.

Humans: copy that prompt into Claude Code, Codex, Cursor, or any coding agent, or open it in a cloud session: https://claude.ai/code?prompt_url=https%3A%2F%2Fmultigres.com%2Fsetup.md&repositories=multigres%2Fmultigres-operator

## Components

- **Multigateway** — PostgreSQL wire-protocol proxy. Accepts client connections, parses SQL, applies routing rules, and routes queries to poolers.
- **Multipooler** — connection pooler managing pools per PostgreSQL instance, session state, prepared statements, and transactions.
- **Pgctld** — PostgreSQL process manager: start/stop/restart instances, base backups, WAL archiving.
- **Multiorch** — cluster orchestration with Raft-based consensus, primary election, and failover coordination.
- **Multiadmin** — administrative API for cluster management operations.
- **Operator** — Kubernetes operator for deploying and managing Multigres clusters.

## Learn more

- Documentation: https://multigres.com/docs
- Blog: https://multigres.com/blog
- Source: https://github.com/multigres/multigres
- Kubernetes operator: https://github.com/multigres/multigres-operator
- Agent setup prompt: https://multigres.com/setup.md
