Skip to content

Commit 2546295

Browse files
0xLuccaeshaben0xlukemnhussein11
authored
Add elastic scaling page (#639)
* Add elastic scaling * Apply suggestions from code review Co-authored-by: Erin Shaben <[email protected]> Co-authored-by: Lucas Malizia <[email protected]> Co-authored-by: Nicolás Hussein <[email protected]> * Apply suggestions * Apply suggestions --------- Co-authored-by: Erin Shaben <[email protected]> Co-authored-by: Lucas Malizia <[email protected]> Co-authored-by: Nicolás Hussein <[email protected]>
1 parent 0d3c960 commit 2546295

File tree

3 files changed

+273
-1
lines changed

3 files changed

+273
-1
lines changed

llms.txt

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ Doc-Page: https://docs.polkadot.com/polkadot-protocol/architecture/parachains/co
9797
Doc-Page: https://docs.polkadot.com/polkadot-protocol/architecture/parachains/
9898
Doc-Page: https://docs.polkadot.com/polkadot-protocol/architecture/parachains/overview/
9999
Doc-Page: https://docs.polkadot.com/polkadot-protocol/architecture/polkadot-chain/agile-coretime/
100+
Doc-Page: https://docs.polkadot.com/polkadot-protocol/architecture/polkadot-chain/elastic-scaling/
100101
Doc-Page: https://docs.polkadot.com/polkadot-protocol/architecture/polkadot-chain/
101102
Doc-Page: https://docs.polkadot.com/polkadot-protocol/architecture/polkadot-chain/overview/
102103
Doc-Page: https://docs.polkadot.com/polkadot-protocol/architecture/polkadot-chain/pos-consensus/
@@ -16013,6 +16014,143 @@ It is the action of dividing bulk coretime into multiple contiguous regions. Thi
1601316014
Polkadot has dedicated cores assigned to provide core time on demand. These cores are excluded from the coretime sales and are reserved for on-demand parachains, which pay in DOT per block.
1601416015
--- END CONTENT ---
1601516016

16017+
Doc-Content: https://docs.polkadot.com/polkadot-protocol/architecture/polkadot-chain/elastic-scaling/
16018+
--- BEGIN CONTENT ---
16019+
---
16020+
title: Elastic Scaling
16021+
description: Learn how elastic scaling in Polkadot boosts parachain throughput, reduces latency, and supports dynamic, cost-efficient resource allocation.
16022+
---
16023+
16024+
# Elastic Scaling
16025+
16026+
## Introduction
16027+
16028+
Polkadot's architecture delivers scalability and security through its shared security model, where the relay chain coordinates and validates multiple parallel chains.
16029+
16030+
Elastic scaling enhances this architecture by allowing parachains to utilize multiple computational cores simultaneously, breaking the previous 1:1 relationship between parachain and relay chain blocks.
16031+
16032+
This technical advancement enables parachains to process multiple blocks within a single relay chain block, significantly increasing throughput capabilities. By leveraging [Agile Coretime](/polkadot-protocol/architecture/polkadot-chain/agile-coretime){target=\_blank}, parachains can dynamically adjust their processing capacity based on demand, creating an efficient and responsive infrastructure for high-throughput applications.
16033+
16034+
## How Elastic Scaling Works
16035+
16036+
Elastic scaling enables parachains to process multiple blocks in parallel by utilizing additional cores on the relay chain. This section provides a technical analysis of the performance advantages and details of the implementation.
16037+
16038+
Consider a parachain that needs to process four consecutive parablocks. With traditional single-core allocation, the validation process follows a strictly sequential pattern. Each parablock undergoes a two-phase process on the relay chain:
16039+
16040+
1. **Backing phase** - validators create and distribute validity statements
16041+
2. **Inclusion phase** - the parablock is included in the relay chain after availability verification
16042+
16043+
Throughout the following diagrams, specific notation is used to represent different components of the system:
16044+
16045+
- R1, R2, ... - relay chain blocks (produced at ~6-second intervals)
16046+
- P1, P2, ... - parachain blocks that need validation and inclusion
16047+
- C1, C2, ... - cores on the relay chain
16048+
16049+
In the single-core scenario (assuming a 6-second relay chain block time), processing four parablocks requires approximately 30 seconds:
16050+
16051+
```mermaid
16052+
sequenceDiagram
16053+
participant R1 as R1
16054+
participant R2 as R2
16055+
participant R3 as R3
16056+
participant R4 as R4
16057+
participant R5 as R5
16058+
16059+
Note over R1,R5: Single Core Scenario
16060+
16061+
rect rgb(200, 220, 240)
16062+
Note right of R1: Core C1
16063+
R1->>R1: Back P1
16064+
R2->>R2: Include P1
16065+
R2->>R2: Back P2
16066+
R3->>R3: Include P2
16067+
R3->>R3: Back P3
16068+
R4->>R4: Include P3
16069+
R4->>R4: Back P4
16070+
R5->>R5: Include P4
16071+
end
16072+
```
16073+
16074+
With elastic scaling utilizing two cores simultaneously, the same four parablocks can be processed in approximately 18 seconds:
16075+
16076+
```mermaid
16077+
sequenceDiagram
16078+
participant R1 as R1
16079+
participant R2 as R2
16080+
participant R3 as R3
16081+
participant R4 as R4
16082+
participant R5 as R5
16083+
16084+
Note over R1,R3: Multi-Core Scenario
16085+
16086+
rect rgb(200, 220, 240)
16087+
Note right of R1: Core C1
16088+
R1->>R1: Back P1
16089+
R2->>R2: Include P1
16090+
R2->>R2: Back P2
16091+
R3->>R3: Include P2
16092+
end
16093+
16094+
rect rgb(220, 200, 240)
16095+
Note right of R1: Core C2
16096+
R1->>R1: Back P3
16097+
R2->>R2: Include P3
16098+
R2->>R2: Back P4
16099+
R3->>R3: Include P4
16100+
end
16101+
```
16102+
16103+
To help interpret the sequence diagrams above, note the following key elements:
16104+
16105+
- The horizontal axis represents time progression through relay chain blocks (R1-R5)
16106+
- Each colored rectangle shows processing on a specific core (C1 or C2)
16107+
- In the single-core scenario, all blocks must be processed sequentially on one core
16108+
- In the multi-core scenario, blocks are processed in parallel across multiple cores, reducing total time
16109+
16110+
The relay chain processes these multiple parablocks as independent validation units during the backing, availability, and approval phases. However, during inclusion, it verifies that their state roots align properly to maintain chain consistency.
16111+
16112+
From an implementation perspective:
16113+
16114+
- **Parachain side** - collators must increase their block production rate to utilize multiple cores fully
16115+
- **Validation process** - each core operates independently, but with coordinated state verification
16116+
- **Resource management** - cores are dynamically allocated based on parachain requirements
16117+
- **State consistency** - while backed and processed in parallel, the parablocks maintain sequential state transitions
16118+
16119+
## Benefits of Elastic Scaling
16120+
16121+
- **Increased throughput** - multiple concurrent cores enable parachains to process transactions at multiples of their previous capacity. By allowing multiple parachain blocks to be validated within each relay chain block cycle, applications can achieve significantly higher transaction volumes
16122+
16123+
- **Lower latency** - transaction finality improves substantially with multi-core processing. Parachains currently achieve 2-second latency with three cores, with projected improvements to 500ms using 12 cores, enabling near-real-time application responsiveness
16124+
16125+
- **Resource efficiency** - applications acquire computational resources precisely matched to their needs, eliminating wasteful over-provisioning. Coretime can be purchased at granular intervals (blocks, hours, days), creating cost-effective operations, particularly for applications with variable transaction patterns
16126+
16127+
- **Scalable growth** - new applications can launch with minimal initial resource commitment and scale dynamically as adoption increases. This eliminates the traditional paradox of either over-allocating resources (increasing costs) or under-allocating (degrading performance) during growth phases
16128+
16129+
- **Workload distribution** - parachains intelligently distribute workloads across cores during peak demand periods and release resources when traffic subsides. Paired with secondary coretime markets, this ensures maximum resource utilization across the entire network ecosystem
16130+
16131+
- **Reliable performance** - end-users experience reliable application performance regardless of network congestion levels. Applications maintain responsiveness even during traffic spikes, eliminating performance degradation that commonly impacts blockchain applications during high-demand periods
16132+
16133+
## Use Cases
16134+
16135+
Elastic scaling enables applications to dynamically adjust their resource consumption based on real-time demand. This is especially valuable for decentralized applications where usage patterns can be highly variable. The following examples illustrate common scenarios where elastic scaling delivers significant performance and cost-efficiency benefits.
16136+
16137+
### Handling Sudden Traffic Spikes
16138+
16139+
Many decentralized applications experience unpredictable, high-volume traffic bursts, especially in gaming, DeFi protocols, NFT auctions, messaging platforms, and social media. Elastic scaling allows these systems to acquire additional coretime during peak usage and release it during quieter periods, ensuring responsiveness without incurring constant high infrastructure costs.
16140+
16141+
### Supporting Early-Stage Growth
16142+
16143+
Startups and new projects often begin with uncertain or volatile demand. With elastic scaling, teams can launch with minimal compute resources (e.g., a single core) and gradually scale as adoption increases. This prevents overprovisioning and enables cost-efficient growth until the application is ready for more permanent or horizontal scaling.
16144+
16145+
### Scaling Massive IoT Networks
16146+
16147+
Internet of Things (IoT) applications often involve processing data from millions of devices in real time. Elastic scaling supports this need by enabling high-throughput transaction processing as demand fluctuates. Combined with Polkadot’s shared security model, it provides a reliable and privacy-preserving foundation for large-scale IoT deployments.
16148+
16149+
### Powering Real-Time, Low-Latency Systems
16150+
16151+
Applications like payment processors, trading platforms, gaming engines, or real-time data feeds require fast, consistent performance. Elastic scaling can reduce execution latency during demand spikes, helping ensure low-latency, reliable service even under heavy load.
16152+
--- END CONTENT ---
16153+
1601616154
Doc-Content: https://docs.polkadot.com/polkadot-protocol/architecture/polkadot-chain/
1601716155
--- BEGIN CONTENT ---
1601816156
---

polkadot-protocol/architecture/polkadot-chain/.pages

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ nav:
33
- index.md
44
- 'Overview': overview.md
55
- 'Proof of Stake Consensus': pos-consensus.md
6-
- 'Agile Coretime': agile-coretime.md
6+
- 'Agile Coretime': agile-coretime.md
7+
- 'Elastic Scaling': elastic-scaling.md
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
title: Elastic Scaling
3+
description: Learn how elastic scaling in Polkadot boosts parachain throughput, reduces latency, and supports dynamic, cost-efficient resource allocation.
4+
---
5+
6+
# Elastic Scaling
7+
8+
## Introduction
9+
10+
Polkadot's architecture delivers scalability and security through its shared security model, where the relay chain coordinates and validates multiple parallel chains.
11+
12+
Elastic scaling enhances this architecture by allowing parachains to utilize multiple computational cores simultaneously, breaking the previous 1:1 relationship between parachain and relay chain blocks.
13+
14+
This technical advancement enables parachains to process multiple blocks within a single relay chain block, significantly increasing throughput capabilities. By leveraging [Agile Coretime](/polkadot-protocol/architecture/polkadot-chain/agile-coretime){target=\_blank}, parachains can dynamically adjust their processing capacity based on demand, creating an efficient and responsive infrastructure for high-throughput applications.
15+
16+
## How Elastic Scaling Works
17+
18+
Elastic scaling enables parachains to process multiple blocks in parallel by utilizing additional cores on the relay chain. This section provides a technical analysis of the performance advantages and details of the implementation.
19+
20+
Consider a parachain that needs to process four consecutive parablocks. With traditional single-core allocation, the validation process follows a strictly sequential pattern. Each parablock undergoes a two-phase process on the relay chain:
21+
22+
1. **Backing phase** - validators create and distribute validity statements
23+
2. **Inclusion phase** - the parablock is included in the relay chain after availability verification
24+
25+
Throughout the following diagrams, specific notation is used to represent different components of the system:
26+
27+
- R1, R2, ... - relay chain blocks (produced at ~6-second intervals)
28+
- P1, P2, ... - parachain blocks that need validation and inclusion
29+
- C1, C2, ... - cores on the relay chain
30+
31+
In the single-core scenario (assuming a 6-second relay chain block time), processing four parablocks requires approximately 30 seconds:
32+
33+
```mermaid
34+
sequenceDiagram
35+
participant R1 as R1
36+
participant R2 as R2
37+
participant R3 as R3
38+
participant R4 as R4
39+
participant R5 as R5
40+
41+
Note over R1,R5: Single Core Scenario
42+
43+
rect rgb(200, 220, 240)
44+
Note right of R1: Core C1
45+
R1->>R1: Back P1
46+
R2->>R2: Include P1
47+
R2->>R2: Back P2
48+
R3->>R3: Include P2
49+
R3->>R3: Back P3
50+
R4->>R4: Include P3
51+
R4->>R4: Back P4
52+
R5->>R5: Include P4
53+
end
54+
```
55+
56+
With elastic scaling utilizing two cores simultaneously, the same four parablocks can be processed in approximately 18 seconds:
57+
58+
```mermaid
59+
sequenceDiagram
60+
participant R1 as R1
61+
participant R2 as R2
62+
participant R3 as R3
63+
participant R4 as R4
64+
participant R5 as R5
65+
66+
Note over R1,R3: Multi-Core Scenario
67+
68+
rect rgb(200, 220, 240)
69+
Note right of R1: Core C1
70+
R1->>R1: Back P1
71+
R2->>R2: Include P1
72+
R2->>R2: Back P2
73+
R3->>R3: Include P2
74+
end
75+
76+
rect rgb(220, 200, 240)
77+
Note right of R1: Core C2
78+
R1->>R1: Back P3
79+
R2->>R2: Include P3
80+
R2->>R2: Back P4
81+
R3->>R3: Include P4
82+
end
83+
```
84+
85+
To help interpret the sequence diagrams above, note the following key elements:
86+
87+
- The horizontal axis represents time progression through relay chain blocks (R1-R5)
88+
- Each colored rectangle shows processing on a specific core (C1 or C2)
89+
- In the single-core scenario, all blocks must be processed sequentially on one core
90+
- In the multi-core scenario, blocks are processed in parallel across multiple cores, reducing total time
91+
92+
The relay chain processes these multiple parablocks as independent validation units during the backing, availability, and approval phases. However, during inclusion, it verifies that their state roots align properly to maintain chain consistency.
93+
94+
From an implementation perspective:
95+
96+
- **Parachain side** - collators must increase their block production rate to utilize multiple cores fully
97+
- **Validation process** - each core operates independently, but with coordinated state verification
98+
- **Resource management** - cores are dynamically allocated based on parachain requirements
99+
- **State consistency** - while backed and processed in parallel, the parablocks maintain sequential state transitions
100+
101+
## Benefits of Elastic Scaling
102+
103+
- **Increased throughput** - multiple concurrent cores enable parachains to process transactions at multiples of their previous capacity. By allowing multiple parachain blocks to be validated within each relay chain block cycle, applications can achieve significantly higher transaction volumes
104+
105+
- **Lower latency** - transaction finality improves substantially with multi-core processing. Parachains currently achieve 2-second latency with three cores, with projected improvements to 500ms using 12 cores, enabling near-real-time application responsiveness
106+
107+
- **Resource efficiency** - applications acquire computational resources precisely matched to their needs, eliminating wasteful over-provisioning. Coretime can be purchased at granular intervals (blocks, hours, days), creating cost-effective operations, particularly for applications with variable transaction patterns
108+
109+
- **Scalable growth** - new applications can launch with minimal initial resource commitment and scale dynamically as adoption increases. This eliminates the traditional paradox of either over-allocating resources (increasing costs) or under-allocating (degrading performance) during growth phases
110+
111+
- **Workload distribution** - parachains intelligently distribute workloads across cores during peak demand periods and release resources when traffic subsides. Paired with secondary coretime markets, this ensures maximum resource utilization across the entire network ecosystem
112+
113+
- **Reliable performance** - end-users experience reliable application performance regardless of network congestion levels. Applications maintain responsiveness even during traffic spikes, eliminating performance degradation that commonly impacts blockchain applications during high-demand periods
114+
115+
## Use Cases
116+
117+
Elastic scaling enables applications to dynamically adjust their resource consumption based on real-time demand. This is especially valuable for decentralized applications where usage patterns can be highly variable. The following examples illustrate common scenarios where elastic scaling delivers significant performance and cost-efficiency benefits.
118+
119+
### Handling Sudden Traffic Spikes
120+
121+
Many decentralized applications experience unpredictable, high-volume traffic bursts, especially in gaming, DeFi protocols, NFT auctions, messaging platforms, and social media. Elastic scaling allows these systems to acquire additional coretime during peak usage and release it during quieter periods, ensuring responsiveness without incurring constant high infrastructure costs.
122+
123+
### Supporting Early-Stage Growth
124+
125+
Startups and new projects often begin with uncertain or volatile demand. With elastic scaling, teams can launch with minimal compute resources (e.g., a single core) and gradually scale as adoption increases. This prevents overprovisioning and enables cost-efficient growth until the application is ready for more permanent or horizontal scaling.
126+
127+
### Scaling Massive IoT Networks
128+
129+
Internet of Things (IoT) applications often involve processing data from millions of devices in real time. Elastic scaling supports this need by enabling high-throughput transaction processing as demand fluctuates. Combined with Polkadot’s shared security model, it provides a reliable and privacy-preserving foundation for large-scale IoT deployments.
130+
131+
### Powering Real-Time, Low-Latency Systems
132+
133+
Applications like payment processors, trading platforms, gaming engines, or real-time data feeds require fast, consistent performance. Elastic scaling can reduce execution latency during demand spikes, helping ensure low-latency, reliable service even under heavy load.

0 commit comments

Comments
 (0)