Understanding Edge Functions
Edge is a term that many developers at least have heard of. Being on the “edge” refers to being as close to the user as possible with the help of a proper content delivery network that spreads data/code to multiple servers around the globe. This proximity reduces latency and improves performance by ensuring that data and code are as close to the end user as possible.
One practical application of this concept is seen in Supabase’s Edge Functions. Edge Functions in Supabase are small pieces of TypeScript with the Deno runtime (https://deno.com/). These small pieces of code are executed right within the Supabase infrastructure, so you don’t need to deploy them elsewhere. They’re very good for isolated, small tasks that you can run independently from your application. But when should you use such Edge Functions specifically, where should you write them, and how should you use them? Let’s have a look.
Note
The...