# Consensus

> A mechanism that lets a quorum of nodes commit one value, so every correct node ends up with the same value.

Record: `architecture:consensus`
Kind: mechanism
Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)
Severity: contextual
Scope: distributed system, agreement, consistency
Canonical: https://banes-lab.com/ontology#architecture-consensus

Listed in [Architecture principles](https://banes-lab.com/api/records/architecture.md), after [Leader Election](https://banes-lab.com/records/architecture/leader-election.md) and before [Choreography](https://banes-lab.com/records/architecture/choreography.md).

## Repair

- Refactored by: Adopt a Consensus Protocol
- Detected by: divergent committed state across replicas
- Violated by: nodes committing values without quorum agreement
- Measured by: agreement-violation rate
- Enforced by: distributed-systems review

## Requires

- [Quorum](https://banes-lab.com/records/lexicon/quorum.md)

## Reinforces

- [Consistency](https://banes-lab.com/records/architecture/consistency.md)
- [Fault Tolerance](https://banes-lab.com/records/architecture/fault-tolerance.md)

## Enables

- [Agreed Single Value Across Nodes](https://banes-lab.com/records/lexicon/agreed-single-value-across-nodes.md)

## Conflicts with

- [Independent Node Decisions](https://banes-lab.com/records/lexicon/independent-node-decisions.md)

## In tension with

- [Latency](https://banes-lab.com/records/architecture/latency.md)
- [Availability](https://banes-lab.com/records/lexicon/availability.md)

## Tensions

- [Consensus / Latency](https://banes-lab.com/records/tension/consensus-latency.md)
- [Consensus / Availability](https://banes-lab.com/records/tension/availability-consensus.md)

## Severity

- [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)

## Category

- [Control / Coordination / Centralization](https://banes-lab.com/records/architecture-category/control-coordination-centralization.md)

## Required by

- [Total-Order Broadcast](https://banes-lab.com/records/architecture/total-order-broadcast.md)
- [Leader Election](https://banes-lab.com/records/architecture/leader-election.md)

## Linked from

- [Causality / Ordering / Distributed Time](https://banes-lab.com/ontology/principles/architecture-category-causality-ordering-distributed-time.md)
- [Control / Coordination / Centralization](https://banes-lab.com/ontology/principles/architecture-category-control-coordination-centralization.md)
- [Error Handling / Resilience](https://banes-lab.com/ontology/principles/architecture-category-error-handling-resilience.md)
- [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- [Transactions / State / Concurrency](https://banes-lab.com/ontology/principles/architecture-category-transactions-state-concurrency.md)
- [Control / Coordination / Centralization](https://banes-lab.com/ontology/lexicon/lexicon-category-control-coordination-centralization.md)
- [Quality Attributes](https://banes-lab.com/ontology/lexicon/lexicon-category-quality-attributes.md)
- [Severity levels](https://banes-lab.com/ontology/schema/the-vocabulary-severity.md)
- [The resolutions](https://banes-lab.com/ontology/schema/the-resolutions.md)
