Locking hosts due to wait states
|Category:||Controlling||Estimated time:||4.00 hours|
|Target version:||040 - FarfarAway|
When a link is in a wait state because of a host generated situation, other links to the host should not even try to connect. This has been fixed for Rapidshare, but the fix appears to be Rapidshare specific.
There are two kinds of waits generated by the host.
a) The waits that are a normal part of connection for free users. These are not related to this issue.
b) When a wait is due to an unavailable or overloaded host, only one link should contact it.
These include "Cannot connect to host", "host refused the connection", "no slots available for your class or user", "no slots available for that file", 50X errors, and waiting for a new IP are the waits that should be limited to one link.
If there are 120 links for host X.com and X.com is overloaded (503), a 2 minute wait could be more like a 1 second wait if all of the links can try to connect. JD has to become more respectful of the hosts over the long run, or users will start getting sued for using it.
This will also save overhead for JD.
The time estimate is based on changing the code that selects the next link to check a list of flags, one per host. Most of the estimated time is for testing.