Recently, Netlify announced Edge Functions where you can run your code at edge locations on Deno runtime with globally low latency. In this post, we will build a simple app which runs Netlify Edge functions and accesses Upstash Redis as a data store. Upstash Redis is a perfect match for Netlify Edge Functions because:
- Upstash Redis has Global database type where the Redis replicas are distributed all over the world. So your edge function will access to the closest region with low latency.
- Upstash Redis has a built-in REST API and SDK which is free from any connection issues common in serverless runtimes.
- Upstash Redis has a JS SDK which is built and tested with Deno runtime