HNHacker News
TopNewBestAskShowJobs

NathanFlurry

577 karma · joined September 16, 2016

Building Rivet Actors, a fast, high-density and scalable orchestrator.

https://rivet.dev

submissionscomments
NathanFlurry··on Thoughts on Cloudflare
I’ve been building an open-source alternative at https://github.com/rivet-dev-engine

It’s the only bit of the Cloudflare stack (afaik) that did not have an open-source alternative for the JS ecosystem. I built heavily with DO on another OSS project, but realized it was incredibly problematic that our customers couldn’t truly self-host.

NathanFlurry··on Containers are available in public beta for simple, and programmable compute
A 1 CPU + 2 GB of RAM + 50 GB ephemeral storage on Cloudflare Containers is $74.90.

The same on Fly Machines is $31.00 (performance-1x, varies by region). Fly Machines has the same sleeping functionality as Cloudflare.

Rivet Containers also has a similar price point of $29.40, but takes a different approach to sleeping (opts for optimizing coldstarts + autoscaling over snapshotting). (I work at Rivet)

NathanFlurry··on Containers are available in public beta for simple, and programmable compute
They stated on the livestream they're considering TCP, but I suspect UDP is not coming soon since Workers themselves don't support UDP. All traffic going to Cloudflare Containers must be "proxied" through the Workers platform.
NathanFlurry··on Containers are available in public beta for simple, and programmable compute
We published an in-depth comparison between Cloudflare Containers, Fly Machines, and Rivet Containers: https://rivet.gg/blog/2025-06-24-cloudflare-containers-vs-ri...

(I work at Rivet)

NathanFlurry··on What would a Kubernetes 2.0 look like
Our self-hosting docs are very rough right now – I'm fully aware of the irony given my comment. It's on our roadmap to get them up to snuff within the next few weeks.

If you're curious on the details, we've put a lot of work to make sure that there's as few moving parts as possible:

We have our own cloud VM-level autoscaler that's integrated with the core Rivet platofrm – no k8s or other orchestrators in between. You can see the meat of it here: https://github.com/rivet-gg/rivet/blob/335088d0e7b38be5d029d...

For example, Rivet has an API to dynamically spin up a cluster on demand: https://github.com/rivet-gg/rivet/blob/335088d0e7b38be5d029d...

Once you start the Rivet "seed" process with your API key, everything from there is automatic.

Therefore, self-hosted deployments usually look like one of:

- Plugging in your cloud API token in to Rivet for autoscaling (recommended)

- Fixed # of servers (hobbyist deployments that were manually set up, simple Terraform deployments, or bare metal)

- Running within Kubernetes (usually because it depends on existing services)

NathanFlurry··on What would a Kubernetes 2.0 look like
I hope this isn't the case here with Rivet. I genuinely believe that Kubernetes does a good job for what's on the tin (i.e. container orchestration at scale), but there's an evolution that needs to happen.

If you'll entertain my argument for a second:

The job of someone designing systems like this is to decide what are the correct primitives and invest in building a simple + flexible platform around those.

The original cloud primitives were VMs, block devices, LBs, and VPCs.

Kubernetes became popular because it standardized primitives (pods, PVCs, services, RBAC) that containerized applications needed.

Rivet's taking a different approach of investing in different three primitives based on how most organizations deploy their applications today:

- Stateless Functions (a la Fluid Compute)

- Stateful Workers (a la Cloudflare Durable Objects)

- Containers (a la Fly.io)

I fully expect to raise a few hackles claiming these are the "new primitives" for modern applications, but our experience shows it's solving real problems for real applications today.

Edit: Clarified "original cloud primitives"

NathanFlurry··on What would a Kubernetes 2.0 look like
The #1 problem with Kubernetes is it's not something that "Just Works." There's a very small subset of engineers who can stand up services on Kubernetes without having it fall over in production – not to mention actually running & maintaining a Kubernetes cluster on your own VMs.

In response, there's been a wave of "serverless" startups because the idea of running anything yourself has become understood as (a) a time sink, (b) incredibly error prone, and (c) very likely to fail in production.

I think a Kubernetes 2.0 should consider what it would look like to have a deployment platform that engineers can easily adopt and feel confident running themselves – while still maintaining itself as a small-ish core orchestrator with strong primitives.

I've been spending a lot of time building Rivet to itch my own itch of an orchestrator & deployment platform that I can self-host and scale trivially: https://github.com/rivet-gg/rivet

We currently advertise as the "open-source serverless platform," but I often think of the problem as "what does Kubernetes 2.0 look like." People are already adopting it to push the limits into things that Kubernetes would traditionally be good at. We've found the biggest strong point is that you're able to build roughly the equivalent of a Kubernetes controller trivially. This unlocks features more complex workload orchestration (game servers, per-tenant deploys), multitenancy (vibe coding per-tenant backends, LLM code interpreters), metered billing per-tenant, more powerful operators, etc.

NathanFlurry··on Cloudflare service outage June 12, 2025
This post did not mention the "external storage backend."

