Home/System architecture
Phase-one implementation plan

CHA.LA BGP data architecture

A dedicated ClickHouse node stores routing data, continuously ingests BGP Updates, and uses daily RIB reconciliation to maintain current state, withdrawal history, topology and risk evidence.

3RIS Collector
24Representative Peers
DailyFull RIB reconciliation
5 minutesBGP UPDATE import interval
Data pipeline

From public routing data to CHA.LA intelligence

CHA.LA servers collect, normalize and load data into ClickHouse on a schedule. The website and public API read only the CHA.LA data layer.

01

CHA.LA Collector

  • 3 regional Collectors
  • RIB and Update MRT
  • Periodic external route snapshot supplementation
02

BGP Import Service

  • Download and verification
  • MRT parsing
  • Peer filtering and deduplication
03

ClickHouse

  • Current routes
  • Change intervals
  • Event and hourly aggregation
04

CHA.LA Business Layer

  • IP and ASN pages
  • Prefix history and topology
  • Anomaly analysis and risk model
Dedicated node

Server responsibilities and resource limits

This node runs only ClickHouse, BGP ingestion and temporary MRT parsing tasks. It does not host the website, PostgreSQL or honeypots.

ProcessorE3-1270 v64 cores, 8 threads
Memory32 GBClickHouse limit: 24 GB
Local storage1 TB SSDKeep disk usage below 70%
Network1 Gbps40 TB of traffic per month
70%Disk usage warning threshold

At the threshold, pause collection expansion and prioritize removal of expired events and temporary files.

24Initial peer limit

Select about 8 representative peers per collector to establish a stable observation baseline.

1 dayRIB reconciliation interval

Recover missed Updates and verify that current routes agree with the collector.

State lifecycle

Retain withdrawals; restore active state on reannouncement

Keep raw events for a limited period and retain structured states and intervals long term, so ASN pages can show withdrawn routes accurately in grey.

01

Announcement

Opens a new route interval, or updates the current AS path, origin, and last active time.

02

Withdrawal

Closes the current interval, writes withdrawn_at and close_reason, and the page is kept as gray historical record.

03

Re-announcement

Opens a new valid interval; the old withdrawn interval is retained long-term, forming a complete change trajectory.

Currently active

At least one observation point still sees this prefix, and the page displays normally.

Withdrawn

All valid observation points have withdrawn, confirmed by RIB calibration, and the page is displayed in gray.

Partially visible

Some collectors still see it, some have withdrawn; cannot be directly determined as global withdrawal.

Data latency

Collector or RIB has not yet updated; only indicates latency, not mislabeled as withdrawn.

Data model

Core ClickHouse tables

Store detailed events separately from long-term history to prevent repeated Announcements from continually expanding the database.

TableContentsRetention periodApplication use
bgp_routes_currentLatest route status (including withdrawals)Long-termLatest status for each Prefix, Collector, and Peer; withdrawals are not deleted immediately
bgp_route_eventsRaw change events14 daysDetails of announcements, withdrawals, origin and path changes
bgp_route_intervalsRoute change intervalsLong-termWhen announced, when withdrawn, why closed, and origin changes
bgp_prefix_hourlyHourly aggregationLong-termVisibility, origin, path length, and change count
bgp_import_runsImport task records90 daysSource files, processing progress, latency, verification results, and errors
bgp_asn_edgesASN adjacency derived tableLong-termAggregates upstreams, downstreams, peers, strength, and visible peer count from AS paths
Retention policy

Remove duplicates and preserve useful history

Cleanup affects only files that can be downloaded again and repetitive details. It does not remove the prefix routing history used by the website.

Temporary data

Clean up after successful import

  • Downloaded MRT files that have already been parsed
  • Duplicate Update details older than 14 days
  • Import run logs older than 90 days
Business data

Retained long-term after structuring

  • Currently active routes and visible peers
  • Withdrawn ranges, re-announcements, and origin changes
  • Hourly aggregation, topology, and anomaly analysis results
Unified fields

Essential information for each route record

Standardization is completed upon import, ensuring current routes, history, topology, and risk models all use the same field definitions.

collectorpeerobserved_atevent_typeprefixip_versionorigin_asnas_pathpath_lengthcommunitiesfirst_seenlast_seenwithdrawn_atis_activevisibility_countactive_observation_countclose_reasonraw_source
Implementation order

Business capability rollout checklist

First complete user-facing query capabilities, then gradually add anomaly detection and risk model inputs.

  1. 01IP current prefix and origin ASN
  2. 02Move ASN pages to CHA.LA BGP Archive
  3. 03Current prefix routes and history
  4. 04AS Path and BGP topology
  5. 05Visible peer count
  6. 06Origin ASN changes
  7. 07Prefix disappearance and reappearance
  8. 08Supporting evidence for Anycast assessment
  9. 09Alerts for hijacking and route leaks
  10. 10BGP evidence for the IP risk model