Skip to content

Commit

Permalink
Add ToC and general architecture overview to README (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
SRv6d authored Dec 14, 2023
1 parent 859b456 commit 1a2287e
Showing 1 changed file with 58 additions and 2 deletions.
60 changes: 58 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,63 @@
</div>
<br>

A daemon to manage anycasted services based on status checks.
`anycastd` is a daemon that manages services using multiple backends, each announcing the same
service prefixes to the network as a form of load balancing, commonly know as [Anycast].
It can be used to ensure that service prefixes are only announced when the underlying service is actually healthy, avoiding attracting traffic to service instances
that aren't functioning correctly.

# Configuration
## Table of Contents

- [Architecture](#architecture)
- [Services](#services)
- [Prefixes](#prefixes)
- [Health Checks](#health-checks)
- [Configuration](#configuration)

## Architecture

### Services

The main unit of abstraction used within `anycastd`. They combine [prefixes](#prefixes) and [health
checks](#health-checks) to form a logical service unit that executes health checks and manages announcements.

#### High Level Service Logic

```
┌─[Service]─────────────┐ ┌──────────┐
│ │ ┌──> │ HLTH CHK │
│ ┌───────────────────────────────┤ └──────────┘
│ IF healthy•: │ │ ┌──────────┐
│ announce prefixes │ ├──> │ HLTH CHK │
│ ELSE: •─────────────────────┐ │ └──────────┘
│ denounce prefixes │ │ │ ┌──────────┐
└───────────────────────┘ │ └──> │ HLTH CHK │
│ └──────────┘
┌─[Routing Daemon]────────────────┐ │
│ ┌──────────────────────────┐ │ │
│ │ Prefix │ <────────┤
│ │ 2001:db8::b19:bad:53/128 │ │ │
│ └──────────────────────────┘ │ │
│ ┌──────────────────────────┐ │ │
│ │ Prefix │ <────────┘
│ │ 203.0.113.53/32 │ │
│ └──────────────────────────┘ │
└─────────────────────────────────┘
```

#### Prefixes

Represents a BGP network prefix that can be announced or denounced as part of a [Service]. \
`anycastd` does not come with its own BGP implementation, but rather aims to provide abstractions
that interface with commonly used BGP daemons.

#### Health Checks

Tests the components that make up a [Service] and reports whether they are healthy or not. A [Service] is considered healthy as a whole if all of it's health checks report a
healthy status.

## Configuration

`anycastd` can be configured using a TOML configuration file located at `/etc/anycastd/config.toml`, or a path specified through the `--configuration` parameter.

Expand Down Expand Up @@ -49,6 +103,8 @@ The first service, aptly named "dns", simply configures a DNS resolver service t

The second service, "ntp" is similar in functionality, although it's configuration is a bit more verbose. Rather than omitting values that have a preconfigured default, a [VRF] as well as a health check interval are explicitly specified.

[Anycast]: https://en.wikipedia.org/wiki/Anycast
[Service]: #services
[FRRouting]: https://github.com/FRRouting/frr
[Cabourotte]: https://github.com/appclacks/cabourotte
[VRF]: https://en.wikipedia.org/wiki/Virtual_routing_and_forwarding

0 comments on commit 1a2287e

Please sign in to comment.