36

scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Embed Size (px)

Citation preview

Page 1: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…
Page 2: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Yochay Kiriaty ([email protected], @yochayk)Program Manager

Azure Web Sites: Architecting Massive-Scale Ready-For-Business Web Apps

3-626

Page 3: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Setting expectations and context

Architecting for scale – a web app journey to scalability

Scaling ‘real-world’ applications

Agenda

Click icon to add picture

Page 4: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Web Apps Examples: blogs.office.com, Skype, Bing dev center, Nokia,

more… Examples: mobile apps, web APIs, facebook games, many

more...

Ready for business Extremely low to ‘no perceived’ downtime (99.95% - 99.99%) Performance and (global) low latency ‘Easy’ to manage: DevOps, test, deploy, configure, Monitor,

analytics

Massive scale Many tens of millions of requests per day (100M or higher) Peak Request Per Second of many thousands (5K – 10K RPS)

Massive Scale And Ready For Business Web Appsslow web app

= losing business

Page 5: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic) in a capable manner (doesn’t go belly up) or its ability to be enlarged to accommodate that growth

Source: http://en.wikipedia.org/wiki/Scalability

Page 6: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Scaling OptionsScale Up – aka Vertical

Scaling

Increase resources capacity within existing node

Scale Out – aka Horizontal Scaling

Increase resources capacity by adding nodes

Page 7: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

A web app’s journey towards scalability

Page 8: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Level 1 Level 2 Boss Level

Application Scale Journey

# of users

# RPS

Page 9: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Level 1

Beginners

Page 10: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Level 1 – Photo Gallery (untouched)

Web Site

Database

Page 11: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Database stored on local disk

Session state stored in local memory

Images stored on local* disk

Click icon to add picture

Level 1 – Scaling Gaps (stateful application )

W

Database

* All web site on Azure Web Sites share the same disk

Page 12: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Level 1 – Scale Testing Results

DescriptionVM number VM size

duration (min)

Max User Count

Avg Pages/Sec

Avg PageTime (sec)

Avg RPS (Visual Studio)

WAWS RPS

FailedTests

TotalTests

FailedTests (%)

builddemo12start (default site) 1MED 15 2 0.27 1.16 1.77 1 0 77 0.0

builddemo12start (default site) 1MED 15 20 1.9 6.5 14.2 18 0 559 0.0

builddemo12start (default site) 1MED 15 50 3.48 10.4 39.5 45 1 980 0.1

builddemo12start (default site) 1MED 15 80 5.58 12.5 51.5 55 0 1639 0

builddemo12start (default site) 1MED 15 120 4.95 22.5 47.8 50 19 1446 1.3

Page 13: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Level 2

Experts

Page 14: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Stateless web appWeb Site

Level 2 – Horizontally Scalable Photo Gallery

Database

Database

Session

Page 15: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Web Site

Level 2 – Horizontal Scalable Photo Gallery

Database

Session

Page 16: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Move database to SQL-AzMove images to Blob-StorageChange to non-sticky session

Adding nodes:Disable ARRAffinityCookie Consider Auto-Scale

Click icon to add picture

Level 2 – Horizontally Scalable Photo Gallery

Web Site

Database

Page 17: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Level 2 – Scale Testing Results

Description

VM number VM size

duration (min)

Max User Count

Avg Pages/Sec

Avg PageTime (sec)

Avg RPS (Visual Studio)

WAWS RPS

FailedTests

TotalTests

FailedTests (%)

photogallery1eastus (scalable) 1LARGE 15 20 2.91 0.13 23.4 21 0 849 0.0photogallery1eastus (scalable) 1LARGE 15 100 14.4 0.15 232 77 0 4247 0.0photogallery1eastus (scalable) 1LARGE 15 200 29.2 0.14 966 155 0 8563 0.0photogallery1eastus (scalable) 1LARGE 15 300 43.6 0.24 2535 231 0 12839 0.0photogallery1eastus (scalable) 1LARGE 15 1000 141 0.67 8135 735 0 20591 0.0photogallery1eastus (scalable) 3LARGE 20 1500 198 1.37 19855 1297 1 32763 0.0photogallery1eastus (scalable) 3LARGE 25 2000 242 2.12 24896 1547 870 53496 1.6

Page 18: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…
Page 19: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Optimize DB queries and your codeUse persistent connectionAdd cache

Content Use CDN for images and

*.jsPut videos on youtube

Click icon to add picture

Level 2 – Additional Optimization Options

Web Site

Database

Page 20: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Level 1 Level 2

>100 RPS

>10,000 RPS

Application Scale Journey

# of users

RPS

Page 21: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Level 2 – Scaling Gaps Towards Global Presence

Web Site

Database

West US

East US

Page 22: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Web app runs in single data centerImages stored in single data centerDatabase in single data center

Option #1: Active / Passive (DR)

Goal: Active / Active across regions (Scale, latency, and DR)

Click icon to add picture

Level 2 – Scaling Gaps Towards Global Presence

Page 23: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Level 3

BOSS Level

Page 24: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Level 3 – Global Scale

Web Site

Database

WebJob

Web Site

Database

WebJob

West US East US

Page 25: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

‘Copy’ images to remote data center

Use queue (CQRS*) to update DB

Add Traffic Manager

Controlled and synchronized deployment

Click icon to add picture

Level 3 – Sync Content Across Geo-Regions

* Command Query Responsibility Segregation adds latency and app complexity

Web Site

Database

WebJob

Web Site

Database

WebJob

Page 26: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Using a queue to sync DB access can/may lead to eventual consistency

Syncing database works for ‘most’ scenarios

Active / Active state is app dependent

Click icon to add picture

Level 3 – A Word Of Caution

Web Site

Database

WebJob

Web Site

Database

WebJob

Page 27: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Level 1 Level 2 BOSS Level

>100 RPS

>10,000 RPS

>100,000 RPS

Application Scale Journey

# of users

Page 28: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Level 3

BOSS Level For Real World Application

Page 29: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Level 3 – Global Scale For WordPress

Web Site

WebJob

Web Site

WebJob

West US East US

Bi-DirectionalActive/Active

Admin users are redirected to East US

Page 30: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Azure Web Sites can scale to answer all you business scale needs

Your web sites is always running with Azure Web Sites (no perceived downtime…)

Azure Web Sites has rich core functionality It is easy to develop and maintain my web

site

Summary

Page 31: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Your Feedback is ImportantFill out an evaluation of this session and help shape future events. Scan the QR code to evaluate this session on your mobile device. You’ll also be entered into a daily prize drawing!

Page 32: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Page 33: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Azure Web Sites What’s New with Azure Web Sites

http://channel9.msdn.com/Events/Build/2014/3-625 Deep Dive into Hidden Gems, Tips and

Tricks for Azure Web Sites http://channel9.msdn.com/Events/Build/2014/3-624

Resources

Page 34: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

Step 1 Step 2 Step 3

<100 RPS

<10,000 RPS

<100,000 RPS

Application Scale Journey

Page 35: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

RPS hr 24 hr 50

180,000

4,320,000

5,000

18,000,000

432,000,000

50,000

180,000,000

4,320,000,000 23,000,000,000

0.187826087

Page 36: scalability is the ability of a system (a web site), to handle a growing amount of work (http traffic)…

How it works