💡 Scaling up to your first 1 Million Users 🚦
3 min read
🎯 Iterative Application Modernization Pattern & Strangler Pattern 📚
🎯 Deploy Your first Web Application in minutes on Heroku || AWS AppRunner & RDS (Free-Tier 🆓)
1. Iterative Application Modernization
Monolith to MicroServices: Many Monolithic Applications generate revenue for your company by adding value to your customers. You may have heard statements such as "let's move to a MicroService-based Architecture", but "we must deal with the Data Tier first".
How do we get there safely when we are heavily dependent on the application ⁉️
✅ Martin Fowler’s Strangler Pattern 📚: This methodology has been applied to moving specific data sets from a multi-terabyte Monolithic Database to a Purpose-built Database (SQL: MySQL / Postgres; NoSQL: MongoDB / DynamoDB), and utilizing a Data Lake to improve data access and performance.
[Example] eCommerce Breaking-down the Monolith (Data-tier and App-tier)
- We have separated Shipping Service Data into a purpose-built database and a MicroService designed to handle shipping. With the newly developed Shipping Service, you will have the opportunity to develop MicroServices that focus on one job and do it extremely well.
- The Orders Service will come next, and Inventory Service will get their own MicroServices.
- Shopping Cart Service remain in the Monolith to ensure that customer service is not disrupted while the application is rearchitected. Once all monolithic capabilities have been replaced by MicroServices, we can now eliminate the monolith-app. Note that both Monoliths and MicroServices will coexist for a period of time.
☑️ Additionally, you may also use Adapter pattern and Façade pattern.
2. 🆓 [Dev/Test] Users < 10,000
- 🥇 Multi-AZ
- 🥇 Elastic Load Balancing between tiers
- 🥇 Auto Scaling
- 🎖️ Service-Oriented Architecture (SOA): Split Tiers into individual SOA Services.
Lab 1. Hosting Apps on Heroku
⚠️ Heroku Free-Tier: Heroku Pricing || Where Can Heroku Free Tier Users Go?
[Example] This application has the following components:
- Backend: Node.js REST API built with Express.js with resource endpoints that use Client to handle database operations against a PostgreSQL database (e.g., hosted on Heroku).
- Frontend: Static HTML page to interact with the API.
Lab 2. Deploy Your first Web Application in minutes
☑️ TODO - Build and deploy solutions on AWS using AWS App Runner and Amazon RDS 🆓: github.com/OceanSoftIO/Terraform/tree/featu..
3. 🥈 [Staging]
- 🥈 Serving content smartly (Cloud Storage/S3, CDN/Cloudfront)
- 🥈 Caching off databases
- 🥈 Moving state-off tiers that auto scale
4. 🥉 Production
🥉 Monitoring, metrics, and logging: Deeply analyze your entire stack then fine-tuning of your application.
🥉 Going from Multi-AZ to Multi-Region
- Federation: Splitting into multiple databases based on function
- Sharding: Splitting one data set across multiple hosts
Moving some functionality to other types of databases (NoSQL, Graph)
5. Next Steps ⚡
🏅 Service-Oriented Architecture (SOA) of features/functionality
🏅Build serverless whenever possible ⚡