Re:Code Everywhere: Why We Built Cloudflare Workers
by bogomipz on Friday September 29, 2017 @12:43PM
(#15366844)
"Most peered"?
Another day another dubious Cloudflare marketing claim.
Participating in the most IXs does not mean you have the most BGP peers. Simply participating in an IX does not mean that every other participating network at that IX automatically agrees to peer with you. Using AMS-IX as an example:
"Every member or customer at AMS-IX is in the position to peer with any or all other connected ISP's although they are not required to"[1]
And this is pretty standard across all IXs.
For instance Facebook might be far down that chart regarding the number of IX fabrics they peer at but if 99% of of the participants at those agree to peer with them there then they are likely "more peered" than you.
Re:Code Everywhere: Why We Built Cloudflare Workers
by cavisne on Friday September 29, 2017 @12:01PM
(#15366455)
Very similar to lambda@edge
Trade offs I see
* Cloudflare is probably slightly closer to customers, but cloudfront is still very close
* lambda@edge should be cheaper with amazons scale and ecosystem
* cloudfront itself is very expensive compared to Cloudflare, almost every project can integrate Cloudflare and use this, where small projects don’t really make sense for cloudfront
Re:Code Everywhere: Why We Built Cloudflare Workers
by kentonv on Friday September 29, 2017 @04:05PM
(#15368680)
> lambda@edge should be cheaper with amazons scale and ecosystem
I suspect price will have more to do with the tech's underlying ability to scale to lots of (separately-sandboxed) customers at lots of edge locations. Our tech is pretty different from Amazon's so it will be interesting to see how that shakes out.
Re:Code Everywhere: Why We Built Cloudflare Workers
by Matheus28 on Friday September 29, 2017 @04:42PM
(#15369004)
It would be amazing if those workers supported WebSockets. Running game servers in them would be tempting, as long as they don't charge exorbitant prices for bandwidth.
Re:Code Everywhere: Why We Built Cloudflare Workers
by kentonv on Saturday September 30, 2017 @03:36PM
(#15374648)
WebSocket support is planned (not sure if it will be in v1).
The issue with game servers is that you probably need to make sure all the players in the same game instance hit the same worker. There won't be any way to do that with workers in v1. But, this is definitely something we've thought about, and as a big gamer myself I would like to see it happen someday. I have some particular ideas for a different kind of worker (not a Service Worker) that serves this use case. But it's probably a year out.
Re:Code Everywhere: Why We Built Cloudflare Workers
by kennethh on Friday September 29, 2017 @10:29AM
(#15365563)
This is pretty interesting, especially if one get some kind og local storage where one can cache the data from the users and also keep some extra data one need to handle the requests.
One can also imagine some kind of MQ solution that distribute to the edges and then updates the clients (for games and such scenarios)
Re:Code Everywhere: Why We Built Cloudflare Workers
by johansch on Friday September 29, 2017 @12:03PM
(#15366476)
I guess the most valuable while still feasible thing would be a distributed eventually consistent key-value store (ideally with no-nonsense pricing: just per pay read/write/delete, with a single unit cost regardless how small or big you are - but please do provide an efficient way to delete the entire db, unlike GC Datastore).
Maybe different tariffs based on the percentage of reads that you can serve locally, the average latency or something similar, in order to avoid having to replicate every piece of data to every edge?
Re:Code Everywhere: Why We Built Cloudflare Workers
by remline on Friday September 29, 2017 @05:24PM
(#15369356)
How does this deal with proxy loops?
As an example, I would assume worker is making requests with the internal view of the site, but can not have an internal view of other sites or security problems would ensue.. So what happens when two of my sites have service workers fetching something from each other on each request?
Re:Code Everywhere: Why We Built Cloudflare Workers
by kentonv on Friday September 29, 2017 @06:49PM
(#15369921)
As you guessed, when your worker makes a subrequest to your own zone, it goes directly to your origin server, but when you subrequest to some other domain, it goes in "the front door", and that other domain's scripts apply.
If a request bounces back such that the same worker script would need to run twice as a result of a single original request, then it fails with an error. There's nothing else we can do here: we can't let the request loop, but we also can't let it skip your script after it's bounced through a third-party script.
Re:Code Everywhere: Why We Built Cloudflare Workers
by Navarr on Friday September 29, 2017 @11:00AM
(#15365870)
Edge Side Includes. Imagine putting some sort of template syntax in a file, that file is cached, and when it's called from cache it grabs a file from the remote server based on the template syntax.
That's a bold claim. I'd expect Akamai, Google and Amazon to be peered at more locations, maybe even more. Or have they become that big?
https://bgp.he.net/report/exchanges#_participants
Another day another dubious Cloudflare marketing claim.
Participating in the most IXs does not mean you have the most BGP peers. Simply participating in an IX does not mean that every other participating network at that IX automatically agrees to peer with you. Using AMS-IX as an example:
"Every member or customer at AMS-IX is in the position to peer with any or all other connected ISP's although they are not required to"[1]
And this is pretty standard across all IXs.
For instance Facebook might be far down that chart regarding the number of IX fabrics they peer at but if 99% of of the participants at those agree to peer with them there then they are likely "more peered" than you.
[1] https://ams-ix.net/faqs
Trade offs I see
* Cloudflare is probably slightly closer to customers, but cloudfront is still very close
* lambda@edge should be cheaper with amazons scale and ecosystem
* cloudfront itself is very expensive compared to Cloudflare, almost every project can integrate Cloudflare and use this, where small projects don’t really make sense for cloudfront
I suspect price will have more to do with the tech's underlying ability to scale to lots of (separately-sandboxed) customers at lots of edge locations. Our tech is pretty different from Amazon's so it will be interesting to see how that shakes out.
The issue with game servers is that you probably need to make sure all the players in the same game instance hit the same worker. There won't be any way to do that with workers in v1. But, this is definitely something we've thought about, and as a big gamer myself I would like to see it happen someday. I have some particular ideas for a different kind of worker (not a Service Worker) that serves this use case. But it's probably a year out.
Maybe different tariffs based on the percentage of reads that you can serve locally, the average latency or something similar, in order to avoid having to replicate every piece of data to every edge?
> We are exploring adding data storage at the edge.
> I don’t see us going into hosting.
You must have your eyes closed then, because that's clearly pushing the camel nose into the Amazon lambda tent.
As an example, I would assume worker is making requests with the internal view of the site, but can not have an internal view of other sites or security problems would ensue.. So what happens when two of my sites have service workers fetching something from each other on each request?
If a request bounces back such that the same worker script would need to run twice as a result of a single original request, then it fails with an error. There's nothing else we can do here: we can't let the request loop, but we also can't let it skip your script after it's bounced through a third-party script.
Does this hold true even for subrequests to your own zone, where you say here that they go directly to the origin server?
Very interesting, especially since it allows for a Cloudflare ESI system.
Wonder if many will take advantage of it
That could do wonders both for the size of caches and for cache hit-rates