The Edge is the new frontier of computing possibilities, offering promises, opportunities, and it’s own set of challenges. In this talk, we’ll break down what it is, why it’s awesome, and how it fits into your application architecture. We’ll cover things like:
- What are the benefits
- What are the limitations
- When it makes sense
- When it doesn’t make sense
- How to get started
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
stackconf 2023 | What the Heck is Edge Computing Anyway? by Austin Gil.pdf
1. What the
heck is Edge
Compute
anyway?
(aka "edge functions"
or "edge workers")
Slides: bit.ly/edge-compute
2. @heyAustinGil
Hey 👋
I'm Austin Gil
austingil.com | @heyAustinGil
Hacking on websites since 2013
Teach folks how to build better websites
Have a cool chiweenie named Nugget
3. @heyAustinGil
Plain and simple:
Edge compute is the result of distributing serverless functions to thousands of
locations around the world to handle requests from as close to the user as
possible.
The result is programmable/dynamic/customizable responses with the least
amount of latency (aka more speed).
7. @heyAustinGil
Natural progression of dog hats
1. Client wants a thing
2. You make a thing
3. You give them a thing
Mediocre analogy / really good photos ¯_(ツ)_/¯
8. @heyAustinGil
Let’s start with "Compute"
What:
Compute = bleeps & bloops -> HTML
Where:
Traditional Servers
Client-Side JavaScript
Client-Side workers
Static-Site-Generators
Cloud functions
Edge functions
18. @heyAustinGil
What about "Edge"?
What
A network of globally distributed
computers capable of handling user
requests.
Why
By putting resources as close to users
as possible, we can reduce latency,
thereby improving performance and
user experience.
24. @heyAustinGil
With everything in mind, we should…
Do things closer to users (like a CDN)
Do more work on servers (like cloud servers/functions)
Send smaller assets (???)
27. @heyAustinGil
Edge compute
Programmable runtimes (like cloud functions)...that are globally distributed (like
a CDN)...and live between a client and origin.
Dynamic server-side functionality...that executes as close to users as possible.
Plus:
Reliable location information
Access to key-value stores
28. @heyAustinGil
For Users
Dynamic content with…
Less latency (compared to servers/cloud functions)
Less to download (compared to client-side rendering)
Less work on the client (better batt. & perf.)
29. @heyAustinGil
For Developers
Low barrier for POC
Consistent execution environment (no x-browser issues)
Location-based logic
Secrets stay secret (compared to client-side)
Common programming language (JavaScript)
No servers/infrastructure to manage
38. @heyAustinGil
Multiple sequential requests 😬
(eg: Blog Post -> Catgeories -> Related Posts)
💻---------------🤵-🎯-🤵🎯-🤵---------------💻
vs.
💻-🔪---------------🎯---------------🔪---------------🎯---------
40. @heyAustinGil
An addition, not a replacement
Where to run compute becomes a tough question
(latency, bundle size, device capabilities, data location etc).
Before
Client-side JS -> Client-side service worker -> Cloud functions -> Traditional
servers
After
Client-side JS -> Client-side service worker -> Edge compute -> Cloud functions
-> Traditional servers
48. @heyAustinGil
Compulsory slide with lots of stats
100ms delay => 7% drop in sales
2s delay => 103% increased bounce rate
Over 3s load times => 53% smartphone users don’t convert
Optimal loading for most sales: 1.8-2.7s
28% users won’t return to slow sites
Webpages with most sales loaded 26% faster
250ms faster => keeps users from visiting competitors
Performance impact’s revenue, perception, loyalty, & engagement
Source: Akamai’s 2017 Online Retail Performance Report
49. @heyAustinGil
Visualization
In 2008, Amazon found 100ms in load hurt sales by 1%
($513.98b annual revenue x 1% = >$5b)
They could hire SIXTY THOUSAND developers and still profit
(2023 average = $83k)
More case studies of performance vs. UX/biz metrics at wpostats.com
50. @heyAustinGil
Is it worth it?
Lemme work it
It depends 💩
(but when you need it, give Akamai EdgeWorkers a try)
51. @heyAustinGil
Akamai EdgeWorkers
Most distributed network (>300k servers, >4k POPs)
More customizable lifecycle hooks
After client request, before origin request, after origin response, before
client response
Integrates with CDN’s cached content
Protected by industry-leading security
Canary-deployment rollouts
No per-region/per-server limits (only per-request)