Fixed lag between file-sd and dns-sd#933
Conversation
Signed-off-by: jojohappy <sarahdj0917@gmail.com>
bwplotka
left a comment
There was a problem hiding this comment.
It's bit hacky, but I think I am OK with that. Checked and dnsProvider is goroutine-safe
| } | ||
| fileSDCache.Update(update) | ||
| stores.Update(ctxUpdate) | ||
| dnsProvider.Resolve(ctxUpdate, append(fileSDCache.Addresses(), storeAddrs...)) |
There was a problem hiding this comment.
This is good but what happens if there are no file SD targets configured? We'd still have to wait, no?
There was a problem hiding this comment.
There is another one done every X minutes below (:
There was a problem hiding this comment.
It's not fixing general lag I guess, this PR fixes just the lag of FileSD vs dns.
There was a problem hiding this comment.
Ah sorry, I only gave a quick glance and I haven't noticed that, and I thought we were fixing a different kind of problem.
There was a problem hiding this comment.
It's not fixing general lag I guess, this PR fixes just the lag of FileSD vs dns.
@bwplotka Could you explain what is the general lag?
It's bit hacky
Agree with you. I think it is a simple way to resolve the issue, and I don't find the general lag that you said.
There was a problem hiding this comment.
Sorry, by general lag I meant the time between each DNS refresh (that is configured by flag). It's kind of flag as we don't watch for changes (as for DNS it's impossible), we poll every X seconds.
Signed-off-by: jojohappy sarahdj0917@gmail.com
Changes
fixes: #830
Update the addresses from file SD by using DNS SD resolver when file SD is updated if necessary at once.
PTAL @GiedriusS @R4scal
Verification