Gossip client keep statistics on how successful a relay has been, and has fairly aggressive timeouts for poor performing relays.
Also, for choosing outbox relays I go through a fairly long process to find appropriate relays and then I hardcode them in the next release. This goes like this:
1. Print out the relays from my gossip client sorted by rank (best performing first)
2. Skip if we never connected to it
3. Skip if the URL has a path beyond the hostname
4. Skip if the relay does not have a nip-11
5. Skip if the pubkey in the nip11 is invalid (or a prefix)
6. Skip of nip-11 indicates limitation.restricted_writes
7. Skip if nip-11 indicates fees
8. Remove relays known to be special-purpose
9. Score according to a custom algorithm that uses statistics from gossip client (number of attempts, last connected, success rate, etc).
10. test with a random keypair to see if it accepts a note and I can read it back.
Fewer and fewer relays pass this gauntlet because of spam filtering measures.
