Return-Path: X-Original-To: apmail-trafficserver-users-archive@www.apache.org Delivered-To: apmail-trafficserver-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3EBB717962 for ; Fri, 27 Feb 2015 17:02:14 +0000 (UTC) Received: (qmail 12251 invoked by uid 500); 27 Feb 2015 17:02:14 -0000 Delivered-To: apmail-trafficserver-users-archive@trafficserver.apache.org Received: (qmail 12196 invoked by uid 500); 27 Feb 2015 17:02:14 -0000 Mailing-List: contact users-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@trafficserver.apache.org Delivered-To: mailing list users@trafficserver.apache.org Received: (qmail 12186 invoked by uid 99); 27 Feb 2015 17:02:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Feb 2015 17:02:13 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jdavidlists@gmail.com designates 209.85.223.177 as permitted sender) Received: from [209.85.223.177] (HELO mail-ie0-f177.google.com) (209.85.223.177) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Feb 2015 17:01:48 +0000 Received: by iecar1 with SMTP id ar1so32475884iec.0 for ; Fri, 27 Feb 2015 09:01:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=fKROonbiBmKkjs8fCx9JyulyZsHSZzNpv29y/TOv6rg=; b=YpNx6GU2j4XwAo8yDWXMc3Qa23u6rBYEglgqQXwjzqz7N4mM+whm5LkjVpctZpdI9m d5TqcDQIl/lBcumUJPjZYHWh61yDU1WH7jVlUM0g1DPlybCR8INBpCc4SLTlp/a+UaBk 1Lsen3MK+Cb2p0QtzCErzSFUvxTMFxLXiW2AUm5n6L7SZsWyGmrEG5c6BsTWwdsoGaGF RFKbvLBFYFTvXXIPtyPNExaX7OpmObl0WJV+gbqDujuc/3e0IUhOtYIYJ7FYU5KrMBmf aarDraRmvPyQRUBIdfYZZFmtJXEDJszBf3ftI8Dp2xaE7p/yP3MDXvSGH5tCEtOEN3BT LLgA== MIME-Version: 1.0 X-Received: by 10.42.236.138 with SMTP id kk10mr16850696icb.60.1425056461403; Fri, 27 Feb 2015 09:01:01 -0800 (PST) Sender: jdavidlists@gmail.com Received: by 10.36.84.6 with HTTP; Fri, 27 Feb 2015 09:01:01 -0800 (PST) In-Reply-To: References: <3D01BE33-22BE-46EF-A070-701B5920A08A@apache.org> <4461ADD8-10CA-48DE-AC25-A443AD2B854A@apache.org> Date: Fri, 27 Feb 2015 12:01:01 -0500 X-Google-Sender-Auth: AJpZZXqlBS1OWvaYly8LSfCm0Pk Message-ID: Subject: Re: Migrating from squid From: J David To: users@trafficserver.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Feb 27, 2015 at 10:50 AM, Leif Hedstrom wrote: > Dealing with external squid helpers is a bit wonky, but you probably coul= d implement something in a plugin that does it. The fact that you are doing= so much weirdness (MySql, Memcached) makes it particularly tough, I=E2=80= =99m not sure how Squid deals with that? Squid prestarts a (configurable, large) number of external rewriters sufficient to handle the #requests * delay product. On Fri, Feb 27, 2015 at 11:10 AM, Faysal Banna wrote: > I have been doing this using nothing but lua injecting/retrieving data f= rom > mysql, mongodb , sqlite ... Can the lua approach hold resources open between requests, preferably in some kind of managed resource pool, like the APR offers in Apache? Forking a process from lua for every incoming request will lead to a *tremendous* amount of context-switching overhead at high request rates. And that's assuming that we pare the process being exec'd down to some sort of thin client, as the current rewriter takes several seconds to spin up and assimilate initial data. And that kind of split is definitely reasonable & doable. This *might* work if we can get all the info about the request at the Lua level and dispatch all the various types of responses (backend selection for existing URL, 301+new URL, 4XX/5XX error) from there. But to get really good performance, the best approach would probably be to maintain a persistent pool of open sockets to the external logic. Is that possible? Thanks!