Last month, we crossed a major milestone: 10 million active users. This post shares our journey scaling our infrastructure to handle this growth.
The Challenge
When we started with 100k users, our monolithic Rails app on a single EC2 instance worked fine. But as we grew, response times increased from 200ms to 3 seconds during peak hours.
Our Approach
We broke down the monolith into microservices:
- User Service - Authentication and profile management
- Content Service - Posts, comments, media uploads
- Analytics Service - Real-time metrics and dashboards
- Notification Service - Email, push, in-app notifications
Technology Stack
We migrated to Kubernetes on AWS EKS, with PostgreSQL for relational data and Redis for caching. Our CDN (CloudFront) now serves 95% of static assets, reducing origin load significantly.
Results
After the migration:
- Average response time: 120ms (down from 3s)
- 99th percentile: 450ms
- Database queries optimized with proper indexing
- Infrastructure cost per user reduced by 40%
Lessons Learned
Start with observability. We invested in Datadog and New Relic early, which helped us identify bottlenecks before they became critical. Measure everything, optimize what matters.
The journey isn't over—we're now planning for 50M users. Stay tuned for part 2!