Video generator. Part 2
In a week, quick and dirty, I built a version I was proud of.
Instances spun up on their own. Got picked by the right criteria. Exactly what was needed got loaded onto them. Generation started. Claude Code pulled it off — take it and be happy.
Then my partner and I sat down to talk about scale. What volume we were really counting on.
I reframed the task and asked Claude Code one question: "What happens if we spin up 100–200 instances at once? What if there are 1,000 users? 10,000, and all of them constantly generating and redoing things?"
️ The answer flattened me. My version was good for nothing.
What I had built was a monolith. Scheduler, queue, instance pool, auto-provisioning — all in one process. With one user it works. With a thousand it goes down. One crashed worker drags everything down with it.
What actually came out:
The problem wasn't the code. Claude Code wrote the code fine. The problem was that I didn't ask the right question at the start. I was asking "make it work", when it should have been "make it not fall over under load".
I rebuilt it as a distributed setup. A small registrar that only distributes tasks among separate workers. Workers spin up automatically for each task. A flood of requests no longer takes the whole project down.
Rule: scale isn't an optimization at the end. It's the first question you ask while the version is still quick and dirty. Ask late — you rewrite everything.