Live data from Hacker News

Durable Objects in Production

linc.sh

51–58 of 58 posts

Re: Durable Objects in Production

#51
post #42

So is it CA or CP? No, just C.

Being "partition tolerant" just means the other aspect holds: CP means "consistent in case of a partition", while AP means "available in case of a partition".

A CP system cannot be available in both partitions, since by definition the two partitions cannot communicate (otherwise they wouldn't be partitions) and thus it's logically impossible for two clients in two different partitions to affect a shared state consistently. Thus at least in one partition the service will be unavailable.

Forcing all state changes go through a single "master^Wmain" node (for some key/shared) is a simple way to achieve CP.

This main node can change over time, but in case if a partition it can never move to side of the partition which has no quorum for a master election.

Re: Durable Objects in Production

#52
post #2

Are there any large companies that use cloudflare workers in production?

I run an agency and we’ve implemented Cloudflare Workers in production for very large companies, including doing the implementation for two of the big companies listed in the sibling comments on this thread.

It works very well and their CLI tool Wrangler is easy to integrate into CI/CD. We’ll probably use it for more. Happy to answer questions people have: matt@happycog.com

Re: Durable Objects in Production

#54
post #38

Earlier quoted context omitted.

It could get expensive fast. Also with paid Workers and no stop loss what happens if someone decide to ddos your app? I searched for this and come away with no clear answers. Also wondering where will Worker KV fit in? From what I gather Durable Objects are strictly superior if pricing will be comparable.

We don’t charge for malicious traffic like DDoS. Compares favorably to other cloud providers who do.

It is reassuring to hear that, could this feature in the docs somewhere? For example when I'm researching this issue this is what comes up as the first result.

https://community.cloudflare.com/t/how-to-protect-cloudflare...

Workers Free Tier fail modes are straightforward and preferable for some of the scenarios I would use them for, but KV is only enabled by using Bundled.

Re: Durable Objects in Production

#55
@glen - hey great piece!

Wondering if you've also tried the newer real-time sync services like replicache.dev or roomservice.dev for this usecase? since it seems to do the same thing except client-side. also on server-side curious if you've evaluated Temporal.io

Re: Durable Objects in Production

#56
This is a great write up, thanks for sharing it! I’ve built out a similar websockets on AWS setup at work to what they show at the end, and it’s definitely not as nice as this looks to work with. That was really just an MVP to push live results, I’d like to extend it to do logs/progress eventually but I’ll definitely evaluate Durable Objects before adding anything to that solution because this looks way better and cleaner.

Is there any sort of run it locally for testing story yet? In theory paid localstack supports websocket API gateways on the AWS side, though I haven’t played with that yet either so not sure how good it is. Looking at the API being used and the fact it’s all dynamic JS land, it looks like maybe you could inject some implementations in to run the websockets and store some state locally?

Re: Durable Objects in Production

#57

Earlier quoted context omitted.

I'm on the Cloudflare Workers team and while I can't help you get access any quicker than the usual route through the form, I'd still love to hear about your specific usecase(s) and limitations. Is it okay if I email you?

Does there happen to be a local simulator one could use to build out an app?

I started building one of these as a weekend project on top of SQLite for funsies but I abandoned it during the election chaos. Oh well.

Re: Durable Objects in Production

#58
post #55

@glen - hey great piece! Wondering if you've also tried the newer real-time sync services like replicache.dev or roomservice.dev for this usecase? since it seems to do the same thing except client-side. also on server-side curious if you've evaluated Temporal.io

I have not! It was never such a pressing issue that I investiaged a dedicated solution. But given that we're already using Cloudflare, and that this is a solution to a much bigger problem (global coordination + actual storage), but it works really nicely for our smaller usage, it felt like a nice way to dip a toe into this new model.
Post reply on HN