Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MVP]: Supabase integration #23

Open
HMarzban opened this issue Jan 10, 2023 · 2 comments
Open

[MVP]: Supabase integration #23

HMarzban opened this issue Jan 10, 2023 · 2 comments
Assignees

Comments

@HMarzban
Copy link
Collaborator

HMarzban commented Jan 10, 2023

Use Supabase as a back-end service,
We need two instances of Supabae! one for production, the other one for the stage.

Resource: https://supabase.com/docs/guides/self-hosting/docker

Note: Recommended to use a separate Postgress database for each instance.

@HMarzban HMarzban self-assigned this Jan 10, 2023
@HMarzban
Copy link
Collaborator Author

Supabase studio (admin dashboard) in production mode needs to protect via Authentication,
Therefore the easiest way to restrict access is to set auth_basic in the Nginx config.

Resource: How To Set Up Password Authentication with Nginx

@HMarzban
Copy link
Collaborator Author

HMarzban commented Jan 11, 2023

Does 1 visitor = 1 connection?

No. With connection pooling, many users can share a few database connections, you can have 10 connections serving a 1000 users. This is because in a web application the web users are not hitting the database constantly(GUI work, idleness, etc) and when they need to, they "borrow" a connection, fulfill a request and then "return" the connection to the pool.

There are some more details on https://supabase.com/docs/guides/database/connecting-to-postgres

Resource: Performance Tuning

Resource: Understanding performance, response time & connection limits from a newbie point of view

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

1 participant