Remove markdown

Lee Yunjin committed May 6, 2026 at 10:07 UTC c61ba0ed3c7b761a9083a2b0b06dcb4c571f9e1b
2 files changed -69
portal/discovery/STRESS_TEST_SCENARIOS.md deleted
-37
@@ -1,37 +0,0 @@
1 -# Extended Stress Test Specification for MOLS-EWMA Policy
2 -
3 -This document outlines long-term stress test scenarios designed to validate the stability, scalability, and transposition accuracy of the EWMA-based relay selection policy.
4 -
5 -## 1. Scenario A: "The Messy Grid" (64x64 Non-Ideal Distribution)
6 -**Objective:** Validate transposition logic when relay density is non-optimal (not a perfect divisor of 64), which naturally occurs in fragmented network topologies.
7 -
8 -- **Setup:** 53 Relay URLs (not a power of 2, creating uneven GF(64) hash mapping).
9 -- **Network Stress:**
10 - - Inject "Micro-burst" RTT spikes (100ms duration, 800ms magnitude) every 30 seconds to 30% of nodes.
11 - - Validate that EWMA ($\alpha=0.3$) filters these spikes, preventing frequent priority flapping.
12 -- **Success Criteria:**
13 - - The system must prioritize the remaining 70% of stable nodes.
14 - - No "Priority Oscillation" where a node bounces between rank 1 and 5 every minute.
15 -
16 -## 2. Scenario B: "Massive Scale" (256 Node Pool)
17 -**Objective:** Validate performance and memory stability when the relay set significantly exceeds the standard 64-node MOLS grid.
18 -
19 -- **Setup:** 256 active Relay URLs.
20 -- **Network Stress:**
21 - - Perform a "Rolling Congestion" simulation: shift a 500ms+ latency penalty across groups of 32 nodes sequentially over a 24-hour period.
22 -- **Success Criteria:**
23 - - **Latency:** `rankRelayPool` execution time must remain < 5ms under the increased load.
24 - - **Stability:** The transposition logic should maintain a consistent set of the "top 3" healthiest nodes even as congestion rolls across the 256-node pool.
25 - - **Memory:** Telemetry counters (Prometheus gauge tracking) must not grow beyond the defined `boundedRelay` limit of 1024.
26 -
27 -## 3. Implementation Guidelines for `portal-loadtest`
28 -- **Simulation Duration:** All scenarios should run for a minimum of 24 hours to observe EWMA convergence.
29 -- **Telemetry Hook:** Integrate with the `portal/telemetry` package to log the `chi-square` uniformity metric every hour alongside the `EWMA RTT` distribution.
30 -- **Command:**
31 - ```bash
32 - # Scenario A
33 - make load-test -- -clients 500 -relays 53 -mode messy
34 -
35 - # Scenario B
36 - make load-test -- -clients 2000 -relays 256 -mode scale
37 - ```
portal/discovery/TEST_MOLS.md deleted
-32
@@ -1,32 +0,0 @@
1 -# MOLS EWMA & Percentile Transposition Performance Validation
2 -
3 -## 1. Overview
4 -We have upgraded the relay selection policy to incorporate not only EWMA-smoothed RTT but also percentile-based jitter analysis (p99 - p1). This multi-layered approach ensures that nodes are prioritized based on both central tendency (stability) and consistency (predictability).
5 -
6 -## 2. Methodology
7 -- **Percentile Tracking:** Each relay tracks the last 100 RTT samples.
8 -- **Jitter Scoring:** We calculate `Jitter = p99 - p1`.
9 -- **Transposition Criteria:** A relay is demoted if:
10 - - `EWMA RTT > 500ms` (persistent congestion) OR
11 - - `Jitter > 200ms` (high inconsistency/predictability risk)
12 -
13 -## 3. Performance Metrics (Simulated vs. Expected)
14 -
15 -| Metric | Threshold | Logic | Impact |
16 -| :--- | :--- | :--- | :--- |
17 -| **p50 (Median)** | < 100ms | Primary selection | Baseline low-latency path. |
18 -| **p99 (Tail)** | < 500ms | Transposition trigger | Prunes transient congestion spikes. |
19 -| **Jitter (p99-p1)**| < 200ms | Consistency filter | Eliminates "unpredictable" nodes. |
20 -
21 -## 4. Test Results (from `TestMOLSSelectPriorityEWMAStabilityTransposition`)
22 -The transposition logic was verified under a simulated scenario comparing a stable node against an inconsistent/high-jitter node.
23 -
24 -- **Stable Relay:** `EWMA=100ms`, `Jitter=20ms` -> **Ranked #1**
25 -- **Unstable Relay:** `EWMA=600ms`, `Jitter=300ms` -> **Ranked #2 (Demoted)**
26 -
27 -The engine successfully correctly identified and demoted the unstable node, even when their base MOLS scores were mathematically equivalent.
28 -
29 -## 5. Expected Performance Gains
30 -1. **Selection Predictability:** By penalizing nodes with high jitter, we steer traffic toward nodes that offer a tighter latency distribution, reducing re-transmission rates and improving throughput consistency.
31 -2. **Jitter Resilience:** The use of `p99 - p1` spread proactively identifies nodes subject to path oscillation or bufferbloat before they fully degrade the active session.
32 -3. **Tail Latency:** The combined EWMA and percentile filtering is expected to reduce p99 latency by **20-30%** compared to the original purely-MOLS-based policy.