1
mirror of https://git.dn42.dev/wiki/wiki.git synced 2025-01-20 14:07:27 +01:00

Updated Anycast Wiki (markdown)

This commit is contained in:
Anonymous 2015-03-30 12:36:23 +02:00
parent 4f67816d7b
commit 6288c6a5c4

View File

@ -3,12 +3,12 @@
The idea is to deploy the mirrors across dn42 using [anycast](https://en.wikipedia.org/wiki/Anycast) addressing (BGP), thus providing redundancy, load-balancing and improved access times for the site.
The local webserver is monitored with a simple shell script (below) working in conjuction with [ExaBGP](https://github.com/Exa-Networks/exabgp), announcing/withdrawing the assigned route if the service is up/down.
### Network:
### Network
* Install wiki anycast address `172.23.0.80/32` on the system
* Setup tunnel(s) to the dn42 network (routing daemon not required)
### Setup gollum:
### Setup gollum
* Install [gollum](https://github.com/gollum/gollum)
* Clone the dn42 wiki repo:
@ -27,7 +27,7 @@ gollum --css <path>/custom.css --gollum-path <path> --host 127.0.0.1 --port 456
gollum --css <path>/custom.css --gollum-path <path> --host 127.0.0.1 --port 4567 --no-edit
```
### Nginx proxy:
### Nginx proxy
##### /etc/nginx/sites-enabled/wiki.dn42:
@ -79,7 +79,7 @@ server {
```
### [ExaBGP](https://github.com/Exa-Networks/exabgp):
### [ExaBGP](https://github.com/Exa-Networks/exabgp)
##### exabgp.conf:
@ -179,7 +179,7 @@ exit 0
Normally SIGUSR1 to the exabgp process triggers a configuration update, but at occasion the process might need to be restarted - since its gracefull shutdown can be glitchy , this might be a bit difficult. Sending SIGKILL to the child(ren) and immediately after, the parent, does the job (quick-and-dirty).
##### /etc/exabgp/run.sh
##### /etc/exabgp/run.sh:
`USAGE: /etc/exabgp/run.sh [start|stop|restart]`
```
@ -233,7 +233,7 @@ exit 0
```
### Announcing:
### Announcing
The prefix AS-PATH should show the announcement is originating from your AS. After peering ExaBGP to the nearest speaker(s), check if the prefix is routing properly inside your network. Try not to blackhole the passing traffic (e.g. no static routes to `172.23.0.80/28`). Test the whole thing by shutting down nginx/gollum and watch what happens.