Let’s review the benefits and challenges associated with both lightweight and fully featured code at the edge options.
Lightweight JS at the Edge
Cloudflare and Stackpath have both implemented the use of Chrome V8 at the edge (essentially a lightweight JS), and hailed it as the critical ingredient for their serverless programs. The team at Cloudflare describes V8 Isolates as “the future of serverless and cloud computing in general”.
Cloudflare, which processes millions and millions of requests each second, was in need of a solution which allowed its manifold customers to write code and build applications themselves on the CDN’s 150+ servers worldwide. Cloudflare previously used Lua, but because it wasn’t sandboxed, its customers were not able to independently run code. Cloudflare ruled out containerization technologies such as Kubernetes for being too expensive and overly resource intensive. Its engineering team eventually landed on Chrome V8 Isolates as the backbone for the Cloudflare Workers serverless program: a single process can run hundreds or thousands of Isolates and switch between them, thereby allowing code from many different customers to run in the same OS process.
In a post titled “Cloud Computing without Containers” written for Cloudflare, Zack Bloom, Director of Product for Product Strategy, says he believes, “it’s possible with this model to get close to the economics of running code on bare metal, but in an entirely Serverless environment”. Bloom believes that the use of V8 marks not just “an iterative improvement but an actual paradigm shift”.
Both StackPath and Cloudflare espouse the speed of V8, and how quickly it allows your code to start. Zack Bloom describes the way in which “any given isolate” is able to “start around a hundred times faster than I can get a Node process to start on my machine.”
Fully Featured JS at the Edge
On Section’s Edge PaaS, we offer options for lightweight code at the edge, but we also support richer JS at the edge that traditional platforms are unable to provide. The richer JS option is a fully fledged Node JS module running at the edge in a completely containerized solution which eliminates the security risks other platforms face. This allows your apps to run natively, and moreover, grants you the full experience. Full featured application functionality means flexibility in your technology stack, and the ability to mix and match best-of-breed security and performance options in order to build the solution you need, not the one you are locked into by traditional CDNs.
Section’s holistic solution gives websites maximum overall value and the opportunity to achieve optimal performance and robust security at any required scale.
One of the key differentiators with Section’s Edge PaaS is its adherence to modern DevOps principles. Our platform provides developers with the tooling they need to clone environments and run Node apps locally for testing before pushing to staging and production, ensuring faster and smoother development lifecycles.
The Section platform utilizes a blue-green deployment model which eliminates the need for ‘spinning up’. Many believe that spin up time is an issue for fully featured code at the edge; we believe, however, that this only applies to a subset of solutions, such as AWS Lambda, in which containers are spun up and then discarded once the code operation is complete.
Finally, adding our Node JS Module to the edge is highly cost effective when evaluating fully featured and developer integrated solutions at the edge.
With Section, you can choose whichever option best suits you - or use both…
Practical Use Cases for Node JS at the Edge
Some example use cases for running Node JS at the edge include:
- Deploy your single page app (SPA) to the edge;
- Handle API requests;
- Rewrite body content;
- Implement custom security filters at the edge;
- Redirect segments of users to different back-ends;
- Deliver highly personalized content to users;
- … and many, many more! (What will you create.)
Have a use case that you’d like to talk through with our engineers? Contact Us