From owner-freebsd-net@FreeBSD.ORG Mon Oct 1 21:10:43 2012 Return-Path: Delivered-To: net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 212BB106566C; Mon, 1 Oct 2012 21:10:43 +0000 (UTC) (envelope-from anders@FreeBSD.org) Received: from fupp.net (totem.fix.no [80.91.36.20]) by mx1.freebsd.org (Postfix) with ESMTP id CD37A8FC16; Mon, 1 Oct 2012 21:10:41 +0000 (UTC) Received: from totem.fix.no (totem.fix.no [80.91.36.20]) by fupp.net (Postfix) with ESMTP id C32F35925A; Mon, 1 Oct 2012 23:04:07 +0200 (CEST) Received: from fupp.net ([80.91.36.20]) by totem.fix.no (totem.fix.no [80.91.36.20]) (amavisd-new, port 10024) with LMTP id iDYnmzlfvWDX; Mon, 1 Oct 2012 23:04:07 +0200 (CEST) Received: by fupp.net (Postfix, from userid 1000) id 86BEA59259; Mon, 1 Oct 2012 23:04:07 +0200 (CEST) Date: Mon, 1 Oct 2012 23:04:07 +0200 From: Anders Nordby To: "Mikhail T." Message-ID: <20121001210407.GA10881@fupp.net> References: <5069C3B3.9050500@aldan.algebra.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5069C3B3.9050500@aldan.algebra.com> X-PGP-Key: http://anders.fix.no/pgp/ X-PGP-Key-FingerPrint: 1E0F C53C D8DF 6A8F EAAD 19C5 D12A BC9F 0083 5956 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: apache@FreeBSD.org, net@FreeBSD.org Subject: Re: Is it worth the effort to make proxy and server communicate via Unix socket? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 21:10:43 -0000 Hi, On man, okt 01, 2012 at 12:24:19pm -0400, Mikhail T. wrote: > In a fairly common setup today, a proxy (say, Varnish) runs on the same > system as the actual "backend" server (such as Apache). > > Would it be worthwhile to alter them both to allow them to talk via a > socket instead of via TCP (on the lo0 interface)? > > Or is the win just too negligible? Thanks! I don't see the point. Varnish usually runs on separate servers. On a small scale setup, the likely improvements would be negligible. The Varnish developers also do not want Varnish to become a web server, it's just not it's job. Your time is better spent improving your cache hit ratio (% of requests cached) as well as integrating purging with your content management systems when caching dynamic pages. If you are serving flat files only you may want to consider just using lighttpd or nginx, which are known to be fast. Regards, -- Anders.