| You are replying to a message that very explicitly didn't say "A bunch of server functionality". Specifically, it said: > Custom authentication You can most definitely authenticate requests based on signed tokens and the like, meaning you don't necessarily need to reach any other component in the system. > personalize ads Same here. You can most definitely pick different adds depending on some cookie value or such, no need to reach anywhere. Even if you want to track what ads you've served, that can be done _after_ the response is sent to the user, meaning the extra latency of going to your persistence layer isn't perceived by the user. > localize content Again, you can have your translations in your edge function (or some edge cache if that platform supports it) and apply them at the edge. Admittedly this sounds like the shakiest use-case. > intercept and transform requests You can implement redirections, security headers, etc. in this layer. No need to go to your persistence layer. > perform split tests Same idea here. You can have multiple versions of (cached) pages and serve one or the other depending on the user's cookies, ip (country?), some frequency, etc. You may be doing all these things from your backend layer, which is arguably easier, but it doesn't mean that they can't be offloaded to the edge and have a positive impact. |
Right, let's see...
> You can most definitely authenticate requests based on signed tokens and the like
Sure, you can, you just have to give up the ability ever invalidate tokens
> personalize ads
How can this not just be done on the client?
> localize content
How can this not just be done on the client?
> intercept and transform requests
How can I implement redirections and security headers here? What context does the Edge function have to do something meaningful here that couldn't have been done on the client?
> perform split tests
I would prefer to serve my static content from static content hosts with caching capabilities, not Edge functions
I am saying this: Edge functions and serverless are loss-leaders for cloud vendors to get you to integrate deeply into their systems. Using them for their tiny, imperceptible gains in the face of the massive engineering efforts (complexity) and risk of vendor lock-in is ridiculous. These use-cases do not justify binding yourself to a cloud vendor.