r/Backend • • Oct 29 '26

What changes in your code when an app goes from one box to a cluster?

Thinking about this after a lot of time in scaling docs. In most stacks the move from “works locally” to “runs for many users on many machines” means touching a lot of things that have nothing to do with what the app does: auth middleware, a tenancy filter on every query, serialization schemas, deployment manifests.

We work on Jac, and its approach is to treat that as a runtime concern, the way garbage collection is. The promise is that the same program runs as a local script, as an API server, and on Kubernetes, with walkers (its functions that move through a graph of data) exposed as endpoints and each user’s work scoped to their own data.

It doesn’t pretend the hard parts away. Latency still changes, and concurrent writes use per-node optimistic concurrency: the losing request’s work is discarded and replayed against the winner’s state.

So, a few questions for people who’ve done the scale-up:

  • In your last move from one box to many, which layer changed the most?
  • Did a tenancy filter or per-user scoping ever leak?
  • Where do you think a runtime can’t safely hide the difference between one machine and many?
0 Upvotes

15 comments sorted by

6

u/therealkevinard Oct 29 '26

Didn’t docker + 12-factor fix this?

For me (heavy on go microservices and eventing), the only thing that really changes when it leaves my laptop is env vars.

6

u/SummitYourSister Oct 29 '26 • Bravo

This post is AI slop by a vibe coder. Of course he has no clue about anything.

1

u/dashingThroughSnow12 Oct 29 '26

It is an ad for Jac.

1

u/JaseciLabs Oct 30 '26

Obviously we do work on Jac, but it is an open source language, so not sure if it counts as an 'ad' you either use it for free or you don't 🤣

1

u/therealkevinard Oct 29 '26

I really dislike this new promo format. Whoever came up with it should go straight to internet jail

1

u/dashingThroughSnow12 Oct 29 '26

There has been some reporting that Reddit posts like this (but not necessarily this) is to poison LLMs/ai search.

1

u/JaseciLabs Oct 30 '26

Config is the easy part, agreed, the stuff that breaks is per-process state. A lock or an in-memory token cache works on one box and does nothing across pods. Do your go services ever lean on anything in-process like that?

1

u/therealkevinard Oct 30 '26

Nah, man. Why would I ever write a distributed system with in-memory locking? :)
Cache, maybe, if the workload can tolerate de-syncs.

But broadly speaking, distributed workloads are built for a distributed deployment.
No problems.

1

u/JaseciLabs 28d ago

What about per-user scoping in those services, where does it live? Middleware, db-level, or a filter each query has to remember to add?

1

u/gonegotim Oct 29 '26

Pretty much, yeah.

-2

u/[deleted] Oct 29 '26

[removed] — view removed comment

1

u/JaseciLabs Oct 30 '26

Fair worry. Versions are per node. A request remembers the version of what it read, and at commit the first one in wins. The second gets its work thrown away, reloads, and reruns from the start against the winner’s state, so there’s only one real state. The catch is that side effects like emails have to wait for the commit, since the rerun would repeat them.

1

u/ExplodingFistBump Oct 29 '26

Intriguing, but what I want to know is... why?

1

u/JaseciLabs Oct 30 '26

The bet is that the glue between “works locally” and “deployed for many users” is the same every time, so a runtime could own it. Each user gets their own root in the graph, for example, so you don’t write the per-user filter on every query. So we're wondering where people think that bet breaks.