pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Álvaro Hernández <aht@ongres.com>
To: Jacob Champion <pchampion@vmware.com>
To: magnus@hagander.net <magnus@hagander.net>
Cc: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Cc: Fabrízio Mello <fabrizio@ongres.com>
Subject: Re: PROXY protocol support
Date: Fri, 5 Mar 2021 01:33:21 +0100
Message-ID: <eb0912b9-e683-52e4-5e4b-36905ae578b7@ongres.com> (raw)
In-Reply-To: <d3a8e38c7a1c39034cbce45730456587b65479b1.camel@vmware.com>
References: <CABUevExJ0ifpUEiX4uOREy0s2kHBrBrb=pXLEHhpMTR1vVR1XA@mail.gmail.com>
	<b097096a23f0c9ee5b4c8d97fcc4aa64ec3fc97c.camel@vmware.com>
	<CABUevEwpMNDB7UGAS596wEu_OrvAdfzZ1tJJHNXsNWvofGOqrQ@mail.gmail.com>
	<CABUevEzh6AoLxOvAoZf4WgNYoQv1OReb=2_XE49o-wturqUYvw@mail.gmail.com>
	<955367547640a1e24a72d0e79236f49ec7f0dd21.camel@vmware.com>
	<CABUevEy+aeHCCtKQMi38tvAjLfUq1Jf7fCpOB2z8V4g3y7Zrhg@mail.gmail.com>
	<d3a8e38c7a1c39034cbce45730456587b65479b1.camel@vmware.com>



On 5/3/21 0:21, Jacob Champion wrote:
> On Thu, 2021-03-04 at 21:45 +0100, Magnus Hagander wrote:
>> On Thu, Mar 4, 2021 at 9:07 PM Jacob Champion <pchampion@vmware.com> wrote:
>>> Idle thought I had while setting up a local test rig: Are there any
>>> compelling cases for allowing PROXY packets to arrive over Unix
>>> sockets? (By which I mean, the proxy is running on the same machine as
>>> Postgres, and connects to it using the .s.PGSQL socket file instead of
>>> TCP.) Are there cases where you want some other software to interact
>>> with the TCP stack instead of Postgres, but it'd still be nice to have
>>> the original connection information available?
>> I'm uncertain what that usecase would be for something like haproxy,
>> tbh. It can't do connection pooling, so adding it on the same machine
>> as postgres itself wouldn't really add anything, I think?
> Yeah, I wasn't thinking HAproxy so much as some unspecified software
> appliance that's performing Some Task before allowing a TCP client to
> speak to Postgres. But it'd be better to hear from someone that has an
> actual use case, instead of me spitballing.

    Here's a use case: Envoy's Postgres filter (see [1], [2]). Right now
is able to capture protocol-level metrics and send them to a metrics
collector (eg. Prometheus) while proxying the traffic. More capabilities
are being added as of today, and will eventually manage HBA too. It
would greatly benefit from this proposal, since it proxies the traffic
with, obviously, its IP, not the client's. It may be used (we do)
locally fronting Postgres, via UDS (so it can be easily trusted).


    Álvaro


[1]
https://www.envoyproxy.io/docs/envoy/latest/configuration/listeners/network_filters/postgres_proxy_f...
[2]
https://www.cncf.io/blog/2020/08/13/envoy-1-15-introduces-a-new-postgres-extension-with-monitoring-s...

-- 

Alvaro Hernandez


-----------
OnGres







view thread (57+ messages)  latest in thread

Message-ID: <eb0912b9-e683-52e4-5e4b-36905ae578b7@ongres.com>
Permalink:  ../eb0912b9-e683-52e4-5e4b-36905ae578b7@ongres.com/
Also on:    postgresql.org/message-id/eb0912b9-e683-52e4-5e4b-36905ae578b7@ongres.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: aht@ongres.com, pchampion@vmware.com, magnus@hagander.net, pgsql-hackers@lists.postgresql.org, fabrizio@ongres.com
  Subject: Re: PROXY protocol support
  In-Reply-To: <eb0912b9-e683-52e4-5e4b-36905ae578b7@ongres.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox