Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPKI json delta import support #796

Open
vidister opened this issue Jun 1, 2023 · 1 comment
Open

RPKI json delta import support #796

vidister opened this issue Jun 1, 2023 · 1 comment

Comments

@vidister
Copy link
Contributor

vidister commented Jun 1, 2023

irrd causes a large amount of disk churn.
For IRR imports this can be mitigated by using NRTM to insert deltas instead of performing a full re-import every time.

Right now nothing similar exists for the RPKI importer. It looks like by default all >400k rows are re-imported every 3600s.

Routinator3000 supports the json-delta endpoint that allows to request a delta of the ROA changes since the last request using the session and serial identifier.
Is it possible to implement support for the json-delta endpoint in irrd?

Appendix:
Example json-delta output

# curl "http://127.0.0.1:8323/json-delta?session=1683714697&serial=2698"
{
  "reset": false,
  "session": "1683714697",
  "serial": 2699,
  "fromSerial": 2698,
  "announced": [
    {
        "type": "routeOrigin",
        "asn": "AS210058",
        "prefix": "45.91.192.0/24",
        "maxLength": 24
    },
    {
        "type": "routeOrigin",
        "asn": "AS0",
        "prefix": "138.185.229.0/24",
        "maxLength": 24
    },
    {
        "type": "routeOrigin",
        "asn": "AS134932",
        "prefix": "2400:7e60::/32",
        "maxLength": 32
    }
  ],
  "withdrawn": [
    {
        "type": "routeOrigin",
        "asn": "AS47065",
        "prefix": "138.185.229.0/24",
        "maxLength": 24
    }
  ]
}
@mxsasha
Copy link
Collaborator

mxsasha commented Jun 5, 2023

Yes, we currently delete the entire ROA table and RPKI source, which is a bit harsh. From experimenting at the time, it seemed cheaper than finding the differences first. The bulk insertion is guaranteed to have no conflicts, so it uses COPY for extra speed.

This endpoint is really interesting though! It would be limited to people who run Routinator or trust an external instance. But since Routinator will track state, it will be cheap from the IRRD side. Not trivial to implement though, the code is currently built entirely for bulk delete/insert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants