Return-Path: X-Original-To: apmail-incubator-drill-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-drill-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5F242DF07 for ; Wed, 12 Sep 2012 22:56:17 +0000 (UTC) Received: (qmail 31464 invoked by uid 500); 12 Sep 2012 22:56:17 -0000 Delivered-To: apmail-incubator-drill-dev-archive@incubator.apache.org Received: (qmail 31434 invoked by uid 500); 12 Sep 2012 22:56:17 -0000 Mailing-List: contact drill-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: drill-dev@incubator.apache.org Delivered-To: mailing list drill-dev@incubator.apache.org Delivered-To: moderator for drill-dev@incubator.apache.org Received: (qmail 1706 invoked by uid 99); 12 Sep 2012 22:47:22 -0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of pconstantine@gmail.com designates 74.125.82.175 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=QU6/mzDNNgi6ny4eeDsG/Q4g6gDPs2RA57K/VBYW9m8=; b=KcLvUx8ZGbfga4CvLmfUdWm5toxoN8ORLNoZbYOMtuun1RQBswHPEJk3irU76GvOLQ aPuMPQEvfGzQifQJM1QHNMHgR5MzrTPmrQeAJIYycFO6SVmLzYj7MDMkYQMwHYjw+yJD V9a4ktyIRnEyzr+Mm2NOAxVGiOr67yjrLF1DgyA/ZbhUMSqYUu3PGiY4HqGMvdsODpkF TxJj1ja4C2CGO8gISktSnlOLwWX+g82REETcYz6wmOPWn1BKuQCfojcONs2RSaTvUzk1 SFpgKMe+yphj4Y85mleCWQ/QLObT+5EGCGtODjKxzTDJvgQFCyL4/PpYzQCbtSIr1SMx U+TA== MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 13 Sep 2012 01:46:53 +0300 Message-ID: Subject: Re: Jeff Dean on fast response in an unreliable world From: Constantine Peresypkin To: drill-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=f46d044303fa97786404c988f721 --f46d044303fa97786404c988f721 Content-Type: text/plain; charset=ISO-8859-1 You're absolutely correct. My point was that even much "less" than 2 can be sufficient. On Thu, Sep 13, 2012 at 1:40 AM, Ted Dunning wrote: > It isn't a doubling. It is a power. > > If probability of exceeding the SLA is p, then the probability that two > independent resources will exceed the SLA is p^2. For three, the > probability is p^3. > > To be concrete, I just did a simulation with a mixture of two log-normal > distributions. Using a mixture distribution here is important to emulate > the long-tailed nature of response time distributions ... it doesn't > suffice to use normal distributions. > > With a long tailed distribution that has a median of 20 ms response, the > raw distribution has about a 2% chance of having a response > 50ms. Using > the lesser of two responses gives a probability of > 50 ms response if > 0.04%. Three responses gives a probability of 0.0008%. For most > applications, the difference between 2 and 3 replicated queries is nil. > > Moreover, if the second query has an artificial delay of a few ms, you get > nearly the same improvements in probability of meeting the SLA, but you pay > much lower average cost because you rarely invoke the redundant queries. > > So the reason that 2 are used instead of 3 is that 2 helps a lot while 3 > only improves things slightly more. > > On Wed, Sep 12, 2012 at 1:01 PM, Constantine Peresypkin < > pconstantine@gmail.com> wrote: > > > If you do a double query you're increasing your chances to success by > > factor of 2 only. > > Why not triple or quadruple? > > > > On Wed, Sep 12, 2012 at 10:14 PM, Ted Dunning > > wrote: > > > > > Heavens.... we can easily satisfy both needs. > > > > > > Just have a parameter that can be set to 0 (= universal double query) > or > > > Integer.MAX_INTEGER to get no backups at all. > > > > > > On Wed, Sep 12, 2012 at 11:47 AM, Constantine Peresypkin < > > > pconstantine@gmail.com> wrote: > > > > > > > > The PowerDrill paper also mentions a variant of this where each > query > > > > fragment is sent to two machines, and the results for that fragment > are > > > > used from whatever machine responds first. > > > > > > > > > > > > To send each query or request twice cluster load will be increased by > > > 100%. > > > > > > > > > > --f46d044303fa97786404c988f721--