use dnscache resolver for resolving command line endpoints (#14135)

this helps in caching the resolved values early on, avoids
causing further resolution for individual nodes when
object layer comes online.

this can speed up our startup time during, upgrades etc by
an order of magnitude.

additional changes in connectLoadInitFormats() and parallelize
all calls that might be potentially blocking.
This commit is contained in:
Harshavardhana authored and GitHub committed 2022-01-20 13:03:15 -08:00
1 parent e1a0a1e73c
commit 7f214a0e46
8 files changed
+80 -41

No files matched your search

+1 -1
View File
@@ -678,7 +678,7 @@ func handleCommonEnvVars() {
for _, endpoint := range minioEndpoints {
if net.ParseIP(endpoint) == nil {
// Checking if the IP is a DNS entry.
addrs, err := net.LookupHost(endpoint)
addrs, err := globalDNSCache.LookupHost(GlobalContext, endpoint)
if err != nil {
logger.FatalIf(err, "Unable to initialize MinIO server with [%s] invalid entry found in MINIO_PUBLIC_IPS", endpoint)
}