DEV Community

Cover image for Getting Started with Serverless Edge - Exploring the Options
Brian Rinaldi
Brian Rinaldi

Posted on • Originally published at remotesynthesis.com

Getting Started with Serverless Edge - Exploring the Options

There are a lot of options for serverless edge functions and services – and the list seems to get longer every day. It can be difficult to judge them too, because often you aren't comparing apples to apples. You might be comparing an offering that actually sits on top of another companies infrastructure with the offering from the infrastructure provider or even just a framework that makes it easy to deploy edge functions.

It can be confusing. In this post, I hope to help you get an overview of the various offerings and how they compare. There are a couple of caveats to get out of the way first:

  • This is not a comprehensive list. I have tried to include the major offerings but I definitely have not included everything.
  • This is not a ranking. I have not used all of these services, so I am not in a position to evaluate and rank all of them.
  • I am looking at these services purely from the perspective of a web/front-end developer. Edge functions have uses beyond the web but that sits outside my own areas of expertise.

Check out my last post where I discussed the promise of edge serverless as well as potential use cases.

Categories of Edge Serverless

As I mentioned, part of the problem of evaluating edge serverless offerings is that you are often comparing two very different things that are labeled the same. To help clarify, I've created categories that I think best describe these offerings. They are:

Core Edge Serverless

These are the companies (mostly CDN companies) who have compute offerings like serverless edge functions, databases and more. While they have their own offerings, they also own the infrastructure upon which the other categories rely.

These include the following:

Edge Platforms

These are services that offer things like edge functions that are built on top of the core edge serverless offerings. The goal of these is usually to improve the developer experience of building edge serverless through continuous deployment while also integrating it with your broader projects, like adding edge functions into your web site codebase or your database.

Here are some examples of edge platforms with the core edge serverless offering they are built upon listed in parentheses.

Edge-enabled Frameworks

These are full-stack web frameworks that enable you to automatically deploy edge functions as part of your web application code.

Edge Databases

This is a relatively new category, but these are databases that replicate to the edge (note that I am not including data stores, though some of the prior core and platform offerings do offer a means of storing key/value or cached data at the edge). As I mentioned in the prior post, where your data lives is a core consideration when choosing to use an edge function.

  • Fauna – A serverless database with built in global replication and strong consistency.
  • Planetscale Portals (public beta) – A serverless MySQL database with support for replicating to read-only regions.
  • Cloudflare D1 (still in private beta) – A SQLite based relational database that has globally replicated reads.
  • DGraph – A distributed GraphQL database with a graph backend.

Which Option Should You Choose?

Of course, it depends.

If you are already tied to an existing CDN provider like Fastly, Akamai or Cloudflare for your existing infrastructure, then choosing their offerings may offer the easiest runway to get going. Edge platforms offer an easy option for those who have a greenfield project or are already deploying to these services and want an easy way to get started integrating edge functions while integrating them into new/existing web applications codebases.

If you are using an edge platform, you may also want to consider integrating an edge-enabled framework. This can greatly improve the developer experience of integrating edge functions into you web project.

In all cases, if your edge function(s) will be calling some form of data, you need to consider where that data will live. You don't want to move a function to the edge that relies on data that potentially comes from across the globe, thereby negating some/all of the benefit of moving to the edge. In some cases, an integrated K/V or cache will suffice, but if you need a full database, these services are worth exploring.

In the next post in this series, I will explore a few of the options that I listed a little bit deeper.

Top comments (2)

Collapse
 
slickstef11 profile image
Stefan 🚀

Great article. I think you should also add WunderGraph on here as a Stateful backends solution.

You can use any of the frontends you listed with it as well as the databases.

Check it out!

Collapse
 
clun profile image
Cédrick Lunven • Edited

Hi there, I would mentioned AstraDB as edge Database as well:

  • It leverages distributed Cassandra architecture to get servers run as close as possible to the user
  • It is serverless
  • Here a sample application and instruction for a clone of netflix serverless functions and Astra serverless DB github.com/datastaxdevs/workshop-g...