🚀 I Scaled a .NET App Toward 1M Users — Here’s What Actually Matters
When we started, performance wasn’t a priority.
🚀 I Scaled a .NET App Toward 1M Users — Here’s What Actually Matters

NET App Toward 1M Users.
When we started, performance wasn’t a priority.
“We’ll optimize later.”
Later came fast.
At ~20K users:
- APIs slowed down
- Database CPU hit 80%
- Random timeouts started
- Cloud bill doubledThat’s when I learned:
Scaling a .NET app isn’t about bigger servers.
It’s about smarter architecture.
Here’s what actually made the difference 👇
1️⃣ Async Isn’t Optional
Blocking calls kill scalability.
If your ASP.NET Core app uses:
.Result
.Wait()
You’re limiting concurrency.
Async isn’t about speed.
It’s about throughput.
2️⃣ 80% of “Performance Issues” Are Database Issues
We didn’t need more CPU.
We needed:
- Proper indexes
- No N+1 queries
.AsNoTracking()for reads- Pagination
One index reduced an endpoint from 1.9s → 220ms.
Let that sink in.
3️⃣ Caching Is a Superpower
Adding Redis:
- Reduced DB load by ~60%
- Improved response times instantly
- Stabilized traffic spikes
Most apps over-query the database.
Cache your expensive reads.
4️⃣ Stop Returning Massive Payloads
If your endpoint returns 10,000 rows…
You don’t have a scaling strategy.
You have a future outage.
Pagination + filtering changed everything.
5️⃣ Move Heavy Work Out of Controllers
Never do this inside an API request:
- Send emails
- Generate reports
- Process large files
We moved tasks to background jobs (Hangfire).
Result:
- Faster APIs
- More stable system
- Better user experience
6️⃣ Stateless Apps Scale. Stateful Apps Break.
At ~100K users we learned:
If your app depends on in-memory session state…
You cannot scale horizontally.
Use:
- Redis
- Distributed cache
- Cloud storage
Then add more instances behind a load balancer.
That’s real scalability.
7️⃣ Measure Before You Optimize
We thought our code was slow.
It wasn’t.
The bottleneck was:
- One bad query
- Missing index
- Logging overload
Observability > assumptions.
Use:
- OpenTelemetry
- Application Insights
- Structured logging
The Biggest Lesson?
We didn’t rewrite the app.
We didn’t migrate away from .NET.
We improved architecture step by step.
.NET 8/9 is insanely fast.
But performance is a discipline — not a framework feature.
If you’re building with ASP.NET Core in 2026, remember:
✅ Async everywhere ✅ Index your database ✅ Cache aggressively ✅ Paginate everything ✅ Use background jobs ✅ Stay stateless ✅ Measure constantly
Do this early…
And 1M users becomes an engineering milestone —
Not a production nightmare.
If you’re building a .NET app right now:
What’s your biggest scaling challenge?
Let’s discuss 👇
dotnet #aspnetcore #softwarearchitecture #performance #programming
👉 Be sure to clap and follow the writer ️👏️️
👉 Follow us: **Linkedin| [Medium](https://medium.com/@bharat.chandera)**
메타데이터
- post_id
- 937b5ea9c8a9
- slug
- i-scaled-a-net-app-toward-1m-users-heres-what-actually-matters-937b5ea9c8a9
- url
- https://medium.com/c-sharp-programming/i-scaled-a-net-app-toward-1m-users-heres-what-actually-matters-937b5ea9c8a9
- canonical_url
- https://medium.com/c-sharp-programming/i-scaled-a-net-app-toward-1m-users-heres-what-actually-matters-937b5ea9c8a9
- author_url
- https://medium.com/@bharat.chandera
- status
- ok
- fetched_at
- 2026-08-19 03:24:48