<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000066">
<font size="-1"><font face="Helvetica, Arial, sans-serif">Thanks for
all the information.&nbsp; I'll try looking into pen.&nbsp; I'm looking for a
redirection solution since I already have a solution that pushes
everything through the controller and we've run into bandwidth issues
for larger web pages.&nbsp; <br>
<br>
Thanks again,<br>
Melissa<br>
</font></font><br>
AJ Weber wrote:
<blockquote cite="mid:000301ca414e$41bd9b00$9c01a8c0@webtekllc.com"
 type="cite">Yeah, you're probably better installing something like pen
or another readily-available load-balancer.&nbsp; Some of them are very
lightweight, but would require you to send all traffic back to your
controller (set server.test.local as an alias of
controller.test.local), and then the load-balancer would redirect to
the individual servers that are available.
  <br>
  <br>
It would also solve the problem you might run into if one of the
embedded servers is down, dnsmasq (or any pure DNS round-robin
implementation) will still reply to every 3rd client's request with the
down server's address. And as Simon says (no pun intended), that
client's browser or OS may cache the resolution and not try any of the
other servers...they'll just think the website is completely down.
  <br>
  <br>
Not a lot of work to change-around and should be much more robust.
  <br>
  <br>
I love dnsmasq, and have used it on various platforms for a long time,
but you should look to a different solution for this kind of
load-balancing.
  <br>
  <br>
-AJ
  <br>
  <br>
  <br>
----- Original Message ----- From: "Simon Kelley"
<a class="moz-txt-link-rfc2396E" href="mailto:simon@thekelleys.org.uk">&lt;simon@thekelleys.org.uk&gt;</a>
  <br>
To: "Melissa Lim" <a class="moz-txt-link-rfc2396E" href="mailto:mlim@bbn.com">&lt;mlim@bbn.com&gt;</a>
  <br>
Cc: <a class="moz-txt-link-rfc2396E" href="mailto:dnsmasq-discuss@lists.thekelleys.org.uk">&lt;dnsmasq-discuss@lists.thekelleys.org.uk&gt;</a>
  <br>
Sent: Tuesday, September 29, 2009 4:17 PM
  <br>
Subject: Re: [Dnsmasq-discuss] load balancing using round robin dns
  <br>
  <br>
  <br>
  <blockquote type="cite">Melissa Lim wrote:
    <br>
    <blockquote type="cite">Hello:
      <br>
      <br>
I'm trying to get Round Robin DNS with dnsmasq working on my embedded
system.
      <br>
But it's not quite working.&nbsp; I have 4 boards (1 controller and 3 web
servers) in
      <br>
my system each with a static IP address.&nbsp; I have dnsmasq running on the
      <br>
controller board and lighttpd (web server) running on the 3 web server
boards.
      <br>
      <br>
In my /etc/hosts file I have:
      <br>
      <br>
192.1.253.162&nbsp;&nbsp;&nbsp; controller.test.local
      <br>
192.1.253.163&nbsp;&nbsp;&nbsp; server.test.local
      <br>
192.1.253.164&nbsp;&nbsp;&nbsp; server.test.local
      <br>
192.1.253.165&nbsp;&nbsp;&nbsp; server.test.local
      <br>
      <br>
I've added the controller board's IP address to my laptop's DNS
adresses, so
      <br>
when I access server.test.local from my web browser on my laptop, I see
my test
      <br>
web page.
      <br>
      <br>
Each time I access the web page, I'd like for dnsmasq to load balance
the
      <br>
request to the 3 web servers in a round robin fashion.&nbsp; Is this
supported?&nbsp; How
      <br>
do I know which web server is actually being used?&nbsp; Is this information
provided
      <br>
in a certain mode?&nbsp; I'm running in daemon mode and I see the following:
      <br>
      <br>
dnsmasq: query[A] server.test.local from 192.1.255.186
      <br>
dnsmasq: /etc/hosts server.test.local is 192.1.253.165
      <br>
dnsmasq: /etc/hosts server.test.local is 192.1.253.163
      <br>
dnsmasq: /etc/hosts server.test.local is 192.1.253.164
      <br>
    </blockquote>
    <br>
    <br>
That's expected: dnsmasq will supply all three addresses for
    <br>
server.test.local each time it's queried. It implements round-robin by
    <br>
shuffling the order in which the addresses appear in the reply - the
    <br>
resolver library used by the web browser will always take the first
one.
    <br>
    <blockquote type="cite"><br>
This infomation is NOT provided everytime the web page is accessed -
only when
      <br>
it switches web server.&nbsp; Round robin does appear to be working, but not
for
      <br>
every access.&nbsp; How do I set it up so that it occurs for every access?&nbsp;
Is the
      <br>
load balancing feature doing a redirect or is the data always going
through the
      <br>
controller board?
      <br>
    </blockquote>
    <br>
Probably the the name-&gt;address mapping is being cached in the
browser,
    <br>
this is a limitation of DNS based load-balancing.
    <br>
    <br>
    <blockquote type="cite"><br>
Also, is there a way to have load balancing occur when I access the IP
address
      <br>
of the controller?&nbsp; (i.e. have <a class="moz-txt-link-freetext" href="http://192.1.253.162">http://192.1.253.162</a> look like
      <br>
<a class="moz-txt-link-freetext" href="http://server.test.local">http://server.test.local</a> and access the web server boards).&nbsp; Maybe via
the
      <br>
dnsmasq config file???
      <br>
    </blockquote>
    <br>
Dnsmasq can't help you here: it's only doing DNS, and can't influence
    <br>
anything that doesn't do a DNS lookup. There are other ways of doing
    <br>
load-balancing, via fancy switches or reverse-proxies, but I know
    <br>
nothing about them, other than that they exist. There's probably an
    <br>
O'Reilly book that will help......
    <br>
    <br>
Cheers,
    <br>
    <br>
Simon.
    <br>
    <br>
_______________________________________________
    <br>
Dnsmasq-discuss mailing list
    <br>
<a class="moz-txt-link-abbreviated" href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk">Dnsmasq-discuss@lists.thekelleys.org.uk</a>
    <br>
<a class="moz-txt-link-freetext" href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a>
    <br>
    <br>
  </blockquote>
  <br>
  <br>
  <br>
</blockquote>
</body>
</html>