Round Robin Question
Kevin Darcy
kcd at daimlerchrysler.com
Wed Aug 29 18:44:33 UTC 2001
chicagozer at hotmail.com wrote:
> Hi all,
>
> Sorry for such a simple question, but I am curious about whether DNS
> round robin would be an adequate solution for a problem I am trying to
> solve.
>
> We have a single client (a java program on a separate box) accessing
> our web-server and we want to implement a quick and dirty load-sharing
> scheme. Can I use DNS round-robin to make the client ping-pong between
> multiple web servers?
Yes, subject to the caveats below.
> What I don't fully understand is whether a single client will ever
> re-resolve the webserver address from DNS. Is there a way to control
> this with TTL?
A regular ("stub resolver") client will query DNS every time it wants to
make a connection. More sophisticated clients will implement caching, and
if they are that sophisticated, they *should* round-robin within
themselves. If you have a client which caches but does not round-robin
(like Sun's stupid "nscd"), then the best way to try to deal with that,
as you surmised, is to shorten the TTL, but that is inefficient and
anti-social (if you do it on the Internet), and might not even work
because a client that stupid may not respect TTL either (again, "nscd",
grrrr...).
If your client is *really* sophisticated (or you can actually make it
so), then it could use SRV records, which specify preferences and
weights, and can even direct the client to non-standard port numbers,
which could be quite useful for testing or piloting situations.
- Kevin
More information about the bind-users
mailing list