1. 11 Jul, 2008 6 commits
    • Poul-Henning Kamp's avatar
      Copy mgt_event.[ch] from varnishd into libvarnish and give it the · 192b30b2
      Poul-Henning Kamp authored
      prefix "VEV".
      
      This is a general purpose eventmanager and as such should live in
      the library where other programs can get at it.
      
      
      
      git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2939 d4fa192b-c00b-0410-8231-f00ffab90ce4
      192b30b2
    • Poul-Henning Kamp's avatar
      · 9fc3cef6
      Poul-Henning Kamp authored
      Add a backend property ".host_header" to set default content of Host:
      header if client didn't provide one.
      
      If .host_header is not specified, it defaults to .host.
      
      Add testcase for this logic.
      
      (Incidental change: Use "interval" instead of "rate" for backend pollers.)
      
      
      
      
      
      git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2938 d4fa192b-c00b-0410-8231-f00ffab90ce4
      9fc3cef6
    • Poul-Henning Kamp's avatar
      Add scaffold code for backend polling. · 651f670d
      Poul-Henning Kamp authored
      It doesn't actually do anything yet.
      
      
      
      git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2937 d4fa192b-c00b-0410-8231-f00ffab90ce4
      651f670d
    • Poul-Henning Kamp's avatar
      Drop pseudo-automatic support for multihomed backends and require · c605e61a
      Poul-Henning Kamp authored
      clear expression of intent in VCL.
      
      We now fail backend hostnames that resolve to multiple IPv4 or multiple
      IPv6 addresses, in other words, you cannot use "cnn.com" as a backend
      hostname specification without the compiler yelling at you:
      
          % ./varnishd -d -d -b cnn.com -a :8080
          Backend host "cnn.com": resolves to multiple IPv4 addresses.
          Only one address is allowed.
          Please specify which exact address you want to use, we found these:
      	    64.236.16.20
      	    64.236.16.52
      	    64.236.24.12
      	    64.236.29.120
          [...]
          VCL compilation failed
      
      However, you _can_ use a hostname that resolves to both an IPv4 and
      an IPv6 address, and the new paramter "prefer_ipv6" will determine
      which one we try first in such cases.
      
      The other part of this change is that we now do the DNS lookup at
      VCL compiletime, and only then.
      
      If your backend's DNS record (or /etc/hosts entry) changes IP#, you
      must reload your VCL code to notify varnish.
      
      Finer technical points:
      
      We build a bytestring representation of the sockaddr's in VCC and
      include them in the concept of backend identity, for an existing
      backend (+ connections) to be reused for a new VCL the backend must
      now be defined exactly the same way AND have the same resolved
      IPv4/IPv6 addresses.
      
      Since we never muck about with the address in the backend struct
      anymore, it's static for the life of the struct backend instance,
      we can simplify and eliminate the locking dance around our connection
      attempts.
      
      Also eliminate the struct vrt_backend inclusion in struct backend,
      and instead make the relevat fields full-blown members of struct
      backend.  This eliminates a number of TRUST_ME() calls.
      
      This is the companion commit to #2934 which prepared the VCL compiler.
      
      
      git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2936 d4fa192b-c00b-0410-8231-f00ffab90ce4
      c605e61a
    • Poul-Henning Kamp's avatar
      Emit backend probe data to ->fb. · 1c7ccfe8
      Poul-Henning Kamp authored
      
      
      git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2935 d4fa192b-c00b-0410-8231-f00ffab90ce4
      1c7ccfe8
    • Poul-Henning Kamp's avatar
      Reject backend hostnames that resolve to multiple IPv4 or multiple · f1e1521c
      Poul-Henning Kamp authored
      IPv6 addresses, but accept one of each.
      
      Emit a bytestring representation of the sockaddr we found for each
      of these, into the shared object, so we avoid doing a DNS lookup
      again in the cacher.
      
      
      
      git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2934 d4fa192b-c00b-0410-8231-f00ffab90ce4
      f1e1521c
  2. 10 Jul, 2008 24 commits
  3. 09 Jul, 2008 3 commits
  4. 08 Jul, 2008 7 commits