Modify dirauth stats for fallback directories
Currently, the directory authorities estimate client numbers using the number of client requests they receive.
When we introduce fallback directories (likely in 0.2.8, see #17158 (moved)), the directory authorities will receive fewer client queries, because clients will choose from the combined set of fallback directories and directory authorities when downloading their initial consensus.
There is a tradeoff here: moving load to the fallback directories, decreases the accuracy of client stats, but reduces the load on the authorities. I think we could reduce the load on the authorities to 1% of the current load, and still get accurate statistics.
We can still estimate client numbers by multiplying the remaining load on the authorities by the proportion of traffic we'd expect the authorities to see from a particular Tor version.
So, for example:
- Tor 0.2.7 and below: 1x
- Tor 0.2.8: 100x
- (Assuming that 1% of initial client directory requests go to the authorities)
This would require us to know the weights used by clients to select fallback directories and authorities, implementing #17907 (moved) would make this much easier.
For really accurate statistics, we'd also want to know:
- how many clients only fetch from authorities (FetchDirInfoEarly 1, UseFallbackDirs 0)
- how many relays fetch from authorities (DirPort or dir_server_mode() with #12538 (moved), Exits, OR relays that don't know their address)
- how many relays fetch from fallbacks (bridges, OR-only relays, hibernating relays) But this might not be possible - can we tell relays from clients at the moment?