Setting expectations and context Architecting for scale – a web app journey to scalability Scaling ‘real-world’ applications
Losing Business DowntimeSlow Site
Scale Up – aka Vertical Scaling Increase resources capacity within existing node Scaling Options Scale Out – aka Horizontal Scaling Increase resources capacity by adding nodes
A web app’s journey towards scalability
Level 1 Level 2 Boss Level # of users >100,000 RPS >10,000 RPS >100 RPS
Level 1: Beginners
Website Database stored on local disk Session state stored in local memory Images stored on local disk* Statefull Application *Local disk should be treated as a shared resource in Azure Websites
Level 1 – Photo Gallery (untouched) Scale Testing Results: Scale Count Scale Size Test Duration Max User Count Avg Pages/Sec Avg Page Time (sec) Avg RPS (Visual Studio) WebSites RPS Failed Tests Total Tests Failed Tests (%) 1MED MED MED MED MED
Level 2: Experts
Website
Level 2 – Horizontally Scalable Photo Gallery Strategy:
Level 2 – Horizontally Scalable Photo Gallery Scale Testing Results Scale Count Scale Size Test Duration Max User Count Avg Pages/Sec Avg Page Time (sec) Avg RPS (Visual Studio) WAWS RPS Failed Tests Total Tests Failed Tests (%) 1LARGE LARGE , LARGE , LARGE , , LARGE151, , , LARGE201, , , LARGE252, , ,4961.6
Configure Auto Scale Optimize Website Code Optimize SQL Add Cache Layer Use CDN for content, *.js & *.css Leverage other services Level 2 – Horizontally Scalable Photo Gallery Other improvements:
Level 1 Level 2 Boss Level # of users >100,000 RPS >10,000 RPS >100 RPS
Level 3: Like a BOSS!
Level 3 – Globally Scalable Photo Gallery When bad things happen to good datacenters My Site Replica (A) My Site Replica (B)
Gaps: Web app is ‘local’ to a single region Images stored in ‘local’ data center Database in ‘local’ data center Goals: Active / Active replication across regions Benefits: Bigger Scale Lower Latency Higher Uptime and DR Level 3 – Globally Scalable Photo Gallery Moving towards a global presence
Level 3 – Globally Scalable Photo Gallery Architecture: East US Website Webjob West US Website Webjob
Level 3 – Globally Scalable Photo Gallery Architecture: East US Website Webjob West US Website Webjob
Level 3 – Globally Scalable Photo Gallery Strategy: * Command Query Responsibility Segregation adds latency and app complexity West US Website Webjob
Level 3 – Globally Scalable Photo Gallery Words of Caution: West US Website Webjob
Level 1 Level 2 Boss Level # of users >100,000 RPS >10,000 RPS >100 RPS
Massive Scale WordPress
Recommended Reading