NLnetLabs / krill-sync

A tool to synchronize an RRDP and/or Rsync server with a "hidden" remote RFC 8182 RRDP publication point.
https://nlnetlabs.nl/rpki/
BSD 3-Clause "New" or "Revised" License
16 stars 7 forks source link

daemon mode and metrics #8

Closed ties closed 11 months ago

ties commented 3 years ago

As a repository operator I want krill-sync to run as a daemon with prometheus metrics.

At the moment krill-sync is a one-shot process that keeps state on disk. In order to know that it runs successfully it would be helpful if it has prometheus metrics. This can be done externally in a supervisor process, optionally with screen-scraping, or internally in krill-sync.

One advantage of a daemon mode is that state can be kept in memory - saving 10-15s per update for large repositories.

ties commented 3 years ago

After running it locally, I'm not sure the speed increase of in memory state is worth it. I would probably have to test it on a slower system. On my development system, even a large repository is fast:

$ docker run -v `pwd`/data:/data --rm -e RRDP_URL="https://rrdp.ripe.net/notification.xml" krill-sync
2021/04/22 09:13:50 INFO: Downloading RRDP notification file (if supported will not re-download if not modified)
2021/04/22 09:13:50 INFO: Parsing RRDP notification file
2021/04/22 09:13:50 INFO: Remote RRDP notification serial is 1078
2021/04/22 09:13:50 INFO: Downloading RRDP snapshot file https://rrdp.ripe.net/66221b75-cf14-4693-99e4-96ce9717c874/1078/snapshot.xml
2021/04/22 09:13:52 INFO: Updating Rsync repository
2021/04/22 09:13:54 INFO: Performing atomic update of the Rsync repository
2021/04/22 09:13:54 INFO: Writing RRDP snapshot file
2021/04/22 09:13:54 INFO: Checking for missing RRDP delta files
2021/04/22 09:13:54 INFO: Downloading 159 files
2021/04/22 09:13:55 INFO: Downloading 16 files concurrently: 74 remaining, 0 retried, 0 failed
2021/04/22 09:13:56 INFO: Performing atomic update of RRDP notification file
timbru commented 11 months ago

Closing this for now. If this is still needed then feel free to re-open the issue or create a new issue.