-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
How does pg_net fit into the overall supabase architecture? #73
Comments
Right now it's configured at 200 requests per second, you can check this with
It's used for webhooks. You can read more about the intend on https://supabase.com/blog/supabase-functions-updates#hooks-technical-design-pg_net-v01 |
Thanks for the reply!
What is the reason for Webhooks still being in beta? Maybe we could add a few common usage examples in the docs? I encountered a few people already that were having problems with using pg_net, e.g. for sending a request from within a trigger. Doing as much as sending them this gist already helped. Common questions that should be answered in the docs:
I think this would help people a lot. |
Once Development on pg_net stagnated for a while but since #68 (a revert of a previous change) we're able to pick up dev again. So I expect pg_net to hit 1.0 for next launch week tops.
Absolutely, thanks for the suggestions. The interface will change a bit when #62 is done so I'll keep this issue open for now. |
This is very exciting news. I have the exact same use cases and concerns as as @psteinroe—we wish to make API calls to Segment and are worried about limits and failures. |
Hey,
we are making quite heavy use of pg_net, mainly to make a request to an external api from within a trigger. For some of these, we will now migrate to a postgres-based queue (postgraphile-worker / pg-boss) to have better observability.
During the migration, I began to wonder how pg_net fits into the supabase architecture, for what use-cases it is supposed to be used and what its limitations are, especially regarding performance.
As an example, we are using segment to collect usage data and want to track events from within the database. One option would be to use pg_net to make a request to the Segment API. We created a simple segement.track function which makes the request using pg_net. When our usage grows, we might get a few events per seconds. How much requests is pg_net supposed to handle? As an alternative, we could either send the requests batch-wise or use a queueing solution and drop pg_net. Further, a webhook or queuing plugin for realtime would probably be a more scalable alternative.
Is there any official guidance on the scalability and intend of pg_net?
Best
Philipp
The text was updated successfully, but these errors were encountered: