Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B27A6200D37 for ; Thu, 9 Nov 2017 14:11:13 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B13221609E5; Thu, 9 Nov 2017 13:11:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D5A9F160BEF for ; Thu, 9 Nov 2017 14:11:12 +0100 (CET) Received: (qmail 11368 invoked by uid 500); 9 Nov 2017 13:11:11 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 11243 invoked by uid 99); 9 Nov 2017 13:11:10 -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; Thu, 09 Nov 2017 13:11:10 +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 E550D1A0787; Thu, 9 Nov 2017 13:11:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.38 X-Spam-Level: ** X-Spam-Status: No, score=2.38 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id FRwsSeO7Za9i; Thu, 9 Nov 2017 13:11:06 +0000 (UTC) Received: from mail-ot0-f177.google.com (mail-ot0-f177.google.com [74.125.82.177]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 0F7AC60E85; Thu, 9 Nov 2017 13:11:06 +0000 (UTC) Received: by mail-ot0-f177.google.com with SMTP id 18so5208679oty.9; Thu, 09 Nov 2017 05:11:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=3YN/FBugz2tt8nZS/PsArL6Ji63m3M77UskmzB8NKXs=; b=nh1laaaKfVzlH10+ZruckSLfiPbuWHhIustKRF6rPEmOSUnQdG1XWywhwOoE9M4UAu rCfTpV4KAgMrSwkOE5UM0MCT7qIhEsruqrKccEw6e5qbRFC9h1TBhxYhqinv/IEDN5n+ ZrrkNjijOPro93o8cBc36eFw6TqOUV+8Zwq90YAe3JMYgH9/rYGRBGN7nqHGokxFvv6G SEZ25PdCsnNMvXg8vkmdwYSapzyYDcMvp+t9I0x151MMM6hwqb3CD3TafX3JOHjwudOi WanICq1S/bAbyZj+rYqPTskF5y7h/Kwd5kn8EXLPGs7mOWwhahD54kJa/c87XDee7gB0 DBxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3YN/FBugz2tt8nZS/PsArL6Ji63m3M77UskmzB8NKXs=; b=J0QzE1V2uubOQxIdhGi9xyrwR4ZpmeLvaF0gR7/vORf3DdCZhx2KmWvQvalEDr33uA KD1ja8NPt5xUtXwjjQvnTxy4ijLIPj1fyklDbXyMl3m4K8WcfVzFqPVYPqxGVD85uBvq UYsSrolomtQYsp5f99Kc8qkMFJScey5tgVH7Mck/fJM9mA7OHWnSZ8fJB2U8fnGMF/9n TrnmD55D41HMFORL8sE8+B+tsCI9F2WDtGVs9gabzKkVTwn3xU8GYtwgVJ//J+Bntkfl tDnyDJOQNCiBKgVponvZyFGTbUbYjl1qrlTrJkobIPebIRZQpAKDd4qXLvnF4vzYkDMy yFdA== X-Gm-Message-State: AJaThX5i+ytod8dyWIcEWQBMdZx87dwDg4cgqeWbJjZ3X0iWs9N5XCnm iewWZXTTLvWS4izhDySCTQ7ZDmQK2U2Q+hgeLeRWKw== X-Google-Smtp-Source: AGs4zMZ5Fc5ArbrE6gnIyZef414ZQUYJK/a3eQ/8sXowKX2T25f5jkKyghBCeaaeRWHchYxKrFieqLKRGDvOq0xP18s= X-Received: by 10.157.13.67 with SMTP id 61mr295707oti.41.1510233058969; Thu, 09 Nov 2017 05:10:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.17.183 with HTTP; Thu, 9 Nov 2017 05:10:58 -0800 (PST) In-Reply-To: <1778806379.4501.1510211582337@ox.pcextreme.nl> References: <1750999994.6369.1509476065042.JavaMail.zimbra@li.nux.ro> <270992313.1239.1509970237965.JavaMail.zimbra@li.nux.ro> <1778806379.4501.1510211582337@ox.pcextreme.nl> From: Andrija Panic Date: Thu, 9 Nov 2017 14:10:58 +0100 Message-ID: Subject: Re: HTTPS LB and x-forwarded-for To: "users@cloudstack.apache.org" Cc: Khosrow Moossavi , Will Stevens , "dev@cloudstack.apache.org" , Pierre-Luc Dion Content-Type: multipart/alternative; boundary="001a113711b0020f36055d8c8963" archived-at: Thu, 09 Nov 2017 13:11:13 -0000 --001a113711b0020f36055d8c8963 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Wido, backend servers are not Linux only, for example we have a ton of Windows customers, some WEB solutions / IIS etc... @all - If we try to please/solve everyone's proxying solution/requirement - this is impossible IMHO - I'm thinking more about some "do it as you like" solution, to let customer write his own haproxy config and upoad it (for example, or something better?). We can support newer version of haproxy (1.5+) which also implement "transarent proxy" (integrate with kernel so to speak) to allow TCP-level connections to backend (TCP mode, not HTTP mode) but to still "preserve" remote IP by faking it (fake soruce IP =3D transarent proxy). For the rest of configuration options, I would leave it to the customer how he/she wants to configure rest of haproxy configuration, inlcuding custom checks, etc. Haproxy configuration is never-ending story, and we probably should allow custom sripts/configuration instead of trying to provide GUI/API way to configure everything (which is impossible...) Just my 2 cents... On 9 November 2017 at 08:13, Wido den Hollander wrote: > > > Op 8 november 2017 om 14:59 schreef Pierre-Luc Dion >: > > > > > > Same challenge here too! > > > > Let's look at improving Load-balancing offering from cloudstack, I gues= t > we > > should do a feature spec draft soon.., from my perspective, doing SSL > > offload on the VR could be problematic if the VR spec if too small, and > the > > default spec of the VR being 1vcpu@256MB, considering it can be the > router > > of a VPC, doing VPN termination, adding HTTPS is a bit ish... What wou= ld > > be your thought about this ? > > > > I'd be curious to have a LB offering in ACS where it would deploy a > > redundant traefik[1] beside the VR for doing http and https > Load-balancing. > > I think it would also be useful if the API of that traefik instance wou= ld > > be available from within the VPC or LBnetwork so is API would be > accessible > > to other apps orchestration tools such as kubernetes or rancher. > > > > traefik or not, here is what I think is needed by cloudstack in the LB > > improvement: > > > > - support http, https (X-Forwarded-For) > > HAProxy also supports the PROXY protocol towards the backends. Apache > 2.4.22 supports this natively and Varnish for example can also talk PROXY= . > > It adds a littlebit of metadata to the connection so that the backend > knows the original IP the connection came from for example: > https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt > > Wido > > > - basic persistence tuning (API already exist) > > - better backend monitoring, currently only a tcp connect validate if t= he > > webserver is up. > > - ssl offload > > - metric collection, more stats, maybe just export the tool status page > to > > the private network. > > - Container world support, right now if you have Rancher or kubernetes > > cluster, you need to deploy your own LB solution behing mostlikely a > static > > nat., If cloudstack would deploy a traefik instance, Kub or Rancher cou= ld > > reuse this instance and managed it to properly do LB between containers= . > > > > > > What would be your prefered LB tool: > > haproxy, traefik or nginx? > > > > CloudStack already have to code to handle SSL certs per projects and > > accounts if not mistaking because that code was added to support > NetScaler > > as Load-balancer in the past. so one less thing to think about :-) > > > > > > [1] https://traefik.io/ > > > > > > PL, > > > > > > > > On Mon, Nov 6, 2017 at 7:10 AM, Nux! wrote: > > > > > Thanks Andrija, > > > > > > LB outside of the VR sounds like a good idea. An appliance based on, > say > > > cloud-init + ansible and so on could do the trick; alas it'd need to = be > > > outside ACS. > > > I guess as users we could maybe come up with a spec for an > improvement, at > > > least we'd have something the devs could look at whenever it is > possible. > > > > > > Regards, > > > Lucian > > > > > > -- > > > Sent from the Delta quadrant using Borg technology! > > > > > > Nux! > > > www.nux.ro > > > > > > ----- Original Message ----- > > > > From: "Andrija Panic" > > > > To: "dev" > > > > Cc: "users" > > > > Sent: Thursday, 2 November, 2017 23:21:37 > > > > Subject: Re: HTTPS LB and x-forwarded-for > > > > > > > We used to make some special stuff for one of the clients, where al= l > LB > > > > configuration work is done from outside of the ACS, i.e. python > script to > > > > feed/configure VR - install latest haproxy 1.5.x for transparent > proxy, > > > > since client insisted on SSL termination done on backend web SSL > > > servers.... > > > > Not good idea, that is all I can say (custom configuration thing) - > but > > > the > > > > LB setup is actually good - transparent mode haproxy, works on TCP > level, > > > > so you can see "real client IP" on the backend servers (which must > use VR > > > > as the default gtw, as per default, so the whole setup works > properly). > > > > > > > > I'm still looking forward to see some special support of LB inside > VR via > > > > ACS - proper LB setup inside VR via GUI/API - i.e. to enable LB > > > > provisioning SCRIPT (bash, or whatever), where all needed > > > > install+configure can be done from client side - otherwise coverin= g > all > > > > user cases, with proper HTTP checks and similar....is impossible to > do > > > > IMHO. > > > > > > > > Some other clients, actually have internal FW appliance (i.e. > multihomed > > > > VM, acting as gtw for all VMs in all networks), and haproxy instale= d > on > > > > this device (with NAT configured from VR to this internal FW/VM, so > > > remote > > > > IP can be seen properly) - this setup is fully under customer > control, > > > and > > > > can provide any kind of special haproxy config... > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 31 October 2017 at 19:54, Nux! wrote: > > > > > > > >> Hello, > > > >> > > > >> Of the people running an LB (VR) with https backends, how do you > deal > > > with > > > >> the lack of x-forwarded-for since for port 443 there's just simple > TCP > > > >> balancing? > > > >> > > > >> Has anyone thought of terminating SSL in the VR instead? Ideas? > > > >> > > > >> Cheers > > > >> > > > >> -- > > > >> Sent from the Delta quadrant using Borg technology! > > > >> > > > >> Nux! > > > >> www.nux.ro > > > >> > > > > > > > > > > > > > > > > -- > > > > > > > > Andrija Pani=C4=87 > > > > --=20 Andrija Pani=C4=87 --001a113711b0020f36055d8c8963--