Things you didn't know about C, #7212:
There is no sane way to get sscanf to tell you how many characters
were consumed, if you want to allow a variable number of arguments.
The special format %n is patently useless for this, because you
have to insert it at every conceiveable point in the string and
that presumes full explicit whitespace markup.
Parse -w argument "by hand", to catch illegal input like "1,INF,15"
Tripped over by: Stein Ove Rosseland <steinove@vg.no>
Fixes: ticket #82
git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1259 d4fa192b-c00b-0410-8231-f00ffab90ce4

The getaddrinfo(3) API does not tell us the TTL value learned from DNS
so we have to add our own stuff for that.
Without some kind of TTL, we would hit the DNS server once per failed
attempt to connect to the backend.
If the backend were down, we could hit it a LOT.
In the VCL code:
backend foobar {
[...]
set backend.dnsttl = 20s;
}
will assign a TTL for DNS lookups of this backends hostname+port
combination, we will not hit the DNS server more often that this.
The default is set at 30 seconds, short enough to make things are
workable in a load-balancing-via-DNS setups, yet long enough to not
pound the DNS server flat in case of backend failures.
NOTE that as long as we succeed in connecting to the backend we
do not perform new DNS lookups. That will have to be revisited
along with possible load-balancing schemes for the backend(s).
git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1257 d4fa192b-c00b-0410-8231-f00ffab90ce4

There is no sane way to get sscanf to tell you how many characters
were consumed, if you want to allow a variable number of arguments.
The special format %n is patently useless for this, because you
have to insert it at every conceiveable point in the string and
that presumes full explicit whitespace markup.
Parse -w argument "by hand", to catch illegal input like "1,INF,15"
Tripped over by: Stein Ove Rosseland <steinove@vg.no>
Fixes: ticket #82
git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1239 d4fa192b-c00b-0410-8231-f00ffab90ce4

so we have to add our own stuff for that.
Without some kind of TTL, we would hit the DNS server once per failed
attempt to connect to the backend.
If the backend were down, we could hit it a LOT.
In the VCL code:
backend foobar {
[...]
set backend.dnsttl = 20s;
}
will assign a TTL for DNS lookups of this backends hostname+port
combination, we will not hit the DNS server more often that this.
The default is set at 30 seconds, short enough to make things are
workable in a load-balancing-via-DNS setups, yet long enough to not
pound the DNS server flat in case of backend failures.
NOTE that as long as we succeed in connecting to the backend we
do not perform new DNS lookups. That will have to be revisited
along with possible load-balancing schemes for the backend(s).
git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1237 d4fa192b-c00b-0410-8231-f00ffab90ce4