Skip to content

Commit 29d811b

Browse files
lmicciniclaude
andcommitted
Update docs for cliff detection and performance cross-reference
Add cliff detection overhead note to heartbeat performance doc and restore Performance section in architecture doc as a cross-reference. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a35d783 commit 29d811b

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

docs/instanceha_architecture.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ InstanceHA is a high-availability service for OpenStack that automatically detec
2020
12. [Startup Reconciliation](#startup-reconciliation)
2121
13. [Graceful Shutdown](#graceful-shutdown)
2222
14. [Security](#security)
23-
15. [Testing](#testing)
24-
16. [Deployment](#deployment)
25-
17. [Configuration Options Reference](#configuration-options-reference)
23+
15. [Performance](#performance)
24+
16. [Testing](#testing)
25+
17. [Deployment](#deployment)
26+
18. [Configuration Options Reference](#configuration-options-reference)
2627

2728
---
2829

@@ -1853,6 +1854,12 @@ These values are passed as `METRICS_TLS_MIN_VERSION` and `METRICS_TLS_CIPHERS` e
18531854

18541855
---
18551856

1857+
## Performance
1858+
1859+
For heartbeat filter latency, UDP listener throughput, lock contention, memory overhead, and scalability projections at 1000-node scale, see [instanceha_heartbeat_performance.md](instanceha_heartbeat_performance.md).
1860+
1861+
---
1862+
18561863
## Testing
18571864

18581865
### Test Categories

docs/instanceha_heartbeat_performance.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,21 @@ nova-compute crashed (heartbeat still arriving). It acquires the
120120
against the timestamp map. Filter performance is unaffected by the
121121
protocol version since it operates on the in-memory timestamp dictionary.
122122

123+
#### Cliff Detection Overhead
124+
125+
Before filtering individual hosts, the function performs cliff detection:
126+
it counts the number of hosts with a fresh heartbeat (within
127+
`HEARTBEAT_TIMEOUT`) by scanning all entries in the timestamp snapshot,
128+
and compares this count against the previous cycle's value. If the drop
129+
exceeds `HEARTBEAT_CLIFF_THRESHOLD` (default 50%) and the previous count
130+
was ≥ 3, fencing is skipped entirely for that cycle.
131+
132+
This adds an O(n) pass over all timestamps (where n = total nodes, not
133+
just down hosts). At 1000 nodes this is a single dict iteration with one
134+
comparison per entry — well under 100 us and negligible compared to the
135+
Nova API call latency. The per-host filter logic that follows is
136+
unchanged.
137+
123138
### Latency by Down-Host Count
124139

125140
The THRESHOLD determines the maximum number of simultaneously down hosts

0 commit comments

Comments
 (0)