by Diz_Eliel
Hi everyone 👋
I’m trying to better understand the intended way to deal with worker lifecycle when comparing Supabase Edge Runtime to a more traditional self-hosted setup.
In my case, I’m running:
What I’m running into is that each request appears to behave like it spins up a fresh worker / isolate. That’s usually fine, but it becomes costly once functions have:
For lightweight APIs this isn’t a big issue, but for heavier workloads the overhead becomes noticeable.
I couldn’t find much documentation around controlling worker reuse or lifecycle in Edge Runtime, so I experimented with an approach where:
I’m not advocating this as “the correct solution” — just trying to understand the trade-offs and what’s considered best practice.
So I’d love to hear from others:
If it helps the discussion, I can share a small example of how I’m experimenting with manual worker reuse.
Thanks!
The user is seeking advice on managing worker lifecycle in Supabase Edge Runtime compared to self-hosted setups. They face challenges with worker initialization overhead for heavier functions and are experimenting with worker reuse. They ask for best practices and whether explicit worker reuse is advisable.
No spam or duplicate posts - Do not post the same content more than once. Repeated posts or self-promotion without value will be removed.