supabase / supavisor

A cloud-native, multi-tenant Postgres connection pooler.
https://supabase.github.io/supavisor/
Apache License 2.0
1.65k stars 54 forks source link

Naive proxy from client to owner node #349

Open chasers opened 1 month ago

chasers commented 1 month ago

Currently if a client is connected to a Supavisor node which does not own the pool there is communication with the pool processes which happen over Erlang distribution. With Erlang distribution there is only one TCP connection between nodes. On very busy clusters sometimes this can cause added latency.

We should instead create a TCP connection per client to the pool owner node to put client traffic on their own connections.

When a connection comes into a node which does not own the pool, a naive proxy should route traffic to pool owner node.