Skip to content

PS/SD: Change lookup strategy #2454

@lukedirtwalker

Description

@lukedirtwalker

When trying to limit the amount of segments a PS returns (#2452 ) we came to the conclusion that in the current state the PS basically needs to do pathcombination. We feel that the PS should not contain that logic.

Instead the PS should only ever return one type of segment (up, core, or down).
Sciond will still query the local PS, but it might need to do so multiple times depending on the destination.
With this the amount of returned queries can be regulated very easily in the PS, also it will be possible to create more paths in sciond because we can have max segments (or even more see example) for each type of segment instead of only max segments for the whole path.

Lookup example non-core A to remote non-core B:

  1. sciond queries the local PS with dst B
  2. PS returns down segments C -> B and D-> B
  3. sciond queries the local PS for core segments to C
  4. PS returns core seg C -> E
  5. sciond queries the local PS for core segments to D
  6. PS returns core seg D -> F
  7. sciond has up segments to E cached so no need to query the PS
  8. sciond queries the local PS for up segments to F
  9. sciond combines all the segments and returns the resulting paths.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions