by Diz_Eliel
Hi folks,
I might be misunderstanding something, so I’m hoping someone can sanity-check this.
I’m running a self-hosted Supabase Edge Runtime with a small dispatcher that routes requests to different Edge functions. What surprised me is that each request seems to behave as if it’s handled by a fresh worker / isolate.
For simple endpoints this is totally fine, but some of my functions do heavier work (initialization, schema loading, external integrations), and the overhead becomes noticeable.
I looked for guidance on worker reuse or lifecycle control, but didn’t find much documentation around it. Because of that, I tried experimenting with reusing one worker per function while the main process stays alive, and only recreating it if the worker dies.
Before going too far with this, I wanted to ask:
Is this expected behavior in Edge Runtime, or am I approaching this the wrong way?
If anyone has experience running heavier workloads on self-hosted Edge Runtime, I’d really appreciate hearing how you handle this.
Thanks!
The user is running a self-hosted Supabase Edge Runtime and notices that each request seems to be handled by a fresh worker, which causes overhead for heavier functions. They are seeking guidance on worker reuse or lifecycle control to optimize performance for functions involving initialization, schema loading, and external integrations.
No spam or duplicate posts - Do not post the same content more than once. Repeated posts or self-promotion without value will be removed.