Day 2 : Scaling Your E-Commerce App: From Prototype to Startup
Hey, you’re back! I’m glad you’re enjoying the art of system design.
In the last blog, we built an e-commerce application from scratch. But now, let’s take it to the next level — turning it into a full-fledged startup that people can use.
To make this transition, we need to make some critical architectural decisions that will define how our app performs and scales.
Your app’s code is ready, and you’re all set to deploy it. But then, your friend asks:
“Where should I deploy this? I’m confused about where to host my code.”
This is where we make our first major tech decision:
On-Premise vs. Cloud ☁️
At this point, you have two choices:
- On-Premise Hosting — Running the app on a physical server you own.
- Cloud Hosting — Renting infrastructure from a cloud provider (AWS, GCP, Azure, etc.).
Why Not Use a Spare Computer? 🤔
You might think: “Why not just use an old laptop or a desktop lying around, connect it to the internet, and serve requests?”
In theory, it sounds simple. But in reality, self-hosting comes with serious drawbacks:
- Hardware failures: If your system crashes, recovery is complicated.
- Power & connectivity issues: A power outage or internet downtime could make your app unavailable.
- Scaling challenges: If demand increases, adding more resources is not easy.
For a small-scale service, this might be manageable. But for a professional, reliable application, a cloud-based managed solution is the way to go.
Choosing Cloud: Managed vs. Self-Managed Hosting
Even within the cloud, there are two major approaches to hosting:
1️⃣ Self-Managed Cloud Server (IaaS — Infrastructure as a Service)
- You rent a cloud server (like an EC2 instance on AWS).
- You manage the deployment, configurations, and maintenance.
- You handle crashes, scaling, and security updates.
💡 Pros:
✅ More control over the infrastructure.
✅ Can be cheaper than fully managed solutions at scale.
⚠️ Cons:
❌ Requires manual setup and maintenance.
❌ If the server crashes, you have to restart it.
2️⃣ Fully Managed Cloud (PaaS — Platform as a Service / FaaS — Function as a Service)
- You focus only on writing code and let the cloud provider manage the rest.
- AWS Lambda, Google Cloud Functions, or Firebase handle execution, scaling, and maintenance.
- You don’t manage servers or worry about infrastructure.
💡 Pros:
✅ No server management — just write and deploy code.
✅ Auto-scaling — scales up and down based on traffic.
✅ Pay only for usage — no idle costs.
⚠️ Cons:
❌ Can be more expensive for high traffic.
❌ Might have higher response time due to cold starts.
Server vs. Serverless
Once you decide on cloud hosting, the next question is: Do you need a traditional server, or should you go serverless?
✅ Advantages of Serverless
Ease of Use
- No setup — Deploy code instantly.
- Auto-scaling — Handles traffic spikes effortlessly.
- No maintenance — No OS updates or infrastructure worries.
Cost Efficiency
- Pay-as-you-go — No cost for idle servers.
- Great for startups with unpredictable traffic.
⚠️ Drawbacks of Serverless
1️⃣ Cost at Scale
- If your app grows very large, a dedicated server may be more cost-effective.
- Example: If you’re paying $10 for 10,000 requests in serverless, you might handle the same load for $5 on a managed instance.
2️⃣ Cold Starts & Latency
- Serverless functions don’t run continuously — they spin up on demand.
- During high-traffic events like Diwali sales or new year, this may introduce a delay.
- With self-managed servers, you can pre-allocate capacity to avoid slow response times.
Final Decision: Why Serverless?
For a small startup like ours, serverless is the best choice because:
✅ We don’t need to manage infrastructure.
✅ We only pay for what we use.
✅ It automatically scales with demand.
As we grow, we can re-evaluate and switch to a hybrid or managed instance approach if needed.
Conclusion

Choosing cloud over on-premise and serverless over self-managed servers simplifies deployment, ensures reliability, and keeps costs manageable.
📌 Key Takeaways:
- Avoid self-hosting unless you’re running a hobby project.
- Cloud is the way to go for reliability and scalability.
- Serverless is great for startups because of low maintenance and automatic scaling.
That’s it for this blog! Hope you loved it.
See you in the next one! 👋