spb/internetpressure
Public
TypeScript 36.3%
Python 31.8%
Go 18%
JavaScript 9.8%
Shell 1.9%
SQL 1.4%
CSS 0.5%
1# InternetPressure.io — scoring configuration (single source of truth for the pressure engine).2# Everything here is hot-reloadable by the engine (re-read every cycle) and editable from /admin.3# Weights must sum to 1.0. Nothing in the application code hard-codes these values.45version: 167pressure_weights:8 routing: 0.259 latency: 0.2010 dns: 0.1511 availability: 0.1512 http_tls: 0.1013 path: 0.1014 corroboration: 0.051516levels:17 - { max: 10, id: calm, label: "Exceptionally calm" }18 - { max: 25, id: normal, label: "Normal" }19 - { max: 40, id: elevated, label: "Elevated" }20 - { max: 55, id: stressed, label: "Stressed" }21 - { max: 70, id: high, label: "Highly stressed" }22 - { max: 85, id: severe, label: "Severe disruption" }23 - { max: 100, id: extreme, label: "Extreme Internet event" }2425engine:26 cycle_seconds: 15 # how often the global score is recomputed (≈ 20 000 targets × 8 probes per cycle)27 window_seconds: 120 # "current" window for probe signals28 bgp_window_seconds: 60 # "current" window for BGP rates29 baseline_days: 7 # trailing baseline horizon30 baseline_exclude_seconds: 600 # most recent data excluded from the baseline (so an incident doesn't baseline itself)31 baseline_min_samples: 12 # 5-minute buckets; below this the signal is "weak coverage" and its weight is damped (0 under 20 %)32 seasonality: hour_of_day # baseline restricted to ±1h same hour of day when enough history exists33 seasonality_min_days: 3 # …otherwise plain trailing window34 z_clip_low: -3.035 z_clip_high: 8.036 z_anomaly: 3.0 # a pair (probe,target) is abnormal above this robust z37 saturation_k: 1.2 # score = 100 * (1 - exp(-k * stress)) / (1 - exp(-k)) — concavity of stress → score38 z_stress_start: 1.0 # pair stress ramps from 0 at this robust z …39 z_stress_full: 6.0 # … to 1 at this robust z40 availability_amplification: 8 # share of importance-weighted targets down × this = availability stress (1/8 down → 100)41 rate_scale: 0.25 # failure-rate excess over baseline that yields full stress (25 % of checks)42 loss_scale: 0.10 # packet-loss excess over baseline that yields full stress (10 %)43 min_probes_for_scoring: 2 # self-exclusion: below this the engine freezes and reports internal degradation44 probe_fresh_seconds: 180 # a probe is "fresh" if we received a batch in the last N seconds45 probe_local_failure_ratio: 0.8 # if ≥80 % of a probe's targets fail at once, the probe is excluded (its own uplink is down)46 bgp_fresh_seconds: 1204748# Per-component stress recipe. Each signal contributes weight × f(robust_z or ratio) to the component "stress",49# which is then saturated into 0–100. The `label` is what the explainability UI shows.50components:51 latency:52 signals:53 - { id: ttfb_z, label: "HTTP time-to-first-byte vs baseline", weight: 0.35 }54 - { id: tcp_z, label: "TCP connect latency vs baseline", weight: 0.25 }55 - { id: rtt_z, label: "ICMP round-trip time vs baseline", weight: 0.25 }56 - { id: loss, label: "Packet loss", weight: 0.15 }57 dns:58 signals:59 - { id: dns_fail_rate, label: "DNS SERVFAIL / timeout rate", weight: 0.45 }60 - { id: dns_latency_z, label: "DNS lookup latency vs baseline", weight: 0.30 }61 - { id: resolver_disagreement, label: "Resolver disagreement", weight: 0.25 }62 availability:63 signals:64 - { id: target_down_corroborated, label: "Targets failing from ≥2 probe regions", weight: 0.70 }65 - { id: fail_rate_z, label: "Failure rate vs baseline", weight: 0.30 }66 http_tls:67 signals:68 - { id: http_5xx_rate, label: "HTTP 5xx rate", weight: 0.35 }69 - { id: tls_fail_rate, label: "TLS handshake failures", weight: 0.35 }70 - { id: reset_timeout_rate, label: "Connection resets / timeouts", weight: 0.30 }71 path:72 signals:73 - { id: route_change_rate, label: "Route fingerprint changes vs baseline churn", weight: 0.60 }74 - { id: hop_count_z, label: "Hop count deviation", weight: 0.20 }75 - { id: path_latency_shift, label: "Latency shift on changed paths", weight: 0.20 }76 routing:77 signals:78 - { id: bgp_withdrawals_z, label: "BGP withdrawals/s vs baseline", weight: 0.40 }79 - { id: bgp_announcements_z, label: "BGP announcements/s vs baseline", weight: 0.25 }80 - { id: bgp_origin_changes_z, label: "Origin ASN changes vs baseline", weight: 0.20 }81 - { id: bgp_collector_disagreement, label: "Collector disagreement", weight: 0.15 }82 corroboration:83 signals:84 - { id: vendor_incidents, label: "Public incidents declared by major providers", weight: 1.0 }8586# Network importance multipliers (target importance 1–5 → weight in aggregations).87importance_weights: { 1: 0.4, 2: 0.7, 3: 1.0, 4: 1.5, 5: 2.2 }8889events:90 detect_threshold: 45 # component/regional score that opens an event candidate91 confirm_cycles: 2 # consecutive cycles above threshold before "detected" → "developing"92 active_cycles: 6 # …before "active"93 recover_threshold: 30 # below this the event is "recovering"94 resolve_after_seconds: 600 # continuous time below recover_threshold before "resolved"95 min_confidence: 0.459697fronts:98 min_pairs: 3 # source-region → destination-region pairs elevated simultaneously99 z_threshold: 2.5100 min_intensity: 35101102scheduler:103 tiers: { 1: 20, 2: 45, 3: 300, 4: 900 } # seconds between HTTP checks per tier (4 = the long tail: government, media, retail…)104 dns_every: 600 # 4 resolvers × 2 100 targets: one query per resolver every 10 min per probe105 ping_every: 120106 traceroute_every: 900107 boost_factor: 0.5 # during anomalies, intervals are multiplied by this for affected targets108 boost_seconds: 900109 batch_flush_seconds: 10110 max_batch: 500111 config_refresh_seconds: 300112