define edge --plain-english
Edge
TLDR:Running code close to your users, not far away.
I once shipped a site that felt instant for me in California and sludgy for a customer in Australia. Same site. Same code. The only difference was distance.
Here's what was actually happening. My code lived on one server in one city. Every time that customer in Sydney clicked something, the request had to fly all the way to that one machine, get handled, and fly all the way back. Light is fast, but it isn't magic. A round trip across the planet, over and over for every click, adds up to a site that feels like it's thinking too hard.
The edge fixes this by spreading your code out. Instead of one server in one place, you've got copies sitting in dozens of cities around the world. When someone clicks, the request goes to whichever copy is nearest them, not the one back at headquarters.
Think of it like a coffee chain. The old way is one giant flagship store downtown, and everyone in the city has to drive in for a cup. The edge is a location on every other corner. Same coffee, same recipe, you just walk to the one down the block. Nobody's making a cross-town trip for an espresso.
If this sounds familiar, it's the same instinct behind keeping files close to people. The difference is what's getting moved:
- The file version keeps your stuff nearby. Images, videos, the logo, the heavy downloads. Static things that don't change. It's a warehouse of finished goods placed near every neighborhood.
- The edge keeps your code nearby. The actual logic that runs and makes decisions. Checking if you're logged in, picking which version of a page to show you, redirecting you somewhere. It's not just storing a finished thing close to you, it's doing the work close to you.
That second one is the leap. For a long time, the close-by copies could only hand you pre-made files. The real thinking still happened back at the one central kitchen. The edge moved a slice of the kitchen itself out to every corner.
So what do people actually run at the edge? The fast, lightweight stuff that should happen the instant you arrive:
Checking who you are. Are you logged in? Are you allowed in here? Decide it nearby instead of phoning home.
Sending you the right way. Mobile visitor goes here, someone in Germany sees prices in euros, an old link bounces to the new page.
Tweaking a page on the fly. Dropping in your name, your city, your language before the page even finishes loading.
The catch, and it's a real one: those little corner locations are small. A copy of a coffee shop on every block can't also house the roasting plant and the corporate accounting department. The edge is built for quick decisions, not heavy lifting. Your big database, your serious number-crunching, the stuff that needs real muscle, that still tends to live in one central spot. The edge handles the fast hellos. The heavy work happens out back.
Here's why you'd care even if you never touch the setting yourself. "Run it at the edge" is one of those phrases that sounds like a brag and is actually just a description: put the work near the person who asked for it. You already know this is smart. It's why the espresso on the corner beats the one downtown, every single time.