Return-Path: X-Original-To: apmail-aurora-dev-archive@minotaur.apache.org Delivered-To: apmail-aurora-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 D372B18ACB for ; Wed, 20 Apr 2016 07:36:00 +0000 (UTC) Received: (qmail 18256 invoked by uid 500); 20 Apr 2016 07:36:00 -0000 Delivered-To: apmail-aurora-dev-archive@aurora.apache.org Received: (qmail 18197 invoked by uid 500); 20 Apr 2016 07:36:00 -0000 Mailing-List: contact dev-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aurora.apache.org Delivered-To: mailing list dev@aurora.apache.org Received: (qmail 18185 invoked by uid 99); 20 Apr 2016 07:36:00 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Apr 2016 07:36:00 +0000 Received: from mail-ig0-f176.google.com (mail-ig0-f176.google.com [209.85.213.176]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 362A91A0178 for ; Wed, 20 Apr 2016 07:36:00 +0000 (UTC) Received: by mail-ig0-f176.google.com with SMTP id f1so121215247igr.1 for ; Wed, 20 Apr 2016 00:36:00 -0700 (PDT) X-Gm-Message-State: AOPr4FX6+pKbWZxe1CcaKVrx7YFhMqZYb5DuAE+zS1JCPIcG52LRXJafXeivBLoUoZdIYSKMtHlqzcMiRoFVBw== MIME-Version: 1.0 X-Received: by 10.50.159.197 with SMTP id xe5mr1806215igb.80.1461137759478; Wed, 20 Apr 2016 00:35:59 -0700 (PDT) Reply-To: jsirois@apache.org Received: by 10.107.162.79 with HTTP; Wed, 20 Apr 2016 00:35:59 -0700 (PDT) In-Reply-To: <1461137192917.71566@blue-yonder.com> References: <1461137192917.71566@blue-yonder.com> Date: Wed, 20 Apr 2016 01:35:59 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PROPOSAL] Switch aurora client from service discovery to HTTP redirects. From: John Sirois To: dev@aurora.apache.org Cc: Joshua Cohen Content-Type: multipart/alternative; boundary=14dae9340bb91f332b0530e5a57b --14dae9340bb91f332b0530e5a57b Content-Type: text/plain; charset=UTF-8 On Wed, Apr 20, 2016 at 1:26 AM, Erb, Stephan wrote: > So, scheduler_uri would point to a domain name with multiple A-records? Yes. > > We could probably also extend the interface to support a list of scheduler > uris. That would make an initial HA-setup simpler, as it would not require > the DNS entries or a load balancer. People could just use a list of IPs. > I was not thinking a load balancer would be needed if the transition is from direct zk access today, the redirect following should amount to the same availability. Folks that use an LB already, well they're all set. I was waiting for someone to bring a list of IPs up. We could do this, but the implication is folks access the Aurora UI via a fixed ip or a name like aurora1.mycompany.com, aurora2,mycompany.com, ... I was having a hard time seeing how access to the UI via 1 fixed ip/name (that could be down even though the rest are up), was fine for the UI, but not for the client. > ________________________________________ > From: John Sirois > Sent: Tuesday, April 19, 2016 19:37 > To: Joshua Cohen > Cc: dev@aurora.apache.org > Subject: Re: [PROPOSAL] Switch aurora client from service discovery to > HTTP redirects. > > On Mon, Apr 18, 2016 at 4:37 PM, Joshua Cohen wrote: > > > And apparently this is not part of our fork at all, the client already > > supports this today! The only potential change that would be required > would > > be ensuring the client properly follows redirects. > > > > Aha - yes. Thank you! > > Redirect follows are indeed not enabled on the requests calls today > explicitly, but they are enabled implicitly for all non-HEAD requests IIUC. > > So I think there is a small amount of work to maybe test redirection > actually works and deprecate the service discovery codepath in before > removing support. > Since there is support for the idea in the codebase already and you've > indicated no objection I'll proceed to draw up some RBs. > > > > On Mon, Apr 18, 2016 at 5:35 PM, Joshua Cohen wrote: > > > >> Er, it's not `proxy_url`, it's `scheduler_uri` (which makes much more > >> sense ;)). > >> > >> On Mon, Apr 18, 2016 at 5:34 PM, Joshua Cohen > wrote: > >> > >>> I'm not opposed to this, in fact we already do something similar > >>> internally. We've forked clusters.py to allow configuring a > `proxy_url` for > >>> each cluster. If that's present, then the client will use it rather > than > >>> performing service discovery to communicate with the scheduler. > >>> > >>> On Mon, Apr 18, 2016 at 2:03 PM, John Sirois > wrote: > >>> > >>>> As part of work on switching the Aurora scheduler from using a copy of > >>>> the > >>>> Twitter zookeeper libs to the Apache Curator libs [1], I'd like to > >>>> enable a > >>>> Curator feature (GUID protection [2]) that will make the scheduler > more > >>>> robust to ZooKeeper outages but has the side-effect of breaking the > >>>> effectively public API formed by the ZooKeeper path names it uses to > >>>> perform leader election and service advertisement. From Aurora's > >>>> standpoint, the API consumer is the Aurora command-line client. It > uses > >>>> service-discovery today to find the leading scheduler to communicate > >>>> with. > >>>> I propose switching the client to use HTTP re-directs instead since > the > >>>> scheduler already has a redirect service and since this would reduce > the > >>>> scheduler API surface area and generally move further down the road > of a > >>>> pure HTTP api. > >>>> > >>>> The most obvious problem I see here is just the mechanics of a proper > >>>> deprecation cycle for all those clients Aurora is not directly aware > of > >>>> that rely on its service advertisment API in ZooKeeper today. > >>>> > >>>> Are there other problems folks see with this? > >>>> > >>>> [1] https://issues.apache.org/jira/browse/AURORA-1468 > >>>> [2] https://issues.apache.org/jira/browse/AURORA-1670 > >>>> > >>> > >>> > >> > > > --14dae9340bb91f332b0530e5a57b--