ServicePointManager.EnableDnsRoundRobin Vlastnost

Definice

Získá nebo nastaví hodnotu, která označuje, zda dns (Domain Name Service) rozlišení obměňuje mezi příslušné IP adresy (Internet Protocol).

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

Hodnota vlastnosti

false pokud překlad DNS vždy vrátí první IP adresu konkrétního hostitele; jinak true. Výchozí formát je false.

Příklady

Následující příklad kódu nastaví tuto vlastnost.

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

Poznámky

Pokud je k názvu hostitele přidruženo více IP adres, překlad DNS obvykle vrátí pouze první IP adresu. Pokud nastavíte tuto vlastnost na truehodnotu , následné překlady DNS budou cyklicky procházet všechny dostupné IP adresy pro konkrétního hostitele. Tato možnost je užitečná, když služba používá DNS jako mechanismus vyrovnávání zatížení mezi servery nebo serverovými clustery.

Platí pro

Viz také