Scaling a hobby project is rarely about serving millions of requests. It is about deciding whether the next problem is solved by adding structure or by removing it. Sometimes the right move is a supervisor and a second module; sometimes it is deleting a database and hardcoding three values.
Name the axis you are scaling
Projects grow in different directions and each one has its own fix. Write down which of these is actually hurting: amount of data, number of concurrent tasks, number of features, or number of people reading the code. A project with too many features does not need a faster query, and a project processing gigabytes does not need better module names.
If you cannot say which axis it is, you are guessing. Guessing usually means adding a technology you read about rather than solving the problem in front of you.
Scaling up without turning into a framework
Grow in small steps and keep the application boundary visible. The first step is almost always to extract the messy part into its own module with a narrow public function. The second is to add a supervisor around the piece that must keep running. The third is to make slow work asynchronous with a Task.
- Replace a hand-rolled loop of processes with one supervised pool.
- Move configuration out of code and into a single module that reads it once.
- When data outgrows memory, introduce a store — but only the one you need.
- Split into an umbrella only when two apps genuinely deploy or version separately.
Umbrella projects feel like progress and often just add folders. Keep one application until a second one has a clear reason to exist.
Scaling down on purpose
Shrinking is underrated. If a project has stalled, delete the part that generates the most decisions and the least value. Replace the database with a JSON file, replace the queue with a function call inside the request, replace the generic pipeline with two hardcoded branches. You can always put the machinery back once the feature earns it.
Keep a note of what you removed and why. Otherwise the same abstraction creeps back in six weeks, and you will not remember that it was already tried.
Measure before restructuring
Elixir gives you cheap measurement tools. Time a function with :timer.tc, count messages in a process with a counter, watch memory with the observer. A single slow call is usually a call made too often, and caching it is cheaper than re-architecting around it.
Measure the specific thing you complained about. “The app is slow” is not a measurement; “the report takes four seconds and two of them are in one query” is one you can act on.
Pick the version you can still explain
The best architecture is the smallest one that solves today’s problem and does not lie about tomorrow’s. When in doubt, choose the version a friend could understand in ten minutes, ship it, and let real use tell you where to grow. Scaling is a series of small, reversible decisions, not one big rewrite.