# Scalability / Performance / Optimization

> Every principle in this category is listed as a record.

Page: Ontology · Principles
Canonical: https://banes-lab.com/ontology#architecture-category-scalability-performance-optimization

Listed in [Ontology · Principles](https://banes-lab.com/api/pages/ontology/principles.md), after [Structural Patterns](https://banes-lab.com/ontology/principles/architecture-category-structural-patterns.md) and before [Streaming / Pipeline / Dataflow Processing](https://banes-lab.com/ontology/principles/architecture-category-streaming-pipeline-dataflow-processing.md).

Every principle in this category is listed as a record. Each record carries its kind, its severity, the scopes it applies at and the layer it lives in, then the edge relations that join it to other records, the records that point back at it, the contracts that answer to it and the tensions it takes part in. The descriptors say how it is violated, detected, measured, repaired and enforced. Where the record carries one, an exemplar shows the shape before and after the principle is applied.

Relations diagram

The relations inside this category.

```mermaid
flowchart LR
n_scalability["Scalability"]
n_horizontal_scaling["Horizontal Scaling"]
n_vertical_scaling["Vertical Scaling"]
n_elasticity["Elasticity"]
n_load_balancing["Load Balancing"]
n_sharding["Sharding"]
n_partitioning["Partitioning"]
n_caching["Caching"]
n_statelessness["Statelessness"]
n_concurrency["Concurrency"]
n_parallelism["Parallelism"]
n_throughput["Throughput"]
n_latency["Latency"]
n_performance_engineering["Performance Engineering"]
n_algorithmic_efficiency["Algorithmic Efficiency"]
n_time_complexity["Time Complexity"]
n_space_complexity["Space Complexity"]
n_big_o_notation["Big O Notation"]
n_optimization["Optimization"]
n_profiling["Profiling"]
n_benchmarking["Benchmarking"]
n_bottleneck_analysis["Bottleneck Analysis"]
n_resource_utilization["Resource Utilization"]
n_rate_limiting["Rate Limiting"]
n_memory_efficiency["Memory Efficiency"]
n_cdn_edge_caching["CDN / Edge Caching"]
n_read_replica["Read Replica"]
n_queuing_theory["Queuing Theory"]
n_scalability --> n_performance_engineering
n_horizontal_scaling --> n_elasticity
n_elasticity --> n_scalability
n_load_balancing --> n_scalability
n_sharding --> n_horizontal_scaling
n_partitioning --> n_scalability
n_partitioning --> n_parallelism
n_caching --> n_scalability
n_statelessness --> n_horizontal_scaling
n_statelessness --> n_load_balancing
n_concurrency --> n_throughput
n_parallelism --> n_throughput
n_throughput --> n_scalability
n_throughput -.-> n_latency
n_latency --> n_performance_engineering
n_performance_engineering --> n_profiling
n_performance_engineering --> n_benchmarking
n_performance_engineering --> n_scalability
n_algorithmic_efficiency --> n_scalability
n_time_complexity --> n_algorithmic_efficiency
n_time_complexity -.-> n_space_complexity
n_space_complexity --> n_resource_utilization
n_space_complexity -.-> n_time_complexity
n_big_o_notation --> n_algorithmic_efficiency
n_optimization --> n_profiling
n_optimization --> n_performance_engineering
n_profiling --> n_performance_engineering
n_benchmarking --> n_performance_engineering
n_bottleneck_analysis --> n_profiling
n_bottleneck_analysis --> n_optimization
n_resource_utilization --> n_performance_engineering
n_memory_efficiency --> n_scalability
n_cdn_edge_caching --> n_caching
n_cdn_edge_caching --> n_latency
n_read_replica --> n_horizontal_scaling
n_read_replica --> n_load_balancing
n_queuing_theory --> n_latency
```

### Scalability

- Kind: [quality-attribute](https://banes-lab.com/records/kind/quality-attribute.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: service, system, infrastructure
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
The degree to which a system keeps its throughput and latency as load grows, by adding resources.

Requires
[Load Model](https://banes-lab.com/records/lexicon/load-model.md), [Bottleneck Awareness](https://banes-lab.com/records/lexicon/bottleneck-awareness.md)

Reinforces
[Performance Engineering](https://banes-lab.com/records/architecture/performance-engineering.md)

Enables
[Growth Handling](https://banes-lab.com/records/lexicon/growth-handling.md)

In tension with
[Simplicity](https://banes-lab.com/records/lexicon/simplicity.md), [Consistency](https://banes-lab.com/records/architecture/consistency.md)

Conflicts with
[Fixed-Capacity Design](https://banes-lab.com/records/lexicon/fixed-capacity-design.md)

Referenced by
[Service Discovery](https://banes-lab.com/records/architecture/service-discovery.md), [Message Broker](https://banes-lab.com/records/architecture/message-broker.md), [CQRS](https://banes-lab.com/records/architecture/command-query-responsibility-segregation.md), [Eventual Consistency](https://banes-lab.com/records/architecture/eventual-consistency.md), [Elasticity](https://banes-lab.com/records/architecture/elasticity.md), [Load Balancing](https://banes-lab.com/records/architecture/load-balancing.md), [Partitioning](https://banes-lab.com/records/architecture/partitioning.md), [Caching](https://banes-lab.com/records/architecture/caching.md), [Throughput](https://banes-lab.com/records/architecture/throughput.md), [Performance Engineering](https://banes-lab.com/records/architecture/performance-engineering.md), [Algorithmic Efficiency](https://banes-lab.com/records/architecture/algorithmic-efficiency.md), [Memory Efficiency](https://banes-lab.com/records/architecture/memory-efficiency.md), [Stateless Processing](https://banes-lab.com/records/architecture/stateless-processing.md), [Replication](https://banes-lab.com/records/architecture/replication.md), [Microservices](https://banes-lab.com/records/architecture/microservices.md)

Tensions
[Scalability / Simplicity](https://banes-lab.com/records/tension/scalability-simplicity.md), [Scalability / Consistency](https://banes-lab.com/records/tension/consistency-scalability.md)

Distinct from
[Elasticity](https://banes-lab.com/records/architecture/elasticity.md): Scalability is keeping throughput as load grows by adding resources, while elasticity is those resources following demand automatically in both directions.

Distinct from
[Low Coupling](https://banes-lab.com/records/architecture/low-coupling.md): Scalability is growing with load, while low coupling is changing without ripple.

Distinct from
[Memory Efficiency](https://banes-lab.com/records/architecture/memory-efficiency.md): Scalability is growth by adding resources, while memory efficiency is bounded use of the resources one process has.

Distinct from
[Resilience](https://banes-lab.com/records/architecture/resilience.md): Scalability is holding performance under load, while resilience is containing and recovering from failure.

Distinct from
[Testability](https://banes-lab.com/records/architecture/testability.md): Scalability is growing with load, while testability is running code in isolation.

Distinct from
[Cost Efficiency](https://banes-lab.com/records/lexicon/cost-efficiency.md): Scalability is keeping throughput as load grows, while cost efficiency is the resource cost of the work.

Distinct from
[Resource Efficiency](https://banes-lab.com/records/lexicon/resource-efficiency.md): Scalability adds resources to meet load, while resource efficiency uses as few as possible for the same work.

Distinct from
[Simplicity](https://banes-lab.com/records/lexicon/simplicity.md): Scalability is growth with load, while simplicity is the absence of the structure that growth tends to add.

Distinct from
[Availability](https://banes-lab.com/records/lexicon/availability.md): Scalability is performance under growing load, while availability is the share of time the system serves at all.

Violated by
single bottleneck preventing growth

Detected by
saturation under load test

Measured by
throughput under increasing load

Refactored by
Add Caching, [Partitioning](https://banes-lab.com/records/architecture/partitioning.md), Async Processing, Scaling

Enforced by
load tests, SLO gates

Before

```typescript
class FooServer {
private readonly foos = new Map<FooId, Foo>();
handle(request: FooRequest) { return processFoo(request, this.foos); }
}
```

After

```typescript
class FooServer {
constructor(private readonly store: DistributedFooStore) {}
handle(request: FooRequest) { return processFoo(request, this.store); }
}
```

How it is checked

Checked by
load tests, SLO gates

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Load Model](https://banes-lab.com/records/lexicon/load-model.md), [Bottleneck Awareness](https://banes-lab.com/records/lexicon/bottleneck-awareness.md), [Performance Engineering](https://banes-lab.com/records/architecture/performance-engineering.md), [Growth Handling](https://banes-lab.com/records/lexicon/growth-handling.md)

Shape it refuses
[Fixed-Capacity Design](https://banes-lab.com/records/lexicon/fixed-capacity-design.md)

### Horizontal Scaling

- Kind: [technique](https://banes-lab.com/records/kind/technique.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: service, infrastructure
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A technique for adding capacity by running more stateless instances of a service behind a load balancer.

Requires
[Statelessness or Shared State Strategy](https://banes-lab.com/records/lexicon/statelessness-or-shared-state-strategy.md)

Reinforces
[Elasticity](https://banes-lab.com/records/architecture/elasticity.md), [Availability](https://banes-lab.com/records/lexicon/availability.md)

Enables
[Scale-Out](https://banes-lab.com/records/lexicon/scale-out.md)

In tension with
[Distributed Coordination](https://banes-lab.com/records/lexicon/distributed-coordination.md)

Conflicts with
[Instance-Local State](https://banes-lab.com/records/lexicon/instance-local-state.md)

Referenced by
[Competing Consumers](https://banes-lab.com/records/architecture/competing-consumers.md), [Sharding](https://banes-lab.com/records/architecture/sharding.md), [Statelessness](https://banes-lab.com/records/architecture/statelessness.md), [Read Replica](https://banes-lab.com/records/architecture/read-replica.md), [Space-Based Architecture](https://banes-lab.com/records/architecture/space-based-architecture.md)

Tensions
[Horizontal Scaling / Distributed Coordination](https://banes-lab.com/records/tension/distributed-coordination-horizontal-scaling.md)

Violated by
sticky instance state required for correctness

Detected by
local session/state coupling

Measured by
scale-out efficiency

Refactored by
Externalize State, Add Load Balancer

Enforced by
deployment tests

Before

```typescript
deployFoo({ replicas: 1, cpu: 32, memoryGb: 128 });
```

After

```typescript
deployFoo({ replicas: 12, cpu: 2, memoryGb: 4, stateless: true });
```

How it is checked

Checked by
deployment tests

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Statelessness or Shared State Strategy](https://banes-lab.com/records/lexicon/statelessness-or-shared-state-strategy.md), [Elasticity](https://banes-lab.com/records/architecture/elasticity.md), [Availability](https://banes-lab.com/records/lexicon/availability.md), [Scale-Out](https://banes-lab.com/records/lexicon/scale-out.md)

Shape it refuses
[Instance-Local State](https://banes-lab.com/records/lexicon/instance-local-state.md)

### Vertical Scaling

- Kind: [technique](https://banes-lab.com/records/kind/technique.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: infrastructure, process
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A technique for adding capacity by giving one instance more CPU, memory or I/O.

Requires
[Resource Headroom](https://banes-lab.com/records/lexicon/resource-headroom.md)

Reinforces
[Simplicity](https://banes-lab.com/records/lexicon/simplicity.md)

Enables
[Capacity Increase without Distribution](https://banes-lab.com/records/lexicon/capacity-increase-without-distribution.md)

In tension with
[Cost/Limit](https://banes-lab.com/records/lexicon/cost-limit.md)

Conflicts with
[Hard Resource Ceiling](https://banes-lab.com/records/lexicon/hard-resource-ceiling.md)

Tensions
[Vertical Scaling / Cost/Limit](https://banes-lab.com/records/tension/cost-limit-vertical-scaling.md)

Violated by
relying only on vertical scale past ceiling

Detected by
resource saturation trends

Measured by
utilization/headroom

Refactored by
Optimize Resources, Prepare Horizontal Scale

Enforced by
[capacity planning](https://banes-lab.com/records/lexicon/capacity-planning.md)

Before

```typescript
deployFoo({ cpu: 1, memoryGb: 1 });
queueFooWhenSaturated();
```

After

```typescript
deployFoo({ cpu: 8, memoryGb: 32 });
verifyFooCapacity({ targetConcurrency: 200 });
```

How it is checked

Checked by
capacity planning

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Resource Headroom](https://banes-lab.com/records/lexicon/resource-headroom.md), [Simplicity](https://banes-lab.com/records/lexicon/simplicity.md), [Capacity Increase without Distribution](https://banes-lab.com/records/lexicon/capacity-increase-without-distribution.md)

Shape it refuses
[Hard Resource Ceiling](https://banes-lab.com/records/lexicon/hard-resource-ceiling.md)

### Elasticity

- Kind: [quality-attribute](https://banes-lab.com/records/kind/quality-attribute.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: deployment, infrastructure
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
The degree to which a system's provisioned capacity follows demand up and down automatically.

Requires
[Auto-Scaling](https://banes-lab.com/records/architecture/auto-scaling.md), [Metrics](https://banes-lab.com/records/lexicon/metrics.md)

Reinforces
[Scalability](https://banes-lab.com/records/architecture/scalability.md), [Cost Efficiency](https://banes-lab.com/records/lexicon/cost-efficiency.md)

Enables
[Dynamic Capacity](https://banes-lab.com/records/lexicon/dynamic-capacity.md)

In tension with
[Warm-Up Latency](https://banes-lab.com/records/lexicon/warm-up-latency.md)

Conflicts with
[Fixed Provisioning](https://banes-lab.com/records/lexicon/fixed-provisioning.md)

Referenced by
[Horizontal Scaling](https://banes-lab.com/records/architecture/horizontal-scaling.md), [Auto-Scaling](https://banes-lab.com/records/architecture/auto-scaling.md), [Space-Based Architecture](https://banes-lab.com/records/architecture/space-based-architecture.md)

Tensions
[Elasticity / Warm-Up Latency](https://banes-lab.com/records/tension/elasticity-warm-up-latency.md)

Distinct from
[Availability](https://banes-lab.com/records/lexicon/availability.md): Elasticity is capacity following demand, while availability is the share of time the system can serve.

Distinct from
[Cost Efficiency](https://banes-lab.com/records/lexicon/cost-efficiency.md): Elasticity is capacity following demand, while cost efficiency is the work done per unit of resource cost.

Distinct from
[Warm-Up Latency](https://banes-lab.com/records/lexicon/warm-up-latency.md): Elasticity adds capacity when demand rises, while warm-up latency is the delay before that capacity can serve.

Violated by
capacity not adapting to demand

Detected by
under/over-provisioning patterns

Measured by
scale response time, utilization

Refactored by
Add Scaling Policy, Remove Stateful Constraint

Enforced by
infrastructure policy

Before

```typescript
deployFooWorkers({ replicas: 10 });
```

After

```typescript
deployFooWorkers({
minReplicas: 2,
maxReplicas: 50,
target: { queueDepthPerReplica: 100 },
});
```

How it is checked

Checked by
infrastructure policy

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Auto-Scaling](https://banes-lab.com/records/architecture/auto-scaling.md), [Metrics](https://banes-lab.com/records/lexicon/metrics.md), [Scalability](https://banes-lab.com/records/architecture/scalability.md), [Cost Efficiency](https://banes-lab.com/records/lexicon/cost-efficiency.md), [Dynamic Capacity](https://banes-lab.com/records/lexicon/dynamic-capacity.md)

Shape it refuses
[Fixed Provisioning](https://banes-lab.com/records/lexicon/fixed-provisioning.md)

### Load Balancing

- Kind: [mechanism](https://banes-lab.com/records/kind/mechanism.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: traffic, service
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A mechanism that spreads incoming requests across healthy instances of a service.

Requires
[Multiple Targets](https://banes-lab.com/records/lexicon/multiple-targets.md), [Health Checks](https://banes-lab.com/records/architecture/health-checks.md)

Reinforces
[Availability](https://banes-lab.com/records/lexicon/availability.md), [Scalability](https://banes-lab.com/records/architecture/scalability.md)

Enables
[Traffic Distribution](https://banes-lab.com/records/lexicon/traffic-distribution.md)

In tension with
[Session Affinity](https://banes-lab.com/records/lexicon/session-affinity.md)

Conflicts with
[Single Target Routing](https://banes-lab.com/records/lexicon/single-target-routing.md)

Referenced by
[Competing Consumers](https://banes-lab.com/records/architecture/competing-consumers.md), [Statelessness](https://banes-lab.com/records/architecture/statelessness.md), [Read Replica](https://banes-lab.com/records/architecture/read-replica.md), [Health Checks](https://banes-lab.com/records/architecture/health-checks.md)

Tensions
[Load Balancing / Session Affinity](https://banes-lab.com/records/tension/load-balancing-session-affinity.md)

Violated by
uneven traffic causing hotspots

Detected by
skewed instance utilization

Measured by
request distribution, [latency](https://banes-lab.com/records/architecture/latency.md)

Refactored by
Add Load Balancer, Externalize Session State

Enforced by
infrastructure config checks

Before

```typescript
const endpoint = fooServers[0];
endpoint.handle(request);
```

After

```typescript
const endpoint = fooLoadBalancer.next({ key: request.fooId });
endpoint.handle(request);
```

How it is checked

Checked by
infrastructure config checks

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Multiple Targets](https://banes-lab.com/records/lexicon/multiple-targets.md), [Health Checks](https://banes-lab.com/records/architecture/health-checks.md), [Availability](https://banes-lab.com/records/lexicon/availability.md), [Scalability](https://banes-lab.com/records/architecture/scalability.md), [Traffic Distribution](https://banes-lab.com/records/lexicon/traffic-distribution.md)

Shape it refuses
[Single Target Routing](https://banes-lab.com/records/lexicon/single-target-routing.md)

### Sharding

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: database, storage, messaging
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A design pattern that splits a dataset across separate stores by a shard key, and routes each request to the shard that holds its key.

Requires
[Partition Key](https://banes-lab.com/records/lexicon/partition-key.md)

Reinforces
[Horizontal Scaling](https://banes-lab.com/records/architecture/horizontal-scaling.md)

Enables
[Large Dataset Scaling](https://banes-lab.com/records/lexicon/large-dataset-scaling.md)

In tension with
[Cross-Shard Queries](https://banes-lab.com/records/lexicon/cross-shard-queries.md)

Conflicts with
[Single Monolithic Store](https://banes-lab.com/records/lexicon/single-monolithic-store.md)

Tensions
[Sharding / Cross-Shard Queries](https://banes-lab.com/records/tension/cross-shard-queries-sharding.md)

Violated by
unbounded single partition growth

Detected by
hotspot partitions, storage bottleneck

Measured by
shard balance, query fan-out

Refactored by
Introduce Shard Key, Split Data

Enforced by
data architecture review

Before

```typescript
const foo = await singleFooDatabase.find(id);
```

After

```typescript
const shard = fooShardMap.resolve(id);
const foo = await shard.find(id);
```

How it is checked

Checked by
data architecture review

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Partition Key](https://banes-lab.com/records/lexicon/partition-key.md), [Horizontal Scaling](https://banes-lab.com/records/architecture/horizontal-scaling.md), [Large Dataset Scaling](https://banes-lab.com/records/lexicon/large-dataset-scaling.md)

Shape it refuses
[Single Monolithic Store](https://banes-lab.com/records/lexicon/single-monolithic-store.md)

### Partitioning

- Kind: [technique](https://banes-lab.com/records/kind/technique.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: data, workload, service
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A technique for dividing data or work into independent partitions by a key, so each can be processed in parallel.

Requires
[Partition Strategy](https://banes-lab.com/records/lexicon/partition-strategy.md)

Reinforces
[Scalability](https://banes-lab.com/records/architecture/scalability.md), [Isolation](https://banes-lab.com/records/architecture/isolation.md)

Enables
[Parallelism](https://banes-lab.com/records/architecture/parallelism.md)

In tension with
[Rebalancing Complexity](https://banes-lab.com/records/lexicon/rebalancing-complexity.md)

Conflicts with
[Global Shared State](https://banes-lab.com/records/lexicon/global-shared-state.md)

Tensions
[Partitioning / Rebalancing Complexity](https://banes-lab.com/records/tension/partitioning-rebalancing-complexity.md)

Distinct from
[Parallelism](https://banes-lab.com/records/architecture/parallelism.md): Partitioning divides data or work by a key, while parallelism runs the independent parts at the same time.

Violated by
no partitioning for unbounded workload

Detected by
hotspot resource usage

Measured by
partition balance

Refactored by
Add Partition Key, Split Workload

Enforced by
[architecture review](https://banes-lab.com/records/architecture/architecture-review.md)

Before

```typescript
const events = await fooLog.readAll();
```

After

```typescript
const partition = hash(fooId) % partitionCount;
const events = await fooLog.readPartition(partition);
```

How it is checked

Checked by
architecture review

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Partition Strategy](https://banes-lab.com/records/lexicon/partition-strategy.md), [Scalability](https://banes-lab.com/records/architecture/scalability.md), [Isolation](https://banes-lab.com/records/architecture/isolation.md), [Parallelism](https://banes-lab.com/records/architecture/parallelism.md)

Shape it refuses
[Global Shared State](https://banes-lab.com/records/lexicon/global-shared-state.md)

### Caching

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: data access, computation, API
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A design pattern that stores the result of an expensive read or computation under a key derived from every input it depends on, and serves it again while that key matches.

Requires
[Invalidation Policy](https://banes-lab.com/records/lexicon/invalidation-policy.md)

Reinforces
[Latency Reduction](https://banes-lab.com/records/lexicon/latency-reduction.md), [Scalability](https://banes-lab.com/records/architecture/scalability.md)

Enables
[Reduced Load](https://banes-lab.com/records/lexicon/reduced-load.md)

In tension with
[Consistency](https://banes-lab.com/records/architecture/consistency.md), [Always-Fresh Reads](https://banes-lab.com/records/lexicon/always-fresh-reads.md)

Conflicts with
[Cache Poisoning by Design](https://banes-lab.com/records/architecture/cache-poisoning-by-design.md)

Referenced by
[CDN / Edge Caching](https://banes-lab.com/records/architecture/cdn-edge-caching.md)

Tensions
[Caching / Consistency](https://banes-lab.com/records/tension/caching-consistency.md), [Caching / Always-Fresh Reads](https://banes-lab.com/records/tension/always-fresh-reads-caching.md)

Violated by
repeated expensive computation/query with stable result

Detected by
hot repeated reads, high latency calls

Measured by
hit ratio, stale read rate

Refactored by
Add Cache, Key by Input Fingerprint, Define Invalidation

Enforced by
performance tests

Before

```typescript
async function loadFoo(id: FooId) { return fooStore.find(id); }
```

After

```typescript
async function loadFoo(id: FooId) {
const key = fingerprint(id, await fooStore.versionOf(id));
const cached = await fooCache.get(key);
if (cached) return cached;
const foo = await fooStore.find(id);
if (foo) await fooCache.set(key, foo);
return foo;
}
```

How it is checked

Checked by
performance tests

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Invalidation Policy](https://banes-lab.com/records/lexicon/invalidation-policy.md), [Latency Reduction](https://banes-lab.com/records/lexicon/latency-reduction.md), [Scalability](https://banes-lab.com/records/architecture/scalability.md), [Reduced Load](https://banes-lab.com/records/lexicon/reduced-load.md)

Shape it refuses
[Cache Poisoning by Design](https://banes-lab.com/records/architecture/cache-poisoning-by-design.md)

### Statelessness

- Kind: [principle](https://banes-lab.com/records/kind/principle.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [recommended](https://banes-lab.com/records/vocabulary/severity-recommended.md)
- Scope: service, process, handler
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A design rule that a handler keeps no request state between calls, so any instance can serve any request.

Requires
[Externalized State](https://banes-lab.com/records/lexicon/externalized-state.md)

Reinforces
[Horizontal Scaling](https://banes-lab.com/records/architecture/horizontal-scaling.md), [Resilience](https://banes-lab.com/records/architecture/resilience.md)

Enables
[Load Balancing](https://banes-lab.com/records/architecture/load-balancing.md), [Auto-Scaling](https://banes-lab.com/records/architecture/auto-scaling.md)

In tension with
[State Access Latency](https://banes-lab.com/records/lexicon/state-access-latency.md)

Conflicts with
[Instance Affinity](https://banes-lab.com/records/lexicon/instance-affinity.md), [Temporal Coupling](https://banes-lab.com/records/architecture/temporal-coupling.md)

Tensions
[Statelessness / State Access Latency](https://banes-lab.com/records/tension/state-access-latency-statelessness.md)

Violated by
correctness depends on in-memory instance state

Detected by
mutable static/session-local state

Measured by
state externalization coverage

Refactored by
Move State to Store, Use Token/Session Store

Enforced by
architecture tests

Before

```typescript
class FooHandler {
private currentUser?: User;
handle(request: Request) {
this.currentUser = request.user;
return processFoo(request, this.currentUser);
}
}
```

After

```typescript
class FooHandler {
handle(request: Request) {
return processFoo(request, request.user);
}
}
```

How it is checked

Checked by
architecture tests

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Externalized State](https://banes-lab.com/records/lexicon/externalized-state.md), [Horizontal Scaling](https://banes-lab.com/records/architecture/horizontal-scaling.md), [Resilience](https://banes-lab.com/records/architecture/resilience.md), [Load Balancing](https://banes-lab.com/records/architecture/load-balancing.md), [Auto-Scaling](https://banes-lab.com/records/architecture/auto-scaling.md)

Shape it refuses
[Instance Affinity](https://banes-lab.com/records/lexicon/instance-affinity.md), [Temporal Coupling](https://banes-lab.com/records/architecture/temporal-coupling.md)

### Concurrency

- Kind: [model](https://banes-lab.com/records/kind/model.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: runtime, service, algorithm
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A conceptual representation of several tasks in progress over overlapping time, with their access to shared state coordinated.

Requires
[Concurrency Control](https://banes-lab.com/records/architecture/concurrency-control.md)

Reinforces
[Throughput](https://banes-lab.com/records/architecture/throughput.md)

Enables
[Overlapping Work](https://banes-lab.com/records/lexicon/overlapping-work.md)

In tension with
[Complexity](https://banes-lab.com/records/lexicon/complexity.md)

Conflicts with
[Race Conditions](https://banes-lab.com/records/lexicon/race-conditions.md)

Tensions
[Concurrency / Complexity](https://banes-lab.com/records/tension/complexity-concurrency.md)

Violated by
unsafe shared mutation

Detected by
data races, flaky concurrent tests

Measured by
[throughput](https://banes-lab.com/records/architecture/throughput.md), race count

Refactored by
Add Synchronization, Use Immutable State

Enforced by
race detectors, [tests](https://banes-lab.com/records/lexicon/tests.md)

Refused by rules
concurrency

Before

```typescript
for (const foo of foos) await processFoo(foo);
```

After

```typescript
await Promise.all(foos.map(foo => processFoo(foo)));
```

How it is checked

Checked by
race detectors, tests

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Concurrency Control](https://banes-lab.com/records/architecture/concurrency-control.md), [Throughput](https://banes-lab.com/records/architecture/throughput.md), [Overlapping Work](https://banes-lab.com/records/lexicon/overlapping-work.md)

Shape it refuses
[Race Conditions](https://banes-lab.com/records/lexicon/race-conditions.md)

### Parallelism

- Kind: [technique](https://banes-lab.com/records/kind/technique.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: algorithm, processing, runtime
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A technique for running independent units of work at the same time on several cores or workers.

Requires
[Independent Work Units](https://banes-lab.com/records/lexicon/independent-work-units.md)

Reinforces
[Throughput](https://banes-lab.com/records/architecture/throughput.md), [Performance](https://banes-lab.com/records/lexicon/performance.md)

Enables
[Multi-Core Utilization](https://banes-lab.com/records/lexicon/multi-core-utilization.md)

In tension with
[Coordination Overhead](https://banes-lab.com/records/lexicon/coordination-overhead.md)

Conflicts with
[Sequential Bottleneck](https://banes-lab.com/records/lexicon/sequential-bottleneck.md)

Referenced by
[Causality](https://banes-lab.com/records/architecture/causality.md), [Partitioning](https://banes-lab.com/records/architecture/partitioning.md), [Fan-out/Fan-in](https://banes-lab.com/records/architecture/fan-out-fan-in.md)

Tensions
[Parallelism / Coordination Overhead](https://banes-lab.com/records/tension/coordination-overhead-parallelism.md)

Violated by
serial processing of independent heavy tasks

Detected by
CPU bottlenecks with independent work

Measured by
speedup, utilization

Refactored by
Split Work, Add Parallel Execution

Enforced by
performance benchmarks

Before

```typescript
const results = foos.map(foo => cpuHeavyFoo(foo));
```

After

```typescript
const results = await workerPool.map(foos, foo => cpuHeavyFoo(foo));
```

How it is checked

Checked by
performance benchmarks

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Independent Work Units](https://banes-lab.com/records/lexicon/independent-work-units.md), [Throughput](https://banes-lab.com/records/architecture/throughput.md), [Performance](https://banes-lab.com/records/lexicon/performance.md), [Multi-Core Utilization](https://banes-lab.com/records/lexicon/multi-core-utilization.md)

Shape it refuses
[Sequential Bottleneck](https://banes-lab.com/records/lexicon/sequential-bottleneck.md)

### Throughput

- Kind: [metric](https://banes-lab.com/records/kind/metric.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: service, pipeline, system
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
The rate at which a system completes requests, messages or items, counted per unit of time.

Requires
[Capacity Model](https://banes-lab.com/records/lexicon/capacity-model.md)

Reinforces
[Scalability](https://banes-lab.com/records/architecture/scalability.md)

Enables
[Load Handling](https://banes-lab.com/records/lexicon/load-handling.md)

In tension with
[Latency](https://banes-lab.com/records/architecture/latency.md)

Conflicts with
[Bottlenecks](https://banes-lab.com/records/lexicon/bottlenecks.md)

Referenced by
[Event Ordering](https://banes-lab.com/records/architecture/event-ordering.md), [PACELC Theorem](https://banes-lab.com/records/architecture/pacelc-theorem.md), [Backpressure](https://banes-lab.com/records/architecture/backpressure.md), [Code Review](https://banes-lab.com/records/architecture/code-review.md), [Concurrency](https://banes-lab.com/records/architecture/concurrency.md), [Parallelism](https://banes-lab.com/records/architecture/parallelism.md), [Fan-out/Fan-in](https://banes-lab.com/records/architecture/fan-out-fan-in.md), [Isolation](https://banes-lab.com/records/architecture/isolation.md)

Tensions
[Throughput / Latency](https://banes-lab.com/records/tension/latency-throughput.md)

Distinct from
[Latency](https://banes-lab.com/records/architecture/latency.md): Throughput counts completions per unit of time, while latency measures the time of one request.

Violated by
processing rate below SLO

Detected by
load test failures

Measured by
requests/messages/items per second

Refactored by
Optimize Bottleneck, Add Parallelism, Add Scaling

Enforced by
performance gates

Before

```typescript
for (const foo of foos) await fooStore.save(foo);
```

After

```typescript
for (const batch of chunk(foos, 500)) await fooStore.saveBatch(batch);
```

How it is checked

Checked by
performance gates

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Capacity Model](https://banes-lab.com/records/lexicon/capacity-model.md), [Scalability](https://banes-lab.com/records/architecture/scalability.md), [Load Handling](https://banes-lab.com/records/lexicon/load-handling.md)

Shape it refuses
[Bottlenecks](https://banes-lab.com/records/lexicon/bottlenecks.md)

### Latency

- Kind: [metric](https://banes-lab.com/records/kind/metric.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: API, service, user flow
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A measure of the time between a request and its response, usually reported at percentiles.

Requires
[Time Budget](https://banes-lab.com/records/lexicon/time-budget.md)

Reinforces
[User Experience](https://banes-lab.com/records/lexicon/user-experience.md), [Performance Engineering](https://banes-lab.com/records/architecture/performance-engineering.md)

Enables
[Responsiveness](https://banes-lab.com/records/lexicon/responsiveness.md)

In tension with
[Throughput/Batching](https://banes-lab.com/records/lexicon/throughput-batching.md)

Conflicts with
[Long Blocking Work](https://banes-lab.com/records/lexicon/long-blocking-work.md)

Referenced by
[Total-Order Broadcast](https://banes-lab.com/records/architecture/total-order-broadcast.md), [CAP Theorem](https://banes-lab.com/records/architecture/cap-theorem.md), [PACELC Theorem](https://banes-lab.com/records/architecture/pacelc-theorem.md), [Consensus](https://banes-lab.com/records/architecture/consensus.md), [Message Queue](https://banes-lab.com/records/architecture/message-queue.md), [Throughput](https://banes-lab.com/records/architecture/throughput.md), [CDN / Edge Caching](https://banes-lab.com/records/architecture/cdn-edge-caching.md), [Queuing Theory](https://banes-lab.com/records/architecture/queuing-theory.md), [Consistency](https://banes-lab.com/records/architecture/consistency.md), [Pessimistic Locking](https://banes-lab.com/records/architecture/pessimistic-locking.md)

Tensions
[Latency / Throughput/Batching](https://banes-lab.com/records/tension/latency-throughput-batching.md)

Violated by
response time above SLO

Detected by
trace span delays

Measured by
p50/p95/p99 latency

Refactored by
Cache, Async Offload, Optimize Query

Enforced by
SLO gates

Before

```typescript
async function renderFoo(id: FooId) {
const foo = await fooStore.find(id);
const bar = await barStore.find(foo.barId);
const baz = await bazStore.find(foo.bazId);
return render(foo, bar, baz);
}
```

After

```typescript
async function renderFoo(id: FooId) {
const foo = await fooStore.find(id);
const [bar, baz] = await Promise.all([
barStore.find(foo.barId),
bazStore.find(foo.bazId),
]);
return render(foo, bar, baz);
}
```

How it is checked

Checked by
SLO gates

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Time Budget](https://banes-lab.com/records/lexicon/time-budget.md), [User Experience](https://banes-lab.com/records/lexicon/user-experience.md), [Performance Engineering](https://banes-lab.com/records/architecture/performance-engineering.md), [Responsiveness](https://banes-lab.com/records/lexicon/responsiveness.md)

Shape it refuses
[Long Blocking Work](https://banes-lab.com/records/lexicon/long-blocking-work.md)

### Performance Engineering

- Kind: [activity](https://banes-lab.com/records/kind/activity.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [recommended](https://banes-lab.com/records/vocabulary/severity-recommended.md)
- Scope: codebase, service, system
- Aliases: Evidence-Based Optimization
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
The practice of setting performance budgets, measuring against a representative workload and changing code only where a measurement points.

Requires
[Profiling](https://banes-lab.com/records/architecture/profiling.md), [Benchmarking](https://banes-lab.com/records/architecture/benchmarking.md)

Reinforces
[Scalability](https://banes-lab.com/records/architecture/scalability.md), [Resource Efficiency](https://banes-lab.com/records/lexicon/resource-efficiency.md)

Enables
none

In tension with
[Maintainability](https://banes-lab.com/records/lexicon/maintainability.md)

Conflicts with
[Guess-Based Optimization](https://banes-lab.com/records/lexicon/guess-based-optimization.md)

Referenced by
[Scalability](https://banes-lab.com/records/architecture/scalability.md), [Latency](https://banes-lab.com/records/architecture/latency.md), [Optimization](https://banes-lab.com/records/architecture/optimization.md), [Profiling](https://banes-lab.com/records/architecture/profiling.md), [Benchmarking](https://banes-lab.com/records/architecture/benchmarking.md), [Resource Utilization](https://banes-lab.com/records/architecture/resource-utilization.md)

Contracts
[Performance Core](https://banes-lab.com/records/algorithms/performance-core.md)

Tensions
[Performance Engineering / Maintainability](https://banes-lab.com/records/tension/maintainability-performance-engineering.md)

Distinct from
[Benchmarking](https://banes-lab.com/records/architecture/benchmarking.md): Performance engineering is the practice that sets budgets and acts on measurements, while benchmarking is the controlled timing it measures with.

Violated by
optimization without measurement

Detected by
performance changes lacking benchmark

Measured by
benchmark trend, SLO compliance

Refactored by
Profile, Optimize Bottleneck, Add Benchmark

Enforced by
performance CI

Before

```typescript
optimizeFooCode();
```

After

```typescript
const budget = { p95LatencyMs: 150, throughputPerSecond: 1000 } as const;
const profile = await measureFooWorkload(representativeLoad);
const change = optimize(profile.hotspot);
assertPerformance(change, budget);
```

How it is checked

Checked by
performance CI

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Profiling](https://banes-lab.com/records/architecture/profiling.md), [Benchmarking](https://banes-lab.com/records/architecture/benchmarking.md), [Scalability](https://banes-lab.com/records/architecture/scalability.md), [Resource Efficiency](https://banes-lab.com/records/lexicon/resource-efficiency.md)

Shape it refuses
[Guess-Based Optimization](https://banes-lab.com/records/lexicon/guess-based-optimization.md)

### Algorithmic Efficiency

- Kind: [principle](https://banes-lab.com/records/kind/principle.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: algorithm, data structure
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A design rule that an algorithm and its data structures are chosen for how their cost grows with input size.

Requires
[Complexity Awareness](https://banes-lab.com/records/lexicon/complexity-awareness.md)

Reinforces
[Scalability](https://banes-lab.com/records/architecture/scalability.md)

Enables
[Efficient Processing](https://banes-lab.com/records/lexicon/efficient-processing.md)

In tension with
[Implementation Simplicity](https://banes-lab.com/records/lexicon/implementation-simplicity.md)

Conflicts with
[Inefficient Algorithm Choice](https://banes-lab.com/records/lexicon/inefficient-algorithm-choice.md), [N Plus One Query](https://banes-lab.com/records/architecture/n-plus-one-query.md)

Referenced by
[Time Complexity](https://banes-lab.com/records/architecture/time-complexity.md), [Big O Notation](https://banes-lab.com/records/architecture/big-o-notation.md)

Tensions
[Algorithmic Efficiency / Implementation Simplicity](https://banes-lab.com/records/tension/algorithmic-efficiency-implementation-simplicity.md)

Violated by
avoidable quadratic/exponential behavior

Detected by
complexity analysis, benchmark slope

Measured by
time/space complexity

Refactored by
Replace Algorithm, Add Index, Change Data Structure

Enforced by
[review](https://banes-lab.com/records/lexicon/review.md), benchmarks

Before

```typescript
function hasFoo(foos: Foo[], id: FooId) {
return foos.some(foo => foo.id === id);
}
```

After

```typescript
function indexFoos(foos: readonly Foo[]) {
return new Map(foos.map(foo => [foo.id, foo]));
}
const hasFoo = (index: ReadonlyMap<FooId, Foo>, id: FooId) => index.has(id);
```

How it is checked

Checked by
review, benchmarks

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Complexity Awareness](https://banes-lab.com/records/lexicon/complexity-awareness.md), [Scalability](https://banes-lab.com/records/architecture/scalability.md), [Efficient Processing](https://banes-lab.com/records/lexicon/efficient-processing.md)

Shape it refuses
[Inefficient Algorithm Choice](https://banes-lab.com/records/lexicon/inefficient-algorithm-choice.md), [N Plus One Query](https://banes-lab.com/records/architecture/n-plus-one-query.md)

### Time Complexity

- Kind: [metric](https://banes-lab.com/records/kind/metric.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: algorithm, function
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A measure of how an algorithm's running time grows as its input grows.

Requires
[Input Size Model](https://banes-lab.com/records/lexicon/input-size-model.md)

Reinforces
[Algorithmic Efficiency](https://banes-lab.com/records/architecture/algorithmic-efficiency.md)

Enables
[Scalability Analysis](https://banes-lab.com/records/lexicon/scalability-analysis.md)

In tension with
[Space Complexity](https://banes-lab.com/records/architecture/space-complexity.md)

Conflicts with
[Unbounded Runtime Growth](https://banes-lab.com/records/lexicon/unbounded-runtime-growth.md)

Referenced by
[Space Complexity](https://banes-lab.com/records/architecture/space-complexity.md)

Tensions
[Time Complexity / Space Complexity](https://banes-lab.com/records/tension/space-complexity-time-complexity.md)

Violated by
unacceptable asymptotic runtime

Detected by
nested loops over large inputs, benchmark slope

Measured by
Big O, runtime scaling

Refactored by
Improve Algorithm, Add Index/Cache

Enforced by
benchmark thresholds

Before

```typescript
function duplicateFooIds(foos: Foo[]) {
return foos.filter((foo, index) => foos.findIndex(x => x.id === foo.id) !== index);
}
```

After

```typescript
function duplicateFooIds(foos: readonly Foo[]) {
const seen = new Set<FooId>();
return foos.filter(foo => seen.has(foo.id) || !seen.add(foo.id));
}
```

How it is checked

Checked by
benchmark thresholds

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Input Size Model](https://banes-lab.com/records/lexicon/input-size-model.md), [Algorithmic Efficiency](https://banes-lab.com/records/architecture/algorithmic-efficiency.md), [Scalability Analysis](https://banes-lab.com/records/lexicon/scalability-analysis.md)

Shape it refuses
[Unbounded Runtime Growth](https://banes-lab.com/records/lexicon/unbounded-runtime-growth.md)

### Space Complexity

- Kind: [metric](https://banes-lab.com/records/kind/metric.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: algorithm, process
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A measure of how an algorithm's memory use grows as its input grows.

Requires
[Memory Model](https://banes-lab.com/records/lexicon/memory-model.md)

Reinforces
[Resource Utilization](https://banes-lab.com/records/architecture/resource-utilization.md)

Enables
[Memory Scalability](https://banes-lab.com/records/lexicon/memory-scalability.md)

In tension with
[Time Complexity](https://banes-lab.com/records/architecture/time-complexity.md)

Conflicts with
[Unbounded Memory Growth](https://banes-lab.com/records/lexicon/unbounded-memory-growth.md)

Referenced by
[Time Complexity](https://banes-lab.com/records/architecture/time-complexity.md)

Tensions
[Space Complexity / Time Complexity](https://banes-lab.com/records/tension/space-complexity-time-complexity.md)

Distinct from
[Resource Utilization](https://banes-lab.com/records/architecture/resource-utilization.md): Space complexity is how an algorithm's memory grows with input, while resource utilization is how much provisioned capacity is in use now.

Distinct from
[Time Complexity](https://banes-lab.com/records/architecture/time-complexity.md): Space complexity measures memory growth, while time complexity measures running-time growth.

Violated by
loading unbounded data into memory

Detected by
memory profiling, [full materialization](https://banes-lab.com/records/lexicon/full-materialization.md)

Measured by
Big O space, peak memory

Refactored by
Stream Data, Use Iterator, Chunk Processing

Enforced by
memory benchmarks

Before

```typescript
function processFoos(stream: AsyncIterable<Foo>) {
return collectAll(stream).then(foos => foos.map(transformFoo));
}
```

After

```typescript
async function* processFoos(stream: AsyncIterable<Foo>) {
for await (const foo of stream) yield transformFoo(foo);
}
```

How it is checked

Checked by
memory benchmarks

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Memory Model](https://banes-lab.com/records/lexicon/memory-model.md), [Resource Utilization](https://banes-lab.com/records/architecture/resource-utilization.md), [Memory Scalability](https://banes-lab.com/records/lexicon/memory-scalability.md)

Shape it refuses
[Unbounded Memory Growth](https://banes-lab.com/records/lexicon/unbounded-memory-growth.md)

### Big O Notation

- Kind: [technique](https://banes-lab.com/records/kind/technique.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: algorithm
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A method for classifying an algorithm by the upper bound on how its cost grows with input size, ignoring constant factors.

Requires
[Complexity Model](https://banes-lab.com/records/lexicon/complexity-model.md)

Reinforces
[Algorithmic Efficiency](https://banes-lab.com/records/architecture/algorithmic-efficiency.md)

Enables
[Comparative Analysis](https://banes-lab.com/records/lexicon/comparative-analysis.md)

In tension with
[Constant-Factor Practicality](https://banes-lab.com/records/lexicon/constant-factor-practicality.md)

Conflicts with
[Anecdotal Performance Claims](https://banes-lab.com/records/lexicon/anecdotal-performance-claims.md)

Tensions
[Big O Notation / Constant-Factor Practicality](https://banes-lab.com/records/tension/big-o-notation-constant-factor-practicality.md)

Violated by
ignoring growth behavior for large inputs

Detected by
missing complexity note for critical algorithm

Measured by
asymptotic classification

Refactored by
Analyze Complexity, Replace Algorithm

Enforced by
review checklist

Before

```typescript
function pairFoosWithBars(foos: Foo[], bars: Bar[]) {
return foos.flatMap(foo => bars.filter(bar => bar.fooId === foo.id).map(bar => [foo, bar]));
}
```

After

```typescript
function pairFoosWithBars(foos: readonly Foo[], bars: readonly Bar[]) {
const barsByFoo = groupBy(bars, bar => bar.fooId);
return foos.flatMap(foo => (barsByFoo.get(foo.id) ?? []).map(bar => [foo, bar]));
}
```

How it is checked

Checked by
review checklist

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Complexity Model](https://banes-lab.com/records/lexicon/complexity-model.md), [Algorithmic Efficiency](https://banes-lab.com/records/architecture/algorithmic-efficiency.md), [Comparative Analysis](https://banes-lab.com/records/lexicon/comparative-analysis.md)

Shape it refuses
[Anecdotal Performance Claims](https://banes-lab.com/records/lexicon/anecdotal-performance-claims.md)

### Optimization

- Kind: [activity](https://banes-lab.com/records/kind/activity.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: code, database, system
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
The activity of changing code or configuration to reduce the cost of a bottleneck that a measurement has located.

Requires
[Profiling](https://banes-lab.com/records/architecture/profiling.md), [Bottleneck Evidence](https://banes-lab.com/records/lexicon/bottleneck-evidence.md)

Reinforces
[Performance Engineering](https://banes-lab.com/records/architecture/performance-engineering.md)

Enables
[Resource Efficiency](https://banes-lab.com/records/lexicon/resource-efficiency.md)

In tension with
[Readability/Maintainability](https://banes-lab.com/records/lexicon/readability-maintainability.md)

Conflicts with
[Premature Optimization](https://banes-lab.com/records/lexicon/premature-optimization.md)

Referenced by
[Compile-Time Evaluation](https://banes-lab.com/records/architecture/compile-time-evaluation.md), [Bottleneck Analysis](https://banes-lab.com/records/architecture/bottleneck-analysis.md)

Tensions
[Optimization / Readability/Maintainability](https://banes-lab.com/records/tension/optimization-readability-maintainability.md)

Distinct from
[Bottleneck Analysis](https://banes-lab.com/records/architecture/bottleneck-analysis.md): Optimization changes the code at a bottleneck, while bottleneck analysis finds where it is.

Distinct from
[Performance Engineering](https://banes-lab.com/records/architecture/performance-engineering.md): Optimization is one change at a located bottleneck, while performance engineering is the whole practice of budgets, measurement and change.

Violated by
optimizing without measured bottleneck

Detected by
complex code without performance evidence

Measured by
benchmark delta, SLO improvement

Refactored by
Optimize Bottleneck, Simplify After Optimization

Enforced by
benchmark review

Before

```typescript
const fooCache = new Map<FooId, Foo>();
function loadFoo(id: FooId) { return fooCache.get(id) ?? expensiveLoad(id); }
```

After

```typescript
const profile = profiler.measure("foo.load", representativeFooIds);
if (profile.hotspot === "foo-store-read") {
enableBoundedFooCache({ maxEntries: 10_000, keyBy: fooVersionFingerprint });
}
```

How it is checked

Checked by
benchmark review

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Profiling](https://banes-lab.com/records/architecture/profiling.md), [Bottleneck Evidence](https://banes-lab.com/records/lexicon/bottleneck-evidence.md), [Performance Engineering](https://banes-lab.com/records/architecture/performance-engineering.md), [Resource Efficiency](https://banes-lab.com/records/lexicon/resource-efficiency.md)

Shape it refuses
[Premature Optimization](https://banes-lab.com/records/lexicon/premature-optimization.md)

### Profiling

- Kind: [technique](https://banes-lab.com/records/kind/technique.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [recommended](https://banes-lab.com/records/vocabulary/severity-recommended.md)
- Scope: runtime, code path
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A technique for measuring where a running program spends its time and memory under a representative workload.

Requires
[Representative Workload](https://banes-lab.com/records/lexicon/representative-workload.md)

Reinforces
[Performance Engineering](https://banes-lab.com/records/architecture/performance-engineering.md)

Enables
[Bottleneck Detection](https://banes-lab.com/records/lexicon/bottleneck-detection.md)

In tension with
[Measurement Overhead](https://banes-lab.com/records/lexicon/measurement-overhead.md)

Conflicts with
[Guesswork](https://banes-lab.com/records/lexicon/guesswork.md)

Referenced by
[Performance Engineering](https://banes-lab.com/records/architecture/performance-engineering.md), [Optimization](https://banes-lab.com/records/architecture/optimization.md), [Bottleneck Analysis](https://banes-lab.com/records/architecture/bottleneck-analysis.md)

Tensions
[Profiling / Measurement Overhead](https://banes-lab.com/records/tension/measurement-overhead-profiling.md)

Violated by
performance decisions without profiling

Detected by
missing profile evidence

Measured by
hotspot attribution

Refactored by
Profile Path, Target Hotspot

Enforced by
performance review

Before

```typescript
rewriteFooParserForSpeed();
```

After

```typescript
const profile = await profiler.capture(() => parseFooBatch(batch));
const hotspot = profile.topFrame();
optimizeFooFrame(hotspot);
```

How it is checked

Checked by
performance review

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Representative Workload](https://banes-lab.com/records/lexicon/representative-workload.md), [Performance Engineering](https://banes-lab.com/records/architecture/performance-engineering.md), [Bottleneck Detection](https://banes-lab.com/records/lexicon/bottleneck-detection.md)

Shape it refuses
[Guesswork](https://banes-lab.com/records/lexicon/guesswork.md)

### Benchmarking

- Kind: [activity](https://banes-lab.com/records/kind/activity.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [recommended](https://banes-lab.com/records/vocabulary/severity-recommended.md)
- Scope: function, service, system
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
The activity of timing a fixed workload repeatedly in a controlled environment, so results can be compared across changes.

Requires
[Repeatable Test Environment](https://banes-lab.com/records/lexicon/repeatable-test-environment.md)

Reinforces
[Reproducibility](https://banes-lab.com/records/architecture/reproducibility.md), [Performance Engineering](https://banes-lab.com/records/architecture/performance-engineering.md)

Enables
[Regression Detection](https://banes-lab.com/records/lexicon/regression-detection.md)

In tension with
[Environment Drift](https://banes-lab.com/records/lexicon/environment-drift.md)

Conflicts with
[Anecdotal Timing](https://banes-lab.com/records/lexicon/anecdotal-timing.md)

Referenced by
[Performance Engineering](https://banes-lab.com/records/architecture/performance-engineering.md)

Tensions
[Benchmarking / Environment Drift](https://banes-lab.com/records/tension/benchmarking-environment-drift.md)

Violated by
performance claim without benchmark

Detected by
missing benchmark for perf-sensitive changes

Measured by
benchmark score/trend

Refactored by
Add Benchmark, Stabilize Environment

Enforced by
benchmark CI

Before

```typescript
const start = clock.now();
runFoo();
report(clock.now() - start);
```

After

```typescript
benchmark("foo.parse", {
warmup: 100,
iterations: 10_000,
run: () => parseFoo(fixture),
});
```

How it is checked

Checked by
benchmark CI

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Repeatable Test Environment](https://banes-lab.com/records/lexicon/repeatable-test-environment.md), [Reproducibility](https://banes-lab.com/records/architecture/reproducibility.md), [Performance Engineering](https://banes-lab.com/records/architecture/performance-engineering.md), [Regression Detection](https://banes-lab.com/records/lexicon/regression-detection.md)

Shape it refuses
[Anecdotal Timing](https://banes-lab.com/records/lexicon/anecdotal-timing.md)

### Bottleneck Analysis

- Kind: [activity](https://banes-lab.com/records/kind/activity.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [recommended](https://banes-lab.com/records/vocabulary/severity-recommended.md)
- Scope: code path, system
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
The activity of finding the stage that limits a system's overall throughput or latency, from traces and profiles.

Requires
[Profiling](https://banes-lab.com/records/architecture/profiling.md), [Metrics](https://banes-lab.com/records/lexicon/metrics.md)

Reinforces
[Optimization](https://banes-lab.com/records/architecture/optimization.md)

Enables
[Targeted Improvement](https://banes-lab.com/records/lexicon/targeted-improvement.md)

In tension with
[Distributed Complexity](https://banes-lab.com/records/lexicon/distributed-complexity.md)

Conflicts with
[Local Micro-Optimization](https://banes-lab.com/records/lexicon/local-micro-optimization.md)

Tensions
[Bottleneck Analysis / Distributed Complexity](https://banes-lab.com/records/tension/bottleneck-analysis-distributed-complexity.md)

Violated by
optimizing non-bottleneck code

Detected by
performance work without hotspot evidence

Measured by
bottleneck contribution percentage

Refactored by
Remove Bottleneck, Parallelize, Cache

Enforced by
performance review

Before

```typescript
addMoreFooWorkers();
```

After

```typescript
const trace = await measureFooPipeline();
const bottleneck = trace.stages.sort((a, b) => b.waitMs - a.waitMs)[0];
removeBottleneck(bottleneck);
```

How it is checked

Checked by
performance review

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Profiling](https://banes-lab.com/records/architecture/profiling.md), [Metrics](https://banes-lab.com/records/lexicon/metrics.md), [Optimization](https://banes-lab.com/records/architecture/optimization.md), [Targeted Improvement](https://banes-lab.com/records/lexicon/targeted-improvement.md)

Shape it refuses
[Local Micro-Optimization](https://banes-lab.com/records/lexicon/local-micro-optimization.md)

### Resource Utilization

- Kind: [metric](https://banes-lab.com/records/kind/metric.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: CPU, memory, IO, network
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A measure of how much of the provisioned CPU, memory, I/O and network capacity is in use.

Requires
[Monitoring](https://banes-lab.com/records/architecture/monitoring.md)

Reinforces
[Performance Engineering](https://banes-lab.com/records/architecture/performance-engineering.md)

Enables
[Capacity Planning](https://banes-lab.com/records/lexicon/capacity-planning.md)

In tension with
[Over-Provisioning](https://banes-lab.com/records/lexicon/over-provisioning.md)

Conflicts with
[Resource Waste/Saturation](https://banes-lab.com/records/lexicon/resource-waste-saturation.md)

Referenced by
[Bulkhead Pattern](https://banes-lab.com/records/architecture/bulkhead-pattern.md), [Space Complexity](https://banes-lab.com/records/architecture/space-complexity.md)

Tensions
[Resource Utilization / Over-Provisioning](https://banes-lab.com/records/tension/over-provisioning-resource-utilization.md)

Violated by
persistent saturation or idle waste

Detected by
monitoring metrics

Measured by
CPU/memory/IO/network utilization

Refactored by
Optimize Resource Use, [Scale](https://banes-lab.com/records/reasoning/dimension-scale.md), Tune Config

Enforced by
SLO/capacity policy

Before

```typescript
deployFoo({ cpu: 16, memoryGb: 64 });
```

After

```typescript
const sizing = rightSizeFoo({
cpuP95: metrics.cpu("foo", "p95"),
memoryP95: metrics.memory("foo", "p95"),
headroom: 0.25,
});
deployFoo(sizing);
```

How it is checked

Checked by
SLO/capacity policy

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Monitoring](https://banes-lab.com/records/architecture/monitoring.md), [Performance Engineering](https://banes-lab.com/records/architecture/performance-engineering.md), [Capacity Planning](https://banes-lab.com/records/lexicon/capacity-planning.md)

Shape it refuses
[Resource Waste/Saturation](https://banes-lab.com/records/lexicon/resource-waste-saturation.md)

### Rate Limiting

- Kind: [mechanism](https://banes-lab.com/records/kind/mechanism.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Mandatory for: public APIs
- Scope: API, service, queue
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A mechanism that caps how many requests a caller can make in a time window and rejects the excess.

Requires
[Quota Policy](https://banes-lab.com/records/lexicon/quota-policy.md)

Reinforces
[Backpressure](https://banes-lab.com/records/architecture/backpressure.md), [Security](https://banes-lab.com/records/lexicon/security.md)

Enables
[Abuse/Overload Protection](https://banes-lab.com/records/lexicon/abuse-overload-protection.md)

In tension with
[User Experience](https://banes-lab.com/records/lexicon/user-experience.md)

Conflicts with
[Unbounded Access](https://banes-lab.com/records/lexicon/unbounded-access.md)

Tensions
[Rate Limiting / User Experience](https://banes-lab.com/records/tension/rate-limiting-user-experience.md)

Violated by
unlimited calls to constrained resource

Detected by
missing rate limiter on public/expensive endpoints

Measured by
limit hit rate, overload incidents

Refactored by
Add Rate Limiter, Define Quotas

Enforced by
API gateway/policy

Before

```typescript
app.post("/foo", createFoo);
```

After

```typescript
app.post("/foo", rateLimit({
key: request => request.identity.id,
limit: 100,
windowMs: 60_000,
}), createFoo);
```

How it is checked

Checked by
API gateway/policy

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Quota Policy](https://banes-lab.com/records/lexicon/quota-policy.md), [Backpressure](https://banes-lab.com/records/architecture/backpressure.md), [Security](https://banes-lab.com/records/lexicon/security.md), [Abuse/Overload Protection](https://banes-lab.com/records/lexicon/abuse-overload-protection.md)

Shape it refuses
[Unbounded Access](https://banes-lab.com/records/lexicon/unbounded-access.md)

### Memory Efficiency

- Kind: [quality-attribute](https://banes-lab.com/records/kind/quality-attribute.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: algorithm, process, stream
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
The degree to which a process handles its input with bounded memory, by streaming or chunking instead of loading it whole.

Requires
[Space Complexity Awareness](https://banes-lab.com/records/lexicon/space-complexity-awareness.md)

Reinforces
[Scalability](https://banes-lab.com/records/architecture/scalability.md)

Enables
[Large Input Handling](https://banes-lab.com/records/lexicon/large-input-handling.md)

In tension with
[CPU Cost](https://banes-lab.com/records/lexicon/cpu-cost.md)

Conflicts with
[Full Materialization](https://banes-lab.com/records/lexicon/full-materialization.md)

Referenced by
[Flyweight Pattern](https://banes-lab.com/records/architecture/flyweight-pattern.md), [Single-Pass Processing](https://banes-lab.com/records/architecture/single-pass-processing.md), [Lazy Evaluation](https://banes-lab.com/records/architecture/lazy-evaluation.md), [Sequential Access](https://banes-lab.com/records/architecture/sequential-access.md)

Tensions
[Memory Efficiency / CPU Cost](https://banes-lab.com/records/tension/cpu-cost-memory-efficiency.md)

Distinct from
[CPU Cost](https://banes-lab.com/records/lexicon/cpu-cost.md): Memory efficiency bounds the memory a process uses, while CPU cost is the processor time that streaming or chunking may add.

Violated by
loading unbounded data into memory

Detected by
memory profile spikes

Measured by
peak memory, allocation rate

Refactored by
Stream, Chunk, Use Iterator

Enforced by
memory benchmarks

Before

```typescript
const copies = foos.map(foo => structuredClone(foo));
```

After

```typescript
function* fooViews(foos: readonly Foo[]) {
for (const foo of foos) yield { id: foo.id, name: foo.name };
}
```

How it is checked

Checked by
memory benchmarks

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Space Complexity Awareness](https://banes-lab.com/records/lexicon/space-complexity-awareness.md), [Scalability](https://banes-lab.com/records/architecture/scalability.md), [Large Input Handling](https://banes-lab.com/records/lexicon/large-input-handling.md)

Shape it refuses
[Full Materialization](https://banes-lab.com/records/lexicon/full-materialization.md)

### CDN / Edge Caching

- Kind: [mechanism](https://banes-lab.com/records/kind/mechanism.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: service, infrastructure, latency
- Aliases: Content Delivery Network
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A mechanism that serves cacheable content from servers near the requester, keyed by a fingerprint of the content.

Requires
[Cacheable Content](https://banes-lab.com/records/lexicon/cacheable-content.md)

Reinforces
[Caching](https://banes-lab.com/records/architecture/caching.md), [Latency](https://banes-lab.com/records/architecture/latency.md)

Enables
[Origin Offload](https://banes-lab.com/records/lexicon/origin-offload.md), [Geographically-Local Delivery](https://banes-lab.com/records/lexicon/geographically-local-delivery.md)

In tension with
[Cache Invalidation](https://banes-lab.com/records/lexicon/cache-invalidation.md)

Conflicts with
[Origin-Only Serving](https://banes-lab.com/records/lexicon/origin-only-serving.md)

Tensions
[CDN / Edge Caching / Cache Invalidation](https://banes-lab.com/records/tension/cache-invalidation-cdn-edge-caching.md)

Violated by
every request hitting the origin regardless of locality

Detected by
static assets served from origin per request

Measured by
origin request rate / cache hit ratio

Refactored by
Serve via CDN / Edge Cache

Enforced by
performance review

Before

```typescript
app.get("/foo/:id/avatar", serveFooAvatarFromOrigin);
```

After

```typescript
app.get("/foo/:id/avatar",
edgeCache({ immutable: true, key: request => avatarFingerprint(request.params.id) }),
serveFooAvatarFromOrigin,
);
```

How it is checked

Checked by
performance review

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Cacheable Content](https://banes-lab.com/records/lexicon/cacheable-content.md), [Caching](https://banes-lab.com/records/architecture/caching.md), [Latency](https://banes-lab.com/records/architecture/latency.md), [Origin Offload](https://banes-lab.com/records/lexicon/origin-offload.md), [Geographically-Local Delivery](https://banes-lab.com/records/lexicon/geographically-local-delivery.md)

Shape it refuses
[Origin-Only Serving](https://banes-lab.com/records/lexicon/origin-only-serving.md)

### Read Replica

- Kind: [technique](https://banes-lab.com/records/kind/technique.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: service, database, scalability
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A technique for routing read queries to replicated copies of a database, so the primary handles only writes.

Requires
[Replication](https://banes-lab.com/records/architecture/replication.md)

Reinforces
[Horizontal Scaling](https://banes-lab.com/records/architecture/horizontal-scaling.md), [Load Balancing](https://banes-lab.com/records/architecture/load-balancing.md)

Enables
[Read Traffic Offload](https://banes-lab.com/records/lexicon/read-traffic-offload.md)

In tension with
[Read-Your-Writes Consistency](https://banes-lab.com/records/lexicon/read-your-writes-consistency.md)

Conflicts with
[Single-Primary Read Contention](https://banes-lab.com/records/lexicon/single-primary-read-contention.md)

Tensions
[Read Replica / Read-Your-Writes Consistency](https://banes-lab.com/records/tension/read-replica-read-your-writes-consistency.md)

Distinct from
[Horizontal Scaling](https://banes-lab.com/records/architecture/horizontal-scaling.md): A read replica scales database reads by copying data, while horizontal scaling adds stateless service instances behind a load balancer.

Violated by
all reads and writes hitting one primary

Detected by
read load saturating the write primary

Measured by
primary read/write contention ratio

Refactored by
Route Reads to Replicas

Enforced by
database design review

Before

```typescript
const foo = await primaryDb.query(fooQuery);
await primaryDb.write(fooCommand);
```

After

```typescript
const foo = await replicaRouter.read(fooQuery);
await primaryDb.write(fooCommand);
```

How it is checked

Checked by
database design review

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Replication](https://banes-lab.com/records/architecture/replication.md), [Horizontal Scaling](https://banes-lab.com/records/architecture/horizontal-scaling.md), [Load Balancing](https://banes-lab.com/records/architecture/load-balancing.md), [Read Traffic Offload](https://banes-lab.com/records/lexicon/read-traffic-offload.md)

Shape it refuses
[Single-Primary Read Contention](https://banes-lab.com/records/lexicon/single-primary-read-contention.md)

### Queuing Theory

- Kind: [model](https://banes-lab.com/records/kind/model.md)
- Category: [Scalability / Performance / Optimization](https://banes-lab.com/ontology/principles/architecture-category-scalability-performance-optimization.md)
- Severity: [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- Scope: performance, capacity, system
- Layer: [Performance Core](https://banes-lab.com/records/layer/performance-core.md)

Details

Definition
A conceptual representation of a system as queues with arrival and service rates, used to predict waiting time and size capacity.

Requires
[Arrival and Service Rates](https://banes-lab.com/records/lexicon/arrival-and-service-rates.md)

Reinforces
[Capacity Planning](https://banes-lab.com/records/lexicon/capacity-planning.md), [Latency](https://banes-lab.com/records/architecture/latency.md)

Enables
[Wait-Time Prediction](https://banes-lab.com/records/lexicon/wait-time-prediction.md), [Utilization-Based Sizing](https://banes-lab.com/records/lexicon/utilization-based-sizing.md)

In tension with
[Model Assumptions](https://banes-lab.com/records/lexicon/model-assumptions.md)

Conflicts with
[Guess-Based Capacity](https://banes-lab.com/records/lexicon/guess-based-capacity.md)

Contracts
[Queuing Theory](https://banes-lab.com/records/algorithms/queuing-theory.md)

Tensions
[Queuing Theory / Model Assumptions](https://banes-lab.com/records/tension/model-assumptions-queuing-theory.md)

Violated by
worker pool sized by guesswork with no arrival/service-rate model

Detected by
latency collapsing as utilization approaches saturation

Measured by
predicted vs actual queue depth and wait time

Refactored by
Size the system from an M/M/1 (or M/M/c) queuing model

Enforced by
capacity review

Before

```typescript
const workers = 4;
```

After

```typescript
const rho = arrivalRate / (workers * serviceRate);
if (rho >= 1) throw new Error("unstable queue: utilization >= 1");
const avgWaitMs = mm1WaitTime({ arrivalRate, serviceRate, servers: workers });
```

How it is checked

Checked by
capacity review

Population
Every performance-sensitive path, resource and scaling policy under a declared workload

Freshness
A verdict stands for the measured workload and build, and goes stale when either changes

Refusal
The load test, benchmark or SLO gate fails the change that breaks its budget

Observation
Profiles, benchmark results, load-test metrics and production telemetry measured against their budgets

Evidence
None, because the catalog states this check as a class, so a watched run belongs to each system that adopts it

Authoritative side
The declared budget, which every measurement is compared against

Depends on
[Arrival and Service Rates](https://banes-lab.com/records/lexicon/arrival-and-service-rates.md), [Capacity Planning](https://banes-lab.com/records/lexicon/capacity-planning.md), [Latency](https://banes-lab.com/records/architecture/latency.md), [Wait-Time Prediction](https://banes-lab.com/records/lexicon/wait-time-prediction.md), [Utilization-Based Sizing](https://banes-lab.com/records/lexicon/utilization-based-sizing.md)

Shape it refuses
[Guess-Based Capacity](https://banes-lab.com/records/lexicon/guess-based-capacity.md)

## Links to

- [quality-attribute](https://banes-lab.com/records/kind/quality-attribute.md)
- [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)
- [Performance Core](https://banes-lab.com/records/layer/performance-core.md)
- [Load Model](https://banes-lab.com/records/lexicon/load-model.md)
- [Bottleneck Awareness](https://banes-lab.com/records/lexicon/bottleneck-awareness.md)
- [Performance Engineering](https://banes-lab.com/records/architecture/performance-engineering.md)
- [Growth Handling](https://banes-lab.com/records/lexicon/growth-handling.md)
- [Simplicity](https://banes-lab.com/records/lexicon/simplicity.md)
- [Consistency](https://banes-lab.com/records/architecture/consistency.md)
- [Fixed-Capacity Design](https://banes-lab.com/records/lexicon/fixed-capacity-design.md)
- [Service Discovery](https://banes-lab.com/records/architecture/service-discovery.md)
- [Message Broker](https://banes-lab.com/records/architecture/message-broker.md)
- [CQRS](https://banes-lab.com/records/architecture/command-query-responsibility-segregation.md)
- [Eventual Consistency](https://banes-lab.com/records/architecture/eventual-consistency.md)
- [Elasticity](https://banes-lab.com/records/architecture/elasticity.md)
- [Load Balancing](https://banes-lab.com/records/architecture/load-balancing.md)
- [Partitioning](https://banes-lab.com/records/architecture/partitioning.md)
- [Caching](https://banes-lab.com/records/architecture/caching.md)
- [Throughput](https://banes-lab.com/records/architecture/throughput.md)
- [Algorithmic Efficiency](https://banes-lab.com/records/architecture/algorithmic-efficiency.md)
- [Memory Efficiency](https://banes-lab.com/records/architecture/memory-efficiency.md)
- [Stateless Processing](https://banes-lab.com/records/architecture/stateless-processing.md)
- [Replication](https://banes-lab.com/records/architecture/replication.md)
- [Microservices](https://banes-lab.com/records/architecture/microservices.md)
- [Scalability / Simplicity](https://banes-lab.com/records/tension/scalability-simplicity.md)
- [Scalability / Consistency](https://banes-lab.com/records/tension/consistency-scalability.md)
- [Low Coupling](https://banes-lab.com/records/architecture/low-coupling.md)
- [Resilience](https://banes-lab.com/records/architecture/resilience.md)
- [Testability](https://banes-lab.com/records/architecture/testability.md)
- [Cost Efficiency](https://banes-lab.com/records/lexicon/cost-efficiency.md)
- [Resource Efficiency](https://banes-lab.com/records/lexicon/resource-efficiency.md)
- [Availability](https://banes-lab.com/records/lexicon/availability.md)
- [technique](https://banes-lab.com/records/kind/technique.md)
- [Statelessness or Shared State Strategy](https://banes-lab.com/records/lexicon/statelessness-or-shared-state-strategy.md)
- [Scale-Out](https://banes-lab.com/records/lexicon/scale-out.md)
- [Distributed Coordination](https://banes-lab.com/records/lexicon/distributed-coordination.md)
- [Instance-Local State](https://banes-lab.com/records/lexicon/instance-local-state.md)
- [Competing Consumers](https://banes-lab.com/records/architecture/competing-consumers.md)
- [Sharding](https://banes-lab.com/records/architecture/sharding.md)
- [Statelessness](https://banes-lab.com/records/architecture/statelessness.md)
- [Read Replica](https://banes-lab.com/records/architecture/read-replica.md)
- [Space-Based Architecture](https://banes-lab.com/records/architecture/space-based-architecture.md)
- [Horizontal Scaling / Distributed Coordination](https://banes-lab.com/records/tension/distributed-coordination-horizontal-scaling.md)
- [Resource Headroom](https://banes-lab.com/records/lexicon/resource-headroom.md)
- [Capacity Increase without Distribution](https://banes-lab.com/records/lexicon/capacity-increase-without-distribution.md)
- [Cost/Limit](https://banes-lab.com/records/lexicon/cost-limit.md)
- [Hard Resource Ceiling](https://banes-lab.com/records/lexicon/hard-resource-ceiling.md)
- [Vertical Scaling / Cost/Limit](https://banes-lab.com/records/tension/cost-limit-vertical-scaling.md)
- [Capacity Planning](https://banes-lab.com/records/lexicon/capacity-planning.md)
- [Auto-Scaling](https://banes-lab.com/records/architecture/auto-scaling.md)
- [Metrics](https://banes-lab.com/records/lexicon/metrics.md)
- [Scalability](https://banes-lab.com/records/architecture/scalability.md)
- [Dynamic Capacity](https://banes-lab.com/records/lexicon/dynamic-capacity.md)
- [Warm-Up Latency](https://banes-lab.com/records/lexicon/warm-up-latency.md)
- [Fixed Provisioning](https://banes-lab.com/records/lexicon/fixed-provisioning.md)
- [Horizontal Scaling](https://banes-lab.com/records/architecture/horizontal-scaling.md)
- [Elasticity / Warm-Up Latency](https://banes-lab.com/records/tension/elasticity-warm-up-latency.md)
- [mechanism](https://banes-lab.com/records/kind/mechanism.md)
- [Multiple Targets](https://banes-lab.com/records/lexicon/multiple-targets.md)
- [Health Checks](https://banes-lab.com/records/architecture/health-checks.md)
- [Traffic Distribution](https://banes-lab.com/records/lexicon/traffic-distribution.md)
- [Session Affinity](https://banes-lab.com/records/lexicon/session-affinity.md)
- [Single Target Routing](https://banes-lab.com/records/lexicon/single-target-routing.md)
- [Load Balancing / Session Affinity](https://banes-lab.com/records/tension/load-balancing-session-affinity.md)
- [Latency](https://banes-lab.com/records/architecture/latency.md)
- [pattern](https://banes-lab.com/records/kind/pattern.md)
- [Partition Key](https://banes-lab.com/records/lexicon/partition-key.md)
- [Large Dataset Scaling](https://banes-lab.com/records/lexicon/large-dataset-scaling.md)
- [Cross-Shard Queries](https://banes-lab.com/records/lexicon/cross-shard-queries.md)
- [Single Monolithic Store](https://banes-lab.com/records/lexicon/single-monolithic-store.md)
- [Sharding / Cross-Shard Queries](https://banes-lab.com/records/tension/cross-shard-queries-sharding.md)
- [Partition Strategy](https://banes-lab.com/records/lexicon/partition-strategy.md)
- [Isolation](https://banes-lab.com/records/architecture/isolation.md)
- [Parallelism](https://banes-lab.com/records/architecture/parallelism.md)
- [Rebalancing Complexity](https://banes-lab.com/records/lexicon/rebalancing-complexity.md)
- [Global Shared State](https://banes-lab.com/records/lexicon/global-shared-state.md)
- [Partitioning / Rebalancing Complexity](https://banes-lab.com/records/tension/partitioning-rebalancing-complexity.md)
- [Architecture Review](https://banes-lab.com/records/architecture/architecture-review.md)
- [Invalidation Policy](https://banes-lab.com/records/lexicon/invalidation-policy.md)
- [Latency Reduction](https://banes-lab.com/records/lexicon/latency-reduction.md)
- [Reduced Load](https://banes-lab.com/records/lexicon/reduced-load.md)
- [Always-Fresh Reads](https://banes-lab.com/records/lexicon/always-fresh-reads.md)
- [Cache Poisoning by Design](https://banes-lab.com/records/architecture/cache-poisoning-by-design.md)
- [CDN / Edge Caching](https://banes-lab.com/records/architecture/cdn-edge-caching.md)
- [Caching / Consistency](https://banes-lab.com/records/tension/caching-consistency.md)
- [Caching / Always-Fresh Reads](https://banes-lab.com/records/tension/always-fresh-reads-caching.md)
- [principle](https://banes-lab.com/records/kind/principle.md)
- [recommended](https://banes-lab.com/records/vocabulary/severity-recommended.md)
- [Externalized State](https://banes-lab.com/records/lexicon/externalized-state.md)
- [State Access Latency](https://banes-lab.com/records/lexicon/state-access-latency.md)
- [Instance Affinity](https://banes-lab.com/records/lexicon/instance-affinity.md)
- [Temporal Coupling](https://banes-lab.com/records/architecture/temporal-coupling.md)
- [Statelessness / State Access Latency](https://banes-lab.com/records/tension/state-access-latency-statelessness.md)
- [model](https://banes-lab.com/records/kind/model.md)
- [Concurrency Control](https://banes-lab.com/records/architecture/concurrency-control.md)
- [Overlapping Work](https://banes-lab.com/records/lexicon/overlapping-work.md)
- [Complexity](https://banes-lab.com/records/lexicon/complexity.md)
- [Race Conditions](https://banes-lab.com/records/lexicon/race-conditions.md)
- [Concurrency / Complexity](https://banes-lab.com/records/tension/complexity-concurrency.md)
- [Tests](https://banes-lab.com/records/lexicon/tests.md)
- [Independent Work Units](https://banes-lab.com/records/lexicon/independent-work-units.md)
- [Performance](https://banes-lab.com/records/lexicon/performance.md)
- [Multi-Core Utilization](https://banes-lab.com/records/lexicon/multi-core-utilization.md)
- [Coordination Overhead](https://banes-lab.com/records/lexicon/coordination-overhead.md)
- [Sequential Bottleneck](https://banes-lab.com/records/lexicon/sequential-bottleneck.md)
- [Causality](https://banes-lab.com/records/architecture/causality.md)
- [Fan-out/Fan-in](https://banes-lab.com/records/architecture/fan-out-fan-in.md)
- [Parallelism / Coordination Overhead](https://banes-lab.com/records/tension/coordination-overhead-parallelism.md)
- [metric](https://banes-lab.com/records/kind/metric.md)
- [Capacity Model](https://banes-lab.com/records/lexicon/capacity-model.md)
- [Load Handling](https://banes-lab.com/records/lexicon/load-handling.md)
- [Bottlenecks](https://banes-lab.com/records/lexicon/bottlenecks.md)
- [Event Ordering](https://banes-lab.com/records/architecture/event-ordering.md)
- [PACELC Theorem](https://banes-lab.com/records/architecture/pacelc-theorem.md)
- [Backpressure](https://banes-lab.com/records/architecture/backpressure.md)
- [Code Review](https://banes-lab.com/records/architecture/code-review.md)
- [Concurrency](https://banes-lab.com/records/architecture/concurrency.md)
- [Throughput / Latency](https://banes-lab.com/records/tension/latency-throughput.md)
- [Time Budget](https://banes-lab.com/records/lexicon/time-budget.md)
- [User Experience](https://banes-lab.com/records/lexicon/user-experience.md)
- [Responsiveness](https://banes-lab.com/records/lexicon/responsiveness.md)
- [Throughput/Batching](https://banes-lab.com/records/lexicon/throughput-batching.md)
- [Long Blocking Work](https://banes-lab.com/records/lexicon/long-blocking-work.md)
- [Total-Order Broadcast](https://banes-lab.com/records/architecture/total-order-broadcast.md)
- [CAP Theorem](https://banes-lab.com/records/architecture/cap-theorem.md)
- [Consensus](https://banes-lab.com/records/architecture/consensus.md)
- [Message Queue](https://banes-lab.com/records/architecture/message-queue.md)
- [Queuing Theory](https://banes-lab.com/records/architecture/queuing-theory.md)
- [Pessimistic Locking](https://banes-lab.com/records/architecture/pessimistic-locking.md)
- [Latency / Throughput/Batching](https://banes-lab.com/records/tension/latency-throughput-batching.md)
- [activity](https://banes-lab.com/records/kind/activity.md)
- [Profiling](https://banes-lab.com/records/architecture/profiling.md)
- [Benchmarking](https://banes-lab.com/records/architecture/benchmarking.md)
- [Maintainability](https://banes-lab.com/records/lexicon/maintainability.md)
- [Guess-Based Optimization](https://banes-lab.com/records/lexicon/guess-based-optimization.md)
- [Optimization](https://banes-lab.com/records/architecture/optimization.md)
- [Resource Utilization](https://banes-lab.com/records/architecture/resource-utilization.md)
- [Performance Core](https://banes-lab.com/records/algorithms/performance-core.md)
- [Performance Engineering / Maintainability](https://banes-lab.com/records/tension/maintainability-performance-engineering.md)
- [Complexity Awareness](https://banes-lab.com/records/lexicon/complexity-awareness.md)
- [Efficient Processing](https://banes-lab.com/records/lexicon/efficient-processing.md)
- [Implementation Simplicity](https://banes-lab.com/records/lexicon/implementation-simplicity.md)
- [Inefficient Algorithm Choice](https://banes-lab.com/records/lexicon/inefficient-algorithm-choice.md)
- [N Plus One Query](https://banes-lab.com/records/architecture/n-plus-one-query.md)
- [Time Complexity](https://banes-lab.com/records/architecture/time-complexity.md)
- [Big O Notation](https://banes-lab.com/records/architecture/big-o-notation.md)
- [Algorithmic Efficiency / Implementation Simplicity](https://banes-lab.com/records/tension/algorithmic-efficiency-implementation-simplicity.md)
- [Review](https://banes-lab.com/records/lexicon/review.md)
- [Input Size Model](https://banes-lab.com/records/lexicon/input-size-model.md)
- [Scalability Analysis](https://banes-lab.com/records/lexicon/scalability-analysis.md)
- [Space Complexity](https://banes-lab.com/records/architecture/space-complexity.md)
- [Unbounded Runtime Growth](https://banes-lab.com/records/lexicon/unbounded-runtime-growth.md)
- [Time Complexity / Space Complexity](https://banes-lab.com/records/tension/space-complexity-time-complexity.md)
- [Memory Model](https://banes-lab.com/records/lexicon/memory-model.md)
- [Memory Scalability](https://banes-lab.com/records/lexicon/memory-scalability.md)
- [Unbounded Memory Growth](https://banes-lab.com/records/lexicon/unbounded-memory-growth.md)
- [Full Materialization](https://banes-lab.com/records/lexicon/full-materialization.md)
- [Complexity Model](https://banes-lab.com/records/lexicon/complexity-model.md)
- [Comparative Analysis](https://banes-lab.com/records/lexicon/comparative-analysis.md)
- [Constant-Factor Practicality](https://banes-lab.com/records/lexicon/constant-factor-practicality.md)
- [Anecdotal Performance Claims](https://banes-lab.com/records/lexicon/anecdotal-performance-claims.md)
- [Big O Notation / Constant-Factor Practicality](https://banes-lab.com/records/tension/big-o-notation-constant-factor-practicality.md)
- [Bottleneck Evidence](https://banes-lab.com/records/lexicon/bottleneck-evidence.md)
- [Readability/Maintainability](https://banes-lab.com/records/lexicon/readability-maintainability.md)
- [Premature Optimization](https://banes-lab.com/records/lexicon/premature-optimization.md)
- [Compile-Time Evaluation](https://banes-lab.com/records/architecture/compile-time-evaluation.md)
- [Bottleneck Analysis](https://banes-lab.com/records/architecture/bottleneck-analysis.md)
- [Optimization / Readability/Maintainability](https://banes-lab.com/records/tension/optimization-readability-maintainability.md)
- [Representative Workload](https://banes-lab.com/records/lexicon/representative-workload.md)
- [Bottleneck Detection](https://banes-lab.com/records/lexicon/bottleneck-detection.md)
- [Measurement Overhead](https://banes-lab.com/records/lexicon/measurement-overhead.md)
- [Guesswork](https://banes-lab.com/records/lexicon/guesswork.md)
- [Profiling / Measurement Overhead](https://banes-lab.com/records/tension/measurement-overhead-profiling.md)
- [Repeatable Test Environment](https://banes-lab.com/records/lexicon/repeatable-test-environment.md)
- [Reproducibility](https://banes-lab.com/records/architecture/reproducibility.md)
- [Regression Detection](https://banes-lab.com/records/lexicon/regression-detection.md)
- [Environment Drift](https://banes-lab.com/records/lexicon/environment-drift.md)
- [Anecdotal Timing](https://banes-lab.com/records/lexicon/anecdotal-timing.md)
- [Benchmarking / Environment Drift](https://banes-lab.com/records/tension/benchmarking-environment-drift.md)
- [Targeted Improvement](https://banes-lab.com/records/lexicon/targeted-improvement.md)
- [Distributed Complexity](https://banes-lab.com/records/lexicon/distributed-complexity.md)
- [Local Micro-Optimization](https://banes-lab.com/records/lexicon/local-micro-optimization.md)
- [Bottleneck Analysis / Distributed Complexity](https://banes-lab.com/records/tension/bottleneck-analysis-distributed-complexity.md)
- [Monitoring](https://banes-lab.com/records/architecture/monitoring.md)
- [Over-Provisioning](https://banes-lab.com/records/lexicon/over-provisioning.md)
- [Resource Waste/Saturation](https://banes-lab.com/records/lexicon/resource-waste-saturation.md)
- [Bulkhead Pattern](https://banes-lab.com/records/architecture/bulkhead-pattern.md)
- [Resource Utilization / Over-Provisioning](https://banes-lab.com/records/tension/over-provisioning-resource-utilization.md)
- [Scale](https://banes-lab.com/records/reasoning/dimension-scale.md)
- [Quota Policy](https://banes-lab.com/records/lexicon/quota-policy.md)
- [Security](https://banes-lab.com/records/lexicon/security.md)
- [Abuse/Overload Protection](https://banes-lab.com/records/lexicon/abuse-overload-protection.md)
- [Unbounded Access](https://banes-lab.com/records/lexicon/unbounded-access.md)
- [Rate Limiting / User Experience](https://banes-lab.com/records/tension/rate-limiting-user-experience.md)
- [Space Complexity Awareness](https://banes-lab.com/records/lexicon/space-complexity-awareness.md)
- [Large Input Handling](https://banes-lab.com/records/lexicon/large-input-handling.md)
- [CPU Cost](https://banes-lab.com/records/lexicon/cpu-cost.md)
- [Flyweight Pattern](https://banes-lab.com/records/architecture/flyweight-pattern.md)
- [Single-Pass Processing](https://banes-lab.com/records/architecture/single-pass-processing.md)
- [Lazy Evaluation](https://banes-lab.com/records/architecture/lazy-evaluation.md)
- [Sequential Access](https://banes-lab.com/records/architecture/sequential-access.md)
- [Memory Efficiency / CPU Cost](https://banes-lab.com/records/tension/cpu-cost-memory-efficiency.md)
- [Cacheable Content](https://banes-lab.com/records/lexicon/cacheable-content.md)
- [Origin Offload](https://banes-lab.com/records/lexicon/origin-offload.md)
- [Geographically-Local Delivery](https://banes-lab.com/records/lexicon/geographically-local-delivery.md)
- [Cache Invalidation](https://banes-lab.com/records/lexicon/cache-invalidation.md)
- [Origin-Only Serving](https://banes-lab.com/records/lexicon/origin-only-serving.md)
- [CDN / Edge Caching / Cache Invalidation](https://banes-lab.com/records/tension/cache-invalidation-cdn-edge-caching.md)
- [Read Traffic Offload](https://banes-lab.com/records/lexicon/read-traffic-offload.md)
- [Read-Your-Writes Consistency](https://banes-lab.com/records/lexicon/read-your-writes-consistency.md)
- [Single-Primary Read Contention](https://banes-lab.com/records/lexicon/single-primary-read-contention.md)
- [Read Replica / Read-Your-Writes Consistency](https://banes-lab.com/records/tension/read-replica-read-your-writes-consistency.md)
- [Arrival and Service Rates](https://banes-lab.com/records/lexicon/arrival-and-service-rates.md)
- [Wait-Time Prediction](https://banes-lab.com/records/lexicon/wait-time-prediction.md)
- [Utilization-Based Sizing](https://banes-lab.com/records/lexicon/utilization-based-sizing.md)
- [Model Assumptions](https://banes-lab.com/records/lexicon/model-assumptions.md)
- [Guess-Based Capacity](https://banes-lab.com/records/lexicon/guess-based-capacity.md)
- [Queuing Theory](https://banes-lab.com/records/algorithms/queuing-theory.md)
- [Queuing Theory / Model Assumptions](https://banes-lab.com/records/tension/model-assumptions-queuing-theory.md)

## Linked from

- [The layer topology](https://banes-lab.com/ontology/schema/the-layer-topology.md)
- [The membership](https://banes-lab.com/ontology/schema/the-membership.md)
