GlobalDnsMaxFailureCount Property
Gets or sets the maximum number of seriated failures of the DNS server required in order to consider the DNS server down.

Namespace: MailBee
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
public static int DnsMaxFailureCount { get; set; }

Property Value

Type: Int32
The number of seriated failures of the DNS server which needs to be achieved in order to consider this server down. The default value is 3.
MailBeeInvalidArgumentExceptionvalue 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.

See Also