It's assumed that the "external storage backend" is Google Cloud Storage, since they also use it for Durable Objects storage: https://youtu.be/C5-741uQPVU?si=yOX-6gRzTbIhh34h&t=1725 (this video is worth the watch on their neat arch for Durable Objects SQLite)

Similarly, their data subprocessors lists Google for the developer platform platform: https://www.cloudflare.com/gdpr/subprocessors/cloudflare-ser...

And aligns with the Google Cloud Storage incident: https://status.cloud.google.com/incidents/ow5i3PPK96RduMcb1S...

NathanFlurry··on Show HN: ActorCore – Stateful serverless framework that runs anywhere
Appreciate the kind words!

I see ActorCore as picking up on PartyKits vision where they left off after acquisition by Cloudflare. Here's a few of the few things we've added to ActorCore:

- Full TypeScript type safety for calling actions on actors – PartyKit provides raw WebSocket messages instead

- Streamlined state persistence – PartyKit requires using low-level storage calls for persistence

- Flexible scheduling API – PartyKit exposes the single alarm from Cloudflare instead

- Simpler "functional" API – you might prefer PartyKit if you prefer using ES6 classes

- Upcoming SQLite features & deep integrations for features like auth & local-first sync will make it easier to ship quickly

- Not vendor-locked to Cloudflare

PartyKit already has a few integrations that is on our roadmap, such as Yjs

Curious to hear your experience using both.

NathanFlurry··on SQLite File Format Viewer
I've been enjoying watching you build this on X – nice work.
NathanFlurry··on Turso SQLite Offline Sync Public Beta
Can you elaborate on both of these issues?

Vanilla SQLite solved multiple writers a long time ago when they introduced WAL in 2010. Does Turso not support this?

Is the issue with foreign keys that they're not enabled by default?

NathanFlurry··on Ask HN: What are you working on? (March 2025)
Neat! How does this differ from KSQL?
NathanFlurry··on SQLite-on-the-server is misunderstood: Better at hyper-scale than micro-scale
Yep. Most designs I've seen put user profiles under a different table which requires a separate query.
NathanFlurry··on SQLite-on-the-server is misunderstood: Better at hyper-scale than micro-scale
Author here! I agree it's very similar to the actor model, but I kept the article's scope small, so I didn’t cover that.

In fact – Durable Objects talks a bit about its parallels with the actor model here: https://developers.cloudflare.com/durable-objects/what-are-d...

You might also appreciate this talk on building a loosely related architecture using Erlang, though it doesn't implement an actor-per-database pattern – https://www.youtube.com/watch?v=huGVdGLBJEo

NathanFlurry··on SQLite-on-the-server is misunderstood: Better at hyper-scale than micro-scale
Author here, love this take.

I've chatted with a few medium-sized companies looking at Durable Objects for this reason. DB-per-tentant removes much of the need for another dedicated team to provision & maintain infrastructure for the services. It's almost like what microservices were trying to be but fell woefully short of achieving.

It's disappointing (but understandable) that "serverless" received a bad rap. It's never going to fully replace traditional infrastructure, but it does solve a lot of problems.

NathanFlurry··on SQLite-on-the-server is misunderstood: Better at hyper-scale than micro-scale
Fair point, noted.
NathanFlurry··on SQLite-on-the-server is misunderstood: Better at hyper-scale than micro-scale
Hopefully, it matures into a healthy open-source ecosystem that doesn’t rely on proprietary databases.

More companies than people realize are already building and scaling with DO SQLite or Turso internally. Almost every company I've talked to that chooses Postgres hits scaling issues around Series A — these companies aren’t.

NathanFlurry··on SQLite-on-the-Server Is Misunderstood: Better at Hyper-Scale Than Micro-Scale
If you care only about serverless, databases like PlanetScale, CockroachDB Cloud, and DynamoDB work well.

The biggest strength of using SQLite here is that it provides the benefits of a familiar SQL environment with the scaling benefits of Cassandra/DynamoDB.

NathanFlurry··on SQLite-on-the-server is misunderstood: Better at hyper-scale than micro-scale
The two tables are intended to be part of the same "chat" partition (ie SQLite database). You can join them with a native SQLite query. Seems I should make this more clear.

Cheers

NathanFlurry··on SQLite-on-the-server is misunderstood: Better at hyper-scale than micro-scale
Author here.

To clarify — is your concern that the only scaling options I listed are proprietary services?

If so, I completely agree. This article was inspired by a tool we're building internally, based on the same architecture. We knew this was the right approach, but we refuse to rely on proprietary databases, so we built our own in-house.

We’re planning to open-source it soon.

NathanFlurry··on SQLite-on-the-server is misunderstood: Better at hyper-scale than micro-scale
This seems to be the biggest hesitation I've heard over and over by far. There absolutely needs to be a good story here for both (a) ad-hoc cross-partition queries and (b) automatically building a datalake without having to know what ETL stands for.

However, this isn't so much different from Cassandra/DynamoDB which have a similar problem. You _can_ query cross-partition, but it's strongly discouraged and will strain any reasonably sized cluster.

