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

Route order preference #718

Merged
merged 2 commits into from
Feb 17, 2023
Merged

Route order preference #718

merged 2 commits into from
Feb 17, 2023

Conversation

mxsasha
Copy link
Collaborator

@mxsasha mxsasha commented Jan 2, 2023

Adds a new route order preference option, which can suppress route objects if an overlapping higher priority route object exists. Also restructures the docs a bit around this feature.

Docs: https://irrd.readthedocs.io/en/ropref/admins/object-suppression/ and https://irrd.readthedocs.io/en/ropref/admins/route-object-preference/

Some performance indication

Time taken is proportional to the number of objects that change state.

Numbers from my (Celeron J4115, 32GB, scavenged SATA SSD) testing box:

  • Moving from disabled to ALTDB at 50, RADB at 100, others at 900 (typically only done once):
    • 1.099.850 moved to suppressed
    • 7 minutes to scan objects, decide new states, enrich object to be changed
    • 3 hours to generate journal entries for newly suppressed objects
    • 1h28m to update the state of the now suppressed objects
    • 12s to commit the transaction
  • Then, changing ALTDB to 150:
    • 9.800 objects moved to visible, 20.000 objects moved to suppressed
    • 2m15s for scan, deciding on new state, enriching, and adding journal entries
    • 33s for updating state
    • 2s to commit the transaction
  • Periodic full update when there are no state changes: about 2 minutes for scanning and deciding new state.
  • Partial update after e.g. processing an NRTM update: several seconds or shorter.

However, it's questionable whether it makes sense to even enable the journal on these large state changes. NRTMv3 will not scale to catching up with 1 million objects. Therefore, while it may be possible to speed up the journal insert time, it is not particularly useful.

Todo

  • Enable by default on query side
  • Support single validator queries
  • Fix conflict with Increase journal insertion speed #731 (minor)
  • Schedule periodically
  • Run validator after database changes
  • Make sure this behaves correctly when disabled
  • Ensure multi-preference overlaps work as intended
  • Overlaps with RPKI invalid routes?
  • Code TODOs
  • Docstrings
  • Document log messagee
  • Is the trigger specific to route objects or perhaps also picking up inet6num?
  • Don't trigger a status check for objects where we just changed the route preference
  • Is this in database status call? !J? Status page?
  • Is query doc up to date with new !f ?
  • Import timer?
  • Fix up the pyradix dependency
  • Do some real data testing
  • Validate new setting
  • Documentation
  • Review naming
  • Refactor/review
  • Remove obsolete method

irrd/storage/database_handler.py Outdated Show resolved Hide resolved
irrd/storage/database_handler.py Outdated Show resolved Hide resolved
irrd/storage/database_handler.py Show resolved Hide resolved
irrd/storage/database_handler.py Outdated Show resolved Hide resolved
irrd/routepref/routepref.py Outdated Show resolved Hide resolved
docs/admins/route-object-preference.rst Outdated Show resolved Hide resolved
docs/admins/route-object-preference.rst Outdated Show resolved Hide resolved
docs/admins/route-object-preference.rst Outdated Show resolved Hide resolved
docs/admins/route-object-preference.rst Outdated Show resolved Hide resolved
docs/admins/route-object-preference.rst Show resolved Hide resolved
@mxsasha mxsasha force-pushed the ropref branch 4 times, most recently from 8f2d150 to f1ff0ef Compare January 31, 2023 14:00
@mxsasha mxsasha marked this pull request as ready for review January 31, 2023 14:04
@mxsasha mxsasha changed the title [WIP] Route order preference Route order preference Feb 1, 2023
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

Successfully merging this pull request may close these issues.

1 participant