https://supabase.com/ logo
#help
Title
# help
s

sayantan.k

03/26/2022, 7:06 AM
Hi guys, I'm using Supabase for the first time and I'm working on an API using Vercel's Serverless functions. I wanted to use Connection Pooling for this, and I was wondering what are the steps for it? I can see that it's enabled in my Database settings, but I only really used
createClient
with my
SUPABASE_KEY
and
SUPABASE_URL
. So is connection pooling handled under the hood by Supabase? Or am I missing something?
n

Needle

03/26/2022, 7:06 AM
Hello @sayantan.k! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
🆕 Help with Connection Pooling
n

Needle

03/26/2022, 7:13 AM
Help with Connection Pooling
a

anothercoder

03/26/2022, 7:16 AM
However, note the port number difference for connection pooling and direct connect: 6543 vs 5432
In supabase project web gui, Database > Connection Pooling, vs Settings > Database
g

garyaustin

03/26/2022, 3:59 PM
If you are using the database API going thru PostgREST I believe the pooling is automatically handled by PostgREST. So you don't worry about PgBouncer. If you want to connect directly to the database using the ports (like from your own server, or Prisma, etc.) you can use pgbouncer port if needed.