Embracing the 3-Month Rule: My Approach to Scalable Development
In the startup environment, advice like Paul Graham’s mantra to “do things that don’t scale” often gets tossed around, but the practical implementation of this concept in coding is rarely discussed. After eight months of working on my AI podcast platform, I’ve devised an effective strategy: each non-scalable hack is given a three-month lifespan. After that period, the hack must either validate its worth and be properly developed or be discarded.
As engineers, we frequently fall into the trap of creating scalable solutions right from the start, designing frameworks capable of supporting millions of users. This perspective can be limiting, especially for startups who might find that scalable code is simply a cycle of costly procrastination. The reality is, my approach compels me to produce straightforward, if imperfect, code that actually gets deployed, offering valuable insights into user needs.
My Smart Approach to Infrastructure Hacks
1. Unified Virtual Machine for Everything
I currently run my entire stack—including the database, web server, background jobs, and Redis—on a single $40 per month virtual machine with no redundancy and manual backups to my local machine.
This design choice has proven its effectiveness. In just two months, I gained deeper insights into my resource requirements than I would have by following conventional capacity planning guidelines. My platform, heavily focused on AI, rarely exceeds 4GB of RAM. The complex Kubernetes setup I was contemplating would have only served to manage idle containers. Each time the server crashes—something that has already happened twice—I gather real-world data on the cause, often uncovering unexpected issues.
2. Simple Hardcoded Configurations
My configuration utilizes straightforward hardcoded constants instead of cumbersome files or environment variables:
python
PRICE_TIER_1 = 9.99
PRICE_TIER_2 = 19.99
MAX_USERS = 100
AI_MODEL = "gpt-4"
Although modifying these constants requires redeploying the app, this method has its own advantages. I can easily search my entire codebase for any variable in seconds, and every change is documented in Git history. This setup has sufficed for the few adjustments I’ve made over the past three months, saving me countless hours compared to developing a configuration service.
3. Leveraging SQLite in Production
Surprisingly, my multi-user web application is powered by SQLite, with a database size of just 47MB. It supports