Edge Functions – completing the optimization stack
Edge Functions are small and lightweight pieces of code logic that are separate from your application code. Their name comes from the fact that they best perform on the edge (https://deno.com/blog/the-future-of-web-is-on-the-edge). Edge is a rather new term and refers to a paradigm of delivering a fast result by being as close to the executor as possible. That usually means that the piece of code that is supposed to execute is distributed to different server locations in the world. Depending on where it’s called from, the closest server takes the task.
Supabase’s Edge Functions service allows you to add custom edge functions that you can then execute whenever you need them. However, that leaves us with a question: when do you use them, and if they are that fast, why isn’t everything on the edge?
Edge functions can be considered to be background workers. They need to be small and have a limited processing...