loading...

What are your thoughts on running code at the edge?

michaelgv profile image Mike ・2 min read

tl;dr: We've about to be deploying new systems to run code (properly) on the edge, and there's been some internal debate - so I thought I'd ask the dev community: what are your thoughts on running code on the edge?

Our infrastructure contains some PHP applications, and more recent ones are in Python or Node, we have edge nodes that deliver our application, and we some some proprietary sync software to keep all our edges in sync for files.

After much internal debate, we've decided to scale our infrastructure at the edge, instead of forking over tons of money for AWS, Azure, GCP, etc. - we already have reliable edge nodes in place, which can deliver content in under 30ms in most places(all over NA, some of SA, England, 60% of general Europe(AMS, DE, etc)), the issue we've had in the past is when you hit our edge, we then poll our backend in Canada, this causes a long wait time for users (static files are hosted at the edge, we're talking dynamic content here). Presently, it's significantly cheaper to roll our own infrastructure, instead of rely on something like Fastly to use.

Our running plan is for NA to start, we're going to deploy 4 instances of our application at the edge and monitor metrics on an isolated beta environment, and invite our consumers to test it. We're hoping by doing this, to bring our load time down from 220ms to sub-30ms all across NA.

There are some downsides, such as keeping data in sync - to which we're not concerned now, this is why we want to do a beta test to see where we need to improve.

Some developers have embraced this, some have maintained a strong stance against - given this, what's your stance on running code on the edge?

Posted on Aug 21 '18 by:

michaelgv profile

Mike

@michaelgv

Full-time freelancer; Former Lead Engineer / Senior Management; speaker; 14 years in development; open for consulting and freelance opportunities.

Discussion

markdown guide
 

Hi Michael, I think it is a really good solution. In the company I work for we are starting to experience the same issues you had since we started deploying node servers in Europe.

The only issue I thing is with the syncing of the servers, will love to hear how you guys fixed that!

 

I can’t give off proprietary information, but if you send me a message I’ll share a high level concept we’ve thought of