Return-Path: X-Original-To: apmail-mesos-user-archive@www.apache.org Delivered-To: apmail-mesos-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F420D1930E for ; Mon, 28 Mar 2016 17:10:34 +0000 (UTC) Received: (qmail 79135 invoked by uid 500); 28 Mar 2016 17:10:34 -0000 Delivered-To: apmail-mesos-user-archive@mesos.apache.org Received: (qmail 79066 invoked by uid 500); 28 Mar 2016 17:10:34 -0000 Mailing-List: contact user-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@mesos.apache.org Delivered-To: mailing list user@mesos.apache.org Received: (qmail 79056 invoked by uid 99); 28 Mar 2016 17:10:34 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Mar 2016 17:10:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id E8DF71A003E for ; Mon, 28 Mar 2016 17:10:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.071 X-Spam-Level: X-Spam-Status: No, score=-0.071 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, KAM_INFOUSMEBIZ=0.75, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=sargun.me Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id HhI1mwAokFHS for ; Mon, 28 Mar 2016 17:10:31 +0000 (UTC) Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 6A8245F19B for ; Mon, 28 Mar 2016 17:10:31 +0000 (UTC) Received: by mail-oi0-f45.google.com with SMTP id r187so179852748oih.3 for ; Mon, 28 Mar 2016 10:10:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sargun.me; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=zEIyprZtJtW2gaI3jzZ9wllvkcfNh9ecbS0HqGyyLfs=; b=etnkVnOLQcvWA+B1ZWccFFwqA58nCtuBd4xaw9iqXt+SL1V7snd5frvDCHghuYhTgY RTjMJaV5sCOdlMt+VGVbZS1e++lPly6DaUF+9SUKc8mKjJRIa02amkxt0rDmz1ucXsfz n1CycOveaOoFRW3q404L27DKMeaxzRMOwZlao= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=zEIyprZtJtW2gaI3jzZ9wllvkcfNh9ecbS0HqGyyLfs=; b=N2+FdcH3wTHuRPOJWWb9epvAVCyP6iPEFUjB7a2NFIqjV2Gb8Vnn9gyyQAfD8Ty5l+ Yfbk9RBhCAWhdvC+5uvmQr/Wyh+A0r4Z43I9MKl/0h3ATadYOosWUC1UZbwIJsPqcIVB A9YytHVwpHuoaAAUtDVg/PIJagDU7+sZgFUMHcQYEdCSoFrILpM82WMEVEPJxl0hxo+E 8uPd0/9mvBrlZ8JlIPLTYu0zwtbe4N5K5u1IuFGc2PKL11G+i1AGY8hmbhCc+4cTWPas FzjwUpSFXLOnElnHktDQHP752k2Hhu2aZtKZ04CycoPYBt0eiQkqe5A337wzgerInkSB w1Bw== X-Gm-Message-State: AD7BkJKAGr2NlTkBV0mnEWn5zyHbzzbrKhi2XZUmifxnRPRIurD+rr05DfFAiLMvgV4m35zRs1DBDc7pNBlzAQ== MIME-Version: 1.0 X-Received: by 10.157.35.51 with SMTP id j48mr4403026otb.71.1459185030219; Mon, 28 Mar 2016 10:10:30 -0700 (PDT) Received: by 10.157.54.200 with HTTP; Mon, 28 Mar 2016 10:10:30 -0700 (PDT) In-Reply-To: References: Date: Mon, 28 Mar 2016 10:10:30 -0700 Message-ID: Subject: Re: State of DiscoveryInfo From: Sargun Dhillon To: user@mesos.apache.org Content-Type: text/plain; charset=UTF-8 So, we parse DiscoveryInfo in Mesos DNS, and we can use it to generate custom DNS records on behalf of a framework. Mesos-DNS publishes SRV, and A records in order to act as an service discovery mechanism for applications that are both "inside" and "outside" of a "Mesos cluster". The DiscoveryInfo field is also used to indicate other things. For example, if several ports are allocated to a task / Container, we may be unsure of which ports that container should expect ingress connectivity on. Although we can parse the resources, it becomes somewhat brittle as we begin to interface with other networks. In order to avoid this, the framework can tell us which ports are allocated to ingress traffic. In my opinion, any tasks that are planning on accepting traffic should expose this information via DiscoveryInfo. This information can then be taken to configure tools like IPTables, or other network filtering. Lastly, DiscoveryInfo has some free form fields (labels). These labels can be used to configure load balancing tools like HAProxy, etc. We have some internal standards we use that can auto-configure virtual IPs to map to the tasks that have the right port label format. This makes it incredibly easy to wire up tasks within the cluster. On Tue, Mar 22, 2016 at 1:42 AM, haosdent wrote: > As I know, Mesos-DNS use discoveryInfo from Mesos. > https://github.com/mesosphere/mesos-dns > > I also found some links may be useful for you: > > https://open.mesosphere.com/tutorials/service-discovery/ > https://mesosphere.github.io/marathon/docs/service-discovery-load-balancing.html > http://events.linuxfoundation.org/sites/events/files/slides/mesos-networking.mesoscon2015.pdf > > And the design doc of DiscoveryInfo also show "Example Uses" about it: > https://docs.google.com/document/d/1tpnjfHsa5Joka23CqgGppqnK0jODcElBvTFUBBO-A38/edit#heading=h.4wpt5efsi44n > > On Tue, Mar 22, 2016 at 4:31 PM, tommy xiao wrote: >> >> need a related issue to tracking >> >> 2016-03-22 13:24 GMT+08:00 Zhitao Li : >>> >>> Hi, >>> >>> Does anyone have an example of using the DiscoveryInfo from Mesos 0.22? >>> I'm interested in understanding its current status and adoption situation, >>> whether any real service discovery system is using it, and what's the >>> blocker if not. >>> >>> Thanks. >>> >>> -- >>> Cheers, >>> >>> Zhitao Li >> >> >> >> >> -- >> Deshi Xiao >> Twitter: xds2000 >> E-mail: xiaods(AT)gmail.com > > > > > -- > Best Regards, > Haosdent Huang