ServicePointManager.EnableDnsRoundRobin プロパティ

定義

ドメイン ネーム サービス (DNS) 解決で、適用可能なインターネット プロトコル (IP) アドレスが順番に使用されるかどうかを示す値を取得または設定します。

public:
 static property bool EnableDnsRoundRobin { bool get(); void set(bool value); };
public static bool EnableDnsRoundRobin { get; set; }
static member EnableDnsRoundRobin : bool with get, set
Public Shared Property EnableDnsRoundRobin As Boolean

プロパティ値

DNS 解決によって常に特定のホストの最初の IP アドレスが返される場合は false。それ以外の場合は true。 既定値は、false です。

次のコード例では、このプロパティを設定します。

ServicePointManager::UseNagleAlgorithm = true;
ServicePointManager::Expect100Continue = true;
ServicePointManager::CheckCertificateRevocationList = true;
ServicePointManager::DefaultConnectionLimit =
    ServicePointManager::DefaultPersistentConnectionLimit;
ServicePointManager::EnableDnsRoundRobin = true;
ServicePointManager::DnsRefreshTimeout = 4*60*1000; // 4 minutes
ServicePointManager.UseNagleAlgorithm = true;
ServicePointManager.Expect100Continue = true;
ServicePointManager.CheckCertificateRevocationList = true;
ServicePointManager.DefaultConnectionLimit = ServicePointManager.DefaultPersistentConnectionLimit;
ServicePointManager.EnableDnsRoundRobin = true;
ServicePointManager.DnsRefreshTimeout = 4*60*1000; // 4 minutes
ServicePointManager.UseNagleAlgorithm = True
ServicePointManager.Expect100Continue = True
ServicePointManager.CheckCertificateRevocationList = True
ServicePointManager.DefaultConnectionLimit = _
    ServicePointManager.DefaultPersistentConnectionLimit
ServicePointManager.EnableDnsRoundRobin = True
ServicePointManager.DnsRefreshTimeout = 4*60*1000

注釈

ホスト名に複数の IP アドレスが関連付けられている場合、通常、DNS 解決は最初の IP アドレスのみを返します。 このプロパティを に true設定すると、後続の DNS 解決によって、特定のホストで使用可能なすべての IP アドレスが循環します。 このオプションは、サービスがサーバーまたはサーバー クラスター間の負荷分散メカニズムとして DNS を使用する場合に便利です。

適用対象

こちらもご覧ください