Skip to content

Releases: bgpkit/bgpkit-broker

v0.7.6

01 Nov 16:45
47cb680
Compare
Choose a tag to compare

Highlights

  • migrate default broker API endpoint to https://api.bgpkit.com/v3/broker
    • Full API docs is available at https://api.bgpkit.com/docs
  • add get_peers to BgpkitBroker struct
    • fetches the list of peers for a given collector
    • allow specifying filters the same way as querying MRT files
    • available filter functions include:
      • .peers_asn(ASN)
      • .peers_ip(IP)
      • .collector_id(COLLECTOR_ID)
      • .peers_only_full_feed(TRUE/FALSE)
    • returns Vec<BrokerPeer>
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
pub struct BrokerPeer {
    /// The date of the latest available data.
    pub date: NaiveDate,
    /// The IP address of the collector peer.
    pub ip: IpAddr,
    /// The ASN (Autonomous System Number) of the collector peer.
    pub asn: u32,
    /// The name of the collector.
    pub collector: String,
    /// The number of IPv4 prefixes.
    pub num_v4_pfxs: u32,
    /// The number of IPv6 prefixes.
    pub num_v6_pfxs: u32,
    /// The number of connected ASNs.
    pub num_connected_asns: u32,
}

v0.7.5

23 Aug 15:10
3386bae
Compare
Choose a tag to compare

[NEW] deploy at fly.io

  • add a deployment config file for fly.io

Bugfix

  • fix an issue where the API returns URL with additional /bgpdata for some new route-views collectors.

Documentation

  • improved documentation on deploying bgpkit-broker services.

v0.7.4

22 Aug 20:27
eb36f58
Compare
Choose a tag to compare

Highlights

  • add a new 30s timeout for fetching web page content for the crawler
    • the async reqwest::get function by default does not have a timeout and thus we could potentially stuck waiting
      forever.
  • add new max_delay_secs parameter to the /health endpoint to allow user specify a maximum delay in seconds and
    the API will return error code 503 if the delay for the latest file timestamp (any file) is greater than the specified
    value.
    • this allows better monitoring for the API's health without sending heartbeats.

v0.7.3

14 Aug 07:40
b6361f7
Compare
Choose a tag to compare

Hotfix

  • fix an issue where the main thread waits for updater thread and never starts the API thread

(deprecated) v0.7.2

13 Aug 21:40
1382a58
Compare
Choose a tag to compare

Highlights

  • panic if the cli updater thread failed for some reason
    • previously, the failed thread goes silently, and the main process continues running
  • reduce logging if not configuring NATS notifier
    • previously, the missing notifier message appear at every fetch

v0.7.1

06 Aug 05:14
cb3f0cb
Compare
Choose a tag to compare

Highlights

  • updated the bgpkit-broker update command to allow bootstrapping new collectors on demand
  • a number of new RouteViews collectors have been added
    • amsix.ams cix.atl decix.jhb iraq-ixp.bgw pacwave.lax pit.scl pitmx.qro route-views7
  • added a new allow_invalid_cert function to the constructor and deprecated the disable_ssl_check function
    • they work the same way, but the new function name is more accurate
  • constructor also checks for ONEIO_ACCEPT_INVALID_CERTS=true environment variable to allow invalid certs (not
    recommended, use at your own risk)
  • improved project filter. it now matches the name of the collector to project names
    • this works with the newly added RouteViews collectors whose names do not prefix with route-views

v0.7.0

18 Jun 23:17
7a4d2ee
Compare
Choose a tag to compare

[NEW] NATS notification

Added new-file notification by publishing newly indexed BGP MRT file meta information in JSON format to user-specified
NATS server.

The NATS URL and credentials is configured via environment variables:

  • BGPKIT_BROKER_NATS_URL like nats://nats.bgpkit.com:4222 (default)
  • BGPKIT_BROKER_NATS_ROOT_SUBJECT such as public.broker. (default)

The notification is published to public.broker.{PROJECT}.{COLLECTOR}.{DATA_TYPE} where

  • PROJECT is riperis or route-views
  • COLLECTOR is the route collector IDs like rrc00 or route-views2
  • DATA_TYPE is rib or updates

Example of what a subscriber can be notified for:

  • public.broker.>: any new MRT files
  • public.broker.route-views.>: new RouteViews updates files
  • public.broker.rrc00.rib: new RIPE RIS rrc00 RIB dump files
  • public.broker.*.rib: any new RIB dump files

This PR also adds a new subcommand bgpkit-broker live that listens to the specified NATS server for new file
notification.

Streaming live from a broker NATS server

Usage: bgpkit-broker live [OPTIONS]

Options:
      --no-log             disable logging
  -u, --url <URL>          URL to NATS server, e.g. nats://localhost:4222. If not specified, will try to read from BGPKIT_BROKER_NATS_URL env variable
      --env <ENV>          
  -s, --subject <SUBJECT>  Subject to subscribe to, default to public.broker.>
  -p, --pretty             Pretty print JSON output
  -h, --help               Print help
  -V, --version            Print version

[NEW] bgpkit-broker doctor subcommand

Added bgpkit-broker doctor subcommand that checks the broker instance status and missing collectors.

Check broker instance health and missing collectors

Usage: bgpkit-broker doctor [OPTIONS]

Options:
      --no-log     disable logging
      --env <ENV>  
  -h, --help       Print help
  -V, --version    Print version

Example output:

checking broker instance health...
        broker instance at https://api.broker.bgpkit.com/v3 is healthy

