Serverless Networking is the next step in the evolution of serverless
Serverless peer-to-peer networking for AWS Lambda unlocks the full power of creating new applications
Serverless is one of the fastest growing movements in our industry, and it’s changing how developers and companies alike approach delivering business value using the public cloud.
Until today, serverless functions like AWS Lambda have been missing a critical ingredient needed to unlock their full potential — peer-to-peer networking.
Without peer-to-peer networking, many important use cases are either impossible to achieve or require so much heavy lifting as to place them out of the range of most application developers.
Some sample use cases include streaming content to or from a function, sharing files and in-memory objects among two or more functions, harvesting the results of an asynchronously invoked function, and pre-warming capacity.
Without these capabilities, many companies struggle to adapt AWS Lambda or forego the benefits of serverless architectures to solve compute-dense distributed algorithms or demanding communication topologies — such as genetic algorithms, video transcoding, Monte Carlo simulations, and more.
The launch of Serverless Networking fills this gap by making it easy to connect two Lambda functions to each or to connect a server-based implementation to a Lambda with two lines of code.
Serverless Networking isn’t just easy to connect — it’s easy to use with high-level Python 3 language bindings that make it easy to send and receive strings, byte buffers, memory buffers, files, and streams.
Pausing a function to create pre-warmed capacity, performing barrier synchronization, harvesting asynchronously invoked child function results, and other simple orchestrations are now as easy as sending and receiving messages.
Serverless Networking takes care of the heavy lifting by creating a reliable UDP-based transport using one of the fastest known approaches, udt. All the painful details are abstracted away — including sliding windows, retransmissions, ACK/NACK transmission, flow control, and more.
This allows developers to focus on the job to be done, rather than how to dependably ship bits over the wire. Serverless Networking complements Lambda’s existing TCP/IP and UDP outbound networking capabilities without requiring any changes to the code you already have.
To enable communication between two Lambda functions, or between a Lambda function and a server-based implementation, Serverless Networking also offers NAT Punching-as-a-Service — a scalable, multi-tenanted service that replaces the heavyweight STUN and TURN servers typically used to connect or relay UDP traffic among media servers.
The Serverless Networking NAT Punch service employs a Serverless mullet architecture that exploits the latest capabilities in AWS managed services to achieve scalability at low cost.
The NAT Punching service is free to use during the beta and has a perpetual free tier so that anyone can experiment with Serverless Networking without needing to sign up or deploy a server. Premium and enterprise subscribers can take advantage of low-cost pay-per-use or pre-paid volume discount pricing or deploy their own service.
The Serverless Networking framework is distributed as a public AWS Lambda layer, so you can start using it with just a few clicks. It’s also open source, with an enterprise-friendly BSD license that makes it easy to adopt, use, and enhance for any organization.
You can download a sample app from the AWS Serverless Application Repository to see a running example in your AWS account in just a few minutes.
The beta is open to everyone and is currently available for AWS Lambda functions in the us-east-1 region. To get started, check out the docs.
You can also review the code on git and learn more about the open source effort to build the world’s best serverless networking stack and how you can participate. To learn more about how reliability is created on top of UDP sockets, check out the udt project.
The slides from my Serverlessconf NYC ’19 talk also has a basic overview of NAT punching and discusses peer-to-peer networking’s role as a layer in the “Serverless Supercomputer” tech stack.
I can’t wait to see the amazing new innovations developers will create with the advent of Serverless Networking!