NathanFlurry··on SQLite-on-the-server is misunderstood: Better at hyper-scale than micro-scale
Great Scott!
NathanFlurry··on SQLite-on-the-server is misunderstood: Better at hyper-scale than micro-scale
Yep.

Nile (https://www.thenile.dev/) is trying to address this use case with a fully isolated PG databases. Though, I don't know how they handle scaling/sharding.

NathanFlurry··on SQLite-on-the-Server Is Misunderstood: Better at Hyper-Scale Than Micro-Scale
DuckDB crushes SQLite in heavy data workloads according to ClickBench by 915x. (Link below since it's looong.)

DuckDB also has a WASM target: https://duckdb.org/docs/stable/clients/wasm/overview.html

I don't know enough about DuckDB to understand the tradeoffs it made compared to SQLite to achieve this performance.

https://benchmark.clickhouse.com/#eyJzeXN0ZW0iOnsiQWxsb3lEQi...

NathanFlurry··on SQLite-on-the-Server Is Misunderstood: Better at Hyper-Scale Than Micro-Scale
I think the other comments have the application-level approaches covered.

However, I suspect the infrastructure will provide this natively as it matures:

- Cloudflare will probably eventually add read replicas for Durable Objects. They're already rolling it out for D1 (their other SQLite database offering). [1]

- Turso has their own story for read replicas. [2]

[1] https://blog.cloudflare.com/building-d1-a-global-database/#s... [2] https://docs.turso.tech/features/embedded-replicas/introduct...

NathanFlurry··on SQLite-on-the-server is misunderstood: Better at hyper-scale than micro-scale
Author here.

Agreed — I think adding some comparisons to other database partitioning strategies would be helpful.

My 2 cents, specifically about manually partitioning Postgres/MySQL (rather than using something like Citus or Vitess):

SQLite-on-the-server works similarly to Cassandra/DynamoDB in how it partitions data. The number of partitions is decoupled from the number of databases you're running, since data is automatically rebalanced for you. If you're curious, Dagster has a good post on data rebalancing: https://dagster.io/glossary/data-rebalancing.

With manual partitioning, compared to automatic partitioning, you end up writing a lot of extra complex logic for:

- Determining which database each piece of data lives on (as opposed to using partitioning keys which do that automatically)

- Manually rebalancing data, which is often difficult and error-prone

- Adding partitions manually as the system grows

- (Anecdotally) Higher operational costs, since matching node count to workload is tricky

Manual partitioning can work fine for companies like Notion, where teams are already invested in Postgres and its tooling. But overall, I think it introduces more long-term problems than using a more naturally partitioned system.

To be clear: OLTP databases are great — you don’t always need to reach for Cassandra, DynamoDB, or SQLite-on-the-server depending on your workload. But I do think SQLite-on-the-server offers a really compelling blend of the developer experience of Postgres with the scalability of Cassandra.

NathanFlurry··on SQLite-on-the-server is misunderstood: Better at hyper-scale than micro-scale
I (sort of) disagree. Cassandra- & DynamoDB-based systems which are also partitioned do fine without a central OLTP DB.

Wrote a bit about it here: https://news.ycombinator.com/item?id=43246212

NathanFlurry··on SQLite-on-the-server is misunderstood: Better at hyper-scale than micro-scale
> Is it even realistic to depend on transactional guarantees, with hundreds of services hammering the DB(s) more or less concurrently?

If a single request frequently touches multiple partitions, your use cases may not work well.

It's the same deal as Cassandra & DynamoDB: use cases like chat threads or social feeds fit really well because there's a clear ownership hierarchy. e.g. message belongs to a single thread partition, or a social post belongs to a feed partition.

NathanFlurry··on SQLite-on-the-server is misunderstood: Better at hyper-scale than micro-scale
> The obvious caveat here is any situation where you need global tables

A lot of people still end up storing data that's not frequently updated in a traditional OLTP database like Postgres.

However:

I think it always helps to think about these problems as "how would you do it in Cassandra/DynamoDB?"

In the case of Cassandra/DynamoDB, the relevant data (e.g. user ID, channel ID, etc) is always in the partitioning key.

For Durable Objects, you can do the same thing by building a key that's something like:

``` // for a simple keys: env.USER_DO.idFromName(userId);

// or for composite keys: env.DIRECT_MESSAGE_CHANNEL_DO.idFromName(`${userAId}:${userBId}`); // assumes user A and B are sorted ```

I've spoken with a lot of companies using _only_ this architecture for Durable Objects and it's working well.

NathanFlurry··on SQLite-on-the-server is misunderstood: Better at hyper-scale than micro-scale
This.

> In this case I think you can let them become inconsistent in the face of, e.g., write errors.

For devs using CF Durable Objects, people frequently use CF Queues or CF Workflows to ensure that everything is eventually consistent without significant overhead.

It's a similar pattern to what large cos already do at scale with keeping data up to date across multiple partitions with Cassandra/DynamoDB.

← PreviousPage 2 of 4Next →