checking for missing collectors...
missing the following collectors:
| project    | name         | country         | activated_on        | data_url                                           |
|------------|--------------|-----------------|---------------------|----------------------------------------------------|
| routeviews | decix.jhb    | Malaysia        | 2022-12-20 12:00:00 | http://archive.routeviews.org/decix.jhb/bgpdata    |
| routeviews | pacwave.lax  | United States   | 2023-03-30 12:00:00 | http://archive.routeviews.org/pacwave.lax/bgpdata  |
| routeviews | pit.scl      | Chile           | 2023-08-31 23:45:00 | http://archive.routeviews.org/pit.scl/bgpdata      |
| routeviews | amsix.ams    | The Netherlands | 2024-02-22 23:20:00 | http://archive.routeviews.org/amsix.ams/bgpdata    |
| routeviews | pitmx.qro    | Mexico          | 2024-02-23 22:15:00 | http://archive.routeviews.org/pitmx.qro/bgpdata    |
| routeviews | iraq-ixp.bgw | Iraq            | 2024-04-13 00:01:00 | http://archive.routeviews.org/iraq-ixp.bgw/bgpdata |

[NEW] Heartbeat URL support

If BGPKIT_BROKER_HEARTBEAT_URL environment is set, when running the bgpkit-broker serve subcommand, the instance
will periodically send a GET request to the configured heartbeat URL.

[NEW] bgpkit-broker latest subcommand

Added latest subcommand to CLI to display latest MRT files for all collectors.

Developer experience improvements

  • add .is_rib() to BrokerItem struct
  • add strict ordering definition for BrokerItem struct

An array of BrokerItems can be sorted with the following order:

  1. smaller timestamp before larger timestamp
  2. RIB before updates
  3. then alphabetical order on collector ID (route-views before rrc)

Breaking changes

  • switch to rustls as the default TLS backend

v0.7.0-beta.6

29 Apr 23:52
12f42c0
Compare
Choose a tag to compare
v0.7.0-beta.6 Pre-release
Pre-release

[New!] NATS notification

Added new-file notification by publishing newly indexed BGP MRT file meta information in JSON format to user-specified
NATS server.

The NATS URL and credentials is configured via environment variables:

  • BGPKIT_BROKER_NATS_URL like nats://nats.bgpkit.com:4222 (default)
  • BGPKIT_BROKER_NATS_ROOT_SUBJECT such as public.broker. (default)

The notification is published to public.broker.{PROJECT}.{COLLECTOR}.{DATA_TYPE} where

  • PROJECT is riperis or route-views
  • COLLECTOR is the route collector IDs like rrc00 or route-views2
  • DATA_TYPE is rib or updates

Example of what a subscriber can be notified for:

  • public.broker.>: any new MRT files
  • public.broker.route-views.>: new RouteViews updates files
  • public.broker.rrc00.rib: new RIPE RIS rrc00 RIB dump files
  • public.broker.*.rib: any new RIB dump files

This PR also adds a new subcommand bgpkit-broker live that listens to the specified NATS server for new file
notification.

Streaming live from a broker NATS server

Usage: bgpkit-broker live [OPTIONS]

Options:
      --no-log             disable logging
  -u, --url <URL>          URL to NATS server, e.g. nats://localhost:4222. If not specified, will try to read from BGPKIT_BROKER_NATS_URL env variable
      --env <ENV>          
  -s, --subject <SUBJECT>  Subject to subscribe to, default to public.broker.>
  -p, --pretty             Pretty print JSON output
  -h, --help               Print help
  -V, --version            Print version

[New!] bgpkit-broker doctor subcommand

Added bgpkit-broker doctor subcommand that checks the broker instance status and missing collectors.

Check broker instance health and missing collectors

Usage: bgpkit-broker doctor [OPTIONS]

Options:
      --no-log     disable logging
      --env <ENV>  
  -h, --help       Print help
  -V, --version    Print version

Example output:

checking broker instance health...
        broker instance at https://api.broker.bgpkit.com/v3 is healthy

checking for missing collectors...
missing the following collectors:
| project    | name         | country         | activated_on        | data_url                                           |
|------------|--------------|-----------------|---------------------|----------------------------------------------------|
| routeviews | decix.jhb    | Malaysia        | 2022-12-20 12:00:00 | http://archive.routeviews.org/decix.jhb/bgpdata    |
| routeviews | pacwave.lax  | United States   | 2023-03-30 12:00:00 | http://archive.routeviews.org/pacwave.lax/bgpdata  |
| routeviews | pit.scl      | Chile           | 2023-08-31 23:45:00 | http://archive.routeviews.org/pit.scl/bgpdata      |
| routeviews | amsix.ams    | The Netherlands | 2024-02-22 23:20:00 | http://archive.routeviews.org/amsix.ams/bgpdata    |
| routeviews | pitmx.qro    | Mexico          | 2024-02-23 22:15:00 | http://archive.routeviews.org/pitmx.qro/bgpdata    |
| routeviews | iraq-ixp.bgw | Iraq            | 2024-04-13 00:01:00 | http://archive.routeviews.org/iraq-ixp.bgw/bgpdata |

v0.7.0-beta.5

29 Jan 16:18
abe2df7
Compare
Choose a tag to compare
v0.7.0-beta.5 Pre-release
Pre-release

Breaking changes

  • switch to rustls as the default TLS backend

v0.7.0-beta.4

18 Jan 23:10
86dd038
Compare
Choose a tag to compare
v0.7.0-beta.4 Pre-release
Pre-release

CLI addtion

  • added latest subcommand to CLI to display latest MRT files for all collectors

Developer experience improvements

  • add .is_rib() to BrokerItem struct
  • add strict ordering definition for BrokerItem struct

An array of BrokerItems can be sorted with the following order:

  1. smaller timestamp before larger timestamp
  2. RIB before updates
  3. then alphabetical order on collector ID (route-views before rrc)