Repository navigation
Architecture System Context
Mohammad Rasoul Kazemi edited this page Nov 28, 2026
·
3 revisions
Chapter 3 of the arc42 structure (Architecture), and level 1 of the C4 model: the system as one box, the people and the systems around it.
flowchart TB
admin["Administrator<br/>creates and runs a cluster"]
dev["Application and client<br/>SQL over the PostgreSQL protocol"]
auditor["Auditor<br/>checks the ledger offline"]
monitor["Monitoring system<br/>Prometheus scrape"]
kingres["KingresDB cluster<br/>PostgreSQL with extensions, kingresd, web console"]
anchors["Anchoring targets<br/>WORM store, RFC 3161 authority, OpenTimestamps"]
mirror["Mirrors and monitors<br/>copy the published checkpoints"]
upstream["Upstream PostgreSQL source<br/>REL_18_7 and REL_19_0"]
admin -->|"web console and REST API, HTTPS or HTTP"| kingres
dev -->|"PostgreSQL protocol"| kingres
monitor -->|"GET /metrics with a token"| kingres
kingres -->|"signed note, time-stamp request, calendar submission"| anchors
kingres -->|"publication listener, plain HTTP or TLS"| mirror
auditor -->|"reads the publication, queries a digest"| kingres
auditor -->|"checks anchors with pinned inputs"| anchors
upstream -.->|"merged by hand at a release of PostgreSQL"| kingres
| Neighbour | Interaction | Notes | Source |
|---|---|---|---|
| Administrator | Web console and REST API on the panel port (default 127.0.0.1:8091; plain HTTP unless tls-cert-file and tls-key-file are set); first run uses a one-time setup token |
Accounts are PostgreSQL roles; a role hierarchy decides what an administrator may do | ADR 0015, control-plane README |
| Operator files | An administrator uploads and downloads CSV files of one table and zip archives of one database through the REST API (off until the cluster setting dataTransfer.enabled is on; TLS needed). The server stages them as encrypted files and runs the transfer as the role that asked |
An uploaded archive is treated as hostile input | ADR 0027, Operations |
| Application or client | Ordinary PostgreSQL connections to any server; optionally through the client entry point of kingresd, which forwards to the primary of the group without reading SQL |
The entry point is off unless client-listen is set |
control-plane README |
| Auditor | The standalone verifier (kingres-verify) reads digests, proofs and the published logs and trusts only what the auditor pinned |
Without the pinned inputs the result is "could not check", never success | verifier README, The Verifier |
| Monitoring system |
GET /metrics in the Prometheus text format; needs a stats-role session token or the configured metrics-token
|
No metrics store is bundled | ADR 0020, control-plane README |
| Anchoring targets |
kingresd sends the signed aggregate checkpoint (WORM) or its SHA-256 (TSA, OpenTimestamps) to targets chosen by the administrator |
Target kinds are worm, tsa and ots. The RFC 3161 and OpenTimestamps paths were tested against local fakes only |
Ledger Anchoring, ledger-phase7.md |
| Mirrors and monitors | Anyone may fetch the published checkpoints, tiles, entry bundles, events and key ring from the publication listener, which has no authentication | Off unless ledger-publication-listen is set |
Ledger Signing and Publication, control-plane README |
| Upstream PostgreSQL | The fork is based on a PostgreSQL release tag and takes minor releases by a documented procedure | KingresDB is not endorsed by the PostgreSQL project | upstream-sync.md, releases.md |
| Operating system | systemd unit kingres.service, files under /opt/kingres, /etc/kingres, /var/lib/kingres; or a container |
See Architecture Deployment | packaging README |
- A network time source: the control plane measures and reports the clock difference between servers but does not set the system clock (architecture.md, "Phase 13").
- External key custody: the ledger signing key lives in a file of
kingresd. An external signer is named in the design as an option and is not described as built here (ledger-phase7.md, section 3.2.3). - A global consensus layer: a multi-node ledger with consensus (witnesses and a notary of checkpoints) and atomic visibility of distributed transactions are phase 8, in design since 2026-11-28 and not built; neither is a global snapshot.
The inner structure is on Architecture Containers.
KingresDB's own code is licensed under AGPL-3.0-only. PostgreSQL code keeps the PostgreSQL License. Copyright of the project's own code: RooyeKhat Media Co. KingresDB is derived from PostgreSQL and is not endorsed by the PostgreSQL project. Repository | Licence | COPYRIGHT
KingresDB
1. Product
- Product Overview and Features
- Status and Roadmap
- User Guide
- Administrator Guide
- REST API Reference
- Web Console
- Command Line Client
- Extensions
- Limitations and Known Issues
- Release Notes
Features in detail
- Sharding
- Sharding Query Pushdown
- Sharding Table Lifecycle
- High Availability
- Ledger
- Ledger Signing and Publication
- Ledger Anchoring
- The Verifier
- Analytics Extensions
Administration
- Cluster Setup
- Servers Databases and Roles
- Rebalancing
- Configuration
- Memory and Warm-up
- Control Plane and REST API
- Upgrades
2. Architecture (arc42)
- Architecture
- Architecture Introduction and Goals
- Architecture Constraints
- Architecture System Context
- Architecture Containers
- Architecture Components
- Architecture Runtime Views Sharding
- Architecture Runtime Views Availability and Ledger
- Architecture Deployment
- Architecture Crosscutting Concepts
- Security Model
- Architecture Decisions
- Architecture Quality Requirements
- Architecture Risks and Technical Debt
- Enterprise Architecture
3. Data architecture
- Data Architecture
- Data Model Sharding
- Data Model Ledger
- Data Model System Database
- Data Model Analytics
- Data Lifecycle
- Backup Restore and PITR
- Data Security
- Data Quality and Integrity
4. Development
- Building from Source
- Development and Testing
- Repository Layout
- Coding Standards
- Branching and Synchronisation
- Testing Strategy
- Review Process
- Release Process
- Contributing
5. Operations