6 ms·
> do you have compute, do you have load balancing, do you have rbac, do you have DB? do you have storage? Yes, they have all of those things. They have a prett
by Strom 5y ago
> do you have compute, do you have load balancing, do you have rbac, do you have DB? do you have storage?
Yes, they have all of those things. They have a pretty decent webpage that goes into more detail. https://www.cloudflare.com/ https://www.cloudflare.com/
- Thaxll 5y agoThey have workers which are serverless which only work for a specific kind of application, how do I connect that app to a database? what do I do to get metrics / logs out of it, monitoring / alerts? as I said they have nothing even close to what cloud providers have.
- anaganisk 5y agoThat doesn’t answer the question at all? Cloudflare workers are just a glorified rule engine running on the nearest cache server, I still fail to see how a rule engine is supposed to be disrupting anything more than a static or a very simple web app.
- jgrahamc 5y agoNo, it's not. It allows you to run arbitrary code. It's not a rule engine.
- anaganisk 5y agoSo what? Whats the perceived benefit? How many apps can you run on a key value store? All use cases I came across are just glorified rule engines. If you say you can connect it to a DB, and your DB is still hosted on cloud somewhere else, what benefit does it provide in terms of speed?
- kentonv 5y agoDurable Objects[0] let you store data on the edge and provide a lot more than a key/value store. This is a primitive you could build arbitrary databases on top of. The edge chat demo[1] is a working, scalable real-time chat service hosted entirely on the edge using Workers + Durable Objects, even featuring per-user cross-room rate limiting. As written, it can support millions of chat rooms and users, and it's about 500 lines of code.[2] The benefit here is that it's much easier to build scalable distributed systems on Workers and Durable Objects than on other platforms. The fact that they run on the edge as close to end users as possible is just a bonus. [0] https://blog.cloudflare.com/introducing-workers-durable-objects/ https://blog.cloudflare.com/introducing-workers-durable-obje... [1] https://edge-chat-demo.cloudflareworkers.com/ https://edge-chat-demo.cloudflareworkers.com/ [2] https://github.com/cloudflare/workers-chat-demo/blob/master/src/chat.mjs https://github.com/cloudflare/workers-chat-demo/blob/master/... (Disclosure: I'm the tech lead for Cloudflare Workers.)
- anaganisk 5y agoGlad to hear from you, Not to simplify it too much but, So instead of user <-> server <-> user2 Its user <-> cache 1 <-> cache2 <-> user2 Instead of one layer, we now add two/multiple layers and with eventual consistency. I understand this is how distributed systems are supposed to work. But, I wonder why should anyone build a Database on top of a propriety storage engine. Until there is much more it can do, its mostly a key value store. I don’t mean to say cloud workers are useless, but they have a niche, its not something that would disrupt how apps are built at-least in the state it is. Also on a side note LoC mean nothing, it may be a good MVP metric. You could implement twitter MVP in 1000 LoC, but there is lot running behind the scenes. There are edge cases.
- kentonv 5y agoThe chat demo I mentioned is strongly consistent and does not use cache at all.
- anaganisk 5y agoEither im missing something here or something doesn’t make sense. How can something be a distributed system but be a strongly consistent system? Unless may be they lock all the instances of that object, in that case there is a performance penalty. But reading into the docs, They say that all clients subscribe to an object which is globally unique, and has only one instance. And cloudflare migrates it between regions intelligently. If thats the case, lets say there is User A (in US) and User B(in UK). Where is that globally unique object instance (chat) stored. It cant be edge here nor distributed, if its a single instance. If its distributed then there is no strong consistency, unless locks(there is a penalty to it)along with latency to sync data.
- kentonv 5y agoEach individual chat room is backed by a Durable Object, which is located in one location at a time, and strongly consistent. If the users of the chat room are all in one region, the chat room object can be expected to be located there. If users of a particular room are distributed around the world, Cloudflare will have to do its best to choose a location for the object "somewhere in the middle" -- but that's still better than just putting everything in us-east-1 or whatever.