Skip to content

Host Scanning

David Vorick requested to merge host-finding into master

Host scanning is now done by a thread pool, instead of all being done at once. The timeout for host response has been reduced from 10 seconds to 5 seconds, to facilitate speed during startup.

There are 25 threads that pull hosts out of channels. At startup, the hosts are added to the channels. Then, over time, hosts are selected randomly (though to the tune of 250-750 at a time) and placed into the channels. This happens every 3.5 hours on average.

If a host fails to respond 25 times in a row, the host is kicked from the database. This is different from before where the host would just get kicked immediately. It does mean that there is some pollution for bad hostnames (which do exist in the database) and that those names will take a few days to get cleared out.

After responding positively, the host can fail to respond up to 50 times in a row before getting kicked.

After failing to respond once, the host is removed from the set of active hosts. This is different from previously, where a host was allowed to not respond up to 10 times before being pulled from the set of active hosts.

Overall, I think this represents significant improvements to our host finding algorithm.

Merge request reports