GlobalDnsMaxFailureCount Property |
Namespace: MailBee
Exception | Condition |
---|---|
MailBeeInvalidArgumentException | value is less than 1. |
When making DNS MX lookup queries, it's normal that the DNS server does not respond in appropriate time frame sometimes. In this case, the query is sent second time. If the second (or n-th, if UdpRetryCount is n) attempt fails too, the DNS server is put aside (set in quarantine) and another DNS server is tried (however, if no more servers available, an error occurs). The amount of time the DNS server spends in quarantine is set by DnsNextAttemptInterval field. Once this time is over, the DNS server is returned back to the working servers set, and can be used again. If the DNS server again did not responded to two (or n) queries one by one, it's set in quarantine again. When the number of settings in quarantine is going to reach DnsMaxFailureCount, the server is considered completely down, and will not be tried any longer (or at least until the application explicitly calls Reset method).
If, however, the DNS server having non-zero number of failures does respond to any query, the failure counter is reset (i.e. only "one by one" failures are counted). Thus, temporary DNS failures are discarded while permanent or long-term downs are recognized correctly.