]> err.no Git - varnish/commit
Rework the "connect to backend logic".
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 10 Jul 2006 12:00:20 +0000 (12:00 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 10 Jul 2006 12:00:20 +0000 (12:00 +0000)
commit7e8d83532c0df9247782d7b9a3db7546263b0c19
treef69f5bd839ee41208ee19b7f5836189cfeb518f8
parent5028f70346c298f8285629d1794d9cf4c3aa0a80
Rework the "connect to backend logic".

Avoid calling getaddrinfo() for every connect by catching the result
in the backend structure.

Minimize number of socket/connect calls by caching the last good
address in the backend structure.

If all addresses in the cached getaddrinfo() result fails, call
getaddrinfo() again (to catch DNS changes) and try the list again.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@405 d4fa192b-c00b-0410-8231-f00ffab90ce4
varnish-cache/bin/varnishd/cache.h
varnish-cache/bin/varnishd/cache_backend.c