Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #18564

Closed (moved)
(moved)
Open
Created Mar 16, 2016 by David Goulet@dgoulet🆘

Improve our client HS descriptor fetch logic

(This was discovered because of #15937 (moved))

Considering a client that does 6 connections attempt to a .onion very fast, currently we'll do 6 fetches of the descriptor thus on all 6 HSDirs. Furthermore, once the descriptor arrives on the client, we do NOT terminate the 5 other requests...

I think we should do the following:

  • Have parallel descriptor fetches because multiple requests improve our chances of getting the descriptor faster (maybe). I'm proposing that we use one third of the HSDirs set that is 2 HSDirs (one per replica) over our 6 in total. (I'm open also to half of the hsdirs, just that one third makes it easy to query replicas in a symmetric way.)

If they all fail, query an other sset or if only one fails, relaunch one immediately (so we avoid one HSDir stalling everything) so we always have one third of our set being queried.

  • Once the descriptor arrives, terminate the other pending HSDir fetch connections.

  • When a .onion request arrives on the SocksPort, check if we have pending descriptor fetch(es) and if yes, we should wait! don't launch more! If it's lower than our threshold (in this example 2/6), launch new fetches until we reach that limit and wait.

This should also cover the HSFETCH control command with a .onion address which doesn't require to have a SERVER= set.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking