DEV Community

loading...

Are you doing anything with "edge compute"?

Ben Halpern
A Canadian software developer who thinks he’s funny. He/Him.
・1 min read

I put "edge compute" in quotations because I think it's a flexible definition, but it's a fascinating area of software development.

We've been early in this game with DEV in a way, since we use logic at the edge via Fastly to make certain choices about content, and often don't have to go all the way to the origin. But since we established our process, the options within this field are becoming more and more interesting.

Cloudflare workers and the recently announced Compute@Edge by Fastly represent pretty darn cool options. Lambda@Edge is another interesting one.

This really is one of the coolest trends IMO. It's hard to argue with the benefits of cutting down latency and running performant code nearer to the end user.

Discussion (14)

Collapse
joelvarty profile image
Joel Varty

I used Cloudflare workers last year to help control the crazy cache rules on a site that had never been put behind a CDN before. Worked great, but in realizing how powerful it was, I also realized how limiting it was as a toolset so far.

Collapse
ben profile image
Ben Halpern Author

I also realized how limiting it was as a toolset so far.

Can you expand?

Collapse
joelvarty profile image
Joel Varty

Cloudflare provides a single JS editor window with which to work with. I don't know if there is the ability to work with source control and/or a dev environment, but that would have made life much easier as the logic got more complex.

Thread Thread
andyaxton profile image
Andy Axton • Edited

You can use their cli tool wranger or serverless.com also can also handle CF workers

Collapse
kaoskater08 profile image
Eddie Hale • Edited

At work our 'edge compute' is hardware at locations in our supply chain to run kubernetes services that communicate with our cloud clusters. Most of the locations are running at a low network speed and we don't want to take it down trying to run some of our applications (example - video streaming with ML model inference at the edge).

Collapse
gvpmahesh profile image
vamsi pavan mahesh gunturu

when a request comes, our worker makes simultaneous requests to multiple servers, gathers all the info and serves the users. We found the response times are way better than going all the way to the server. And then there is a lesser need to worry about scaling. Debugging things are pretty hard though, it gives random errors in JS which are hard to replicate

Collapse
ben profile image
Ben Halpern Author

By the way it looks like Cloudflare Workers has an org account with content from @signalnerve . We are on Fastly at the moment but I wholeheartedly hope they keep it up and post to DEV. I think they have a lot of interesting things going on.

cloudflareworkers image
Collapse
signalnerve profile image
Kristian Freeman

Hey Ben! I'm a big fan of dev.to and advocate for it a lot internally as a place for us to share Workers content :) hope to have more people writing on here soon, there's a couple folks on the team that I know are very interested... just gotta get them to start a draft!

Collapse
leob profile image
leob

CDN is already established and mainstream of course, I can imagine that adding computing to the "edges" is a logical next step. And (following this line of thinking) the ultimate destination would then be to completely decentralize (peer to peer, block chain driven etc), no central server anymore.

Collapse
kayis profile image
K • Edited

I think, at least CloudFlare workers sound interesting.

It couls be used to sprinkle stuff on your frontend that usually would need a backend for security reasons, but since it has the WebWorker API, it doesn't need Node.js shenanigans.

Like payment etc.

Collapse
andyaxton profile image
Andy Axton

Used one of CF sample workers to self-host third party scripts. Adds a bit of TTFB time but overall improved start render for us

Collapse
andrewbrown profile image
Andrew Brown πŸ‡¨πŸ‡¦ • Edited

I use Lambda@Edge for a variety of things:

  • A/B Testing
  • Authentication
  • honey potting suspected scrappers.
Collapse
liquid_chickens profile image
Chris Dodds

Dynamic image processing and url rewrites (basically pushing nginx proxy_pass-type logic to the edge).

Collapse
joelvarty profile image
Joel Varty

We ended up choosing Stackpath over Fastly due to price.