Class DnsResolverGroupBuilder

java.lang.Object
com.linecorp.armeria.client.DnsResolverGroupBuilder

public final class DnsResolverGroupBuilder
extends Object
Builds an AddressResolverGroup which builds AddressResolvers that update DNS caches automatically. Standard DnsNameResolver will only expire a cache entry after TTL, meaning DNS queries after TTL will always take time to resolve. A refreshing AddressResolver on the other hand updates the DNS cache automatically when TTL elapses, meaning DNS queries after TTL will retrieve a refreshed result right away. If refreshing fails, the AddressResolver will retry with refreshBackoff(Backoff).

The refreshing AddressResolver will only start auto refresh for a given hostname on the second access before TTL to avoid auto-refreshing for queries that only happen once (e.g., requests during server startup).