Scalable Applications Design - Refactor - Host Emanuele Rocca - - PowerPoint PPT Presentation

scalable applications
SMART_READER_LITE
LIVE PREVIEW

Scalable Applications Design - Refactor - Host Emanuele Rocca - - PowerPoint PPT Presentation

Garage Innovators Keep the relational model PaaS providers Scalable Applications Design - Refactor - Host Emanuele Rocca Vrije Universiteit Amsterdam Advanced Topics in Distributed Systems October 14, 2011 Emanuele Rocca Scalable


slide-1
SLIDE 1

Garage Innovators Keep the relational model PaaS providers

Scalable Applications

Design - Refactor - Host Emanuele Rocca

Vrije Universiteit Amsterdam Advanced Topics in Distributed Systems

October 14, 2011

Emanuele Rocca Scalable Applications

slide-2
SLIDE 2

Garage Innovators Keep the relational model PaaS providers

Why scaling?

30 thousand hits on the web application in one day! 30 thousand potential new users!

Photo by anirudhkoul, http://www.flickr.com/photos/anirudhkoul/3786725982/, CC Attribution-NonCommercial Emanuele Rocca Scalable Applications

slide-3
SLIDE 3

Garage Innovators Keep the relational model PaaS providers

Three different scenarios

1 scale from your garage (again) 2 scale an existing application 3 host applications in a scalable way Emanuele Rocca Scalable Applications

slide-4
SLIDE 4

Garage Innovators Keep the relational model PaaS providers

Outline

1

Garage Innovators

2

Keep the relational model

3

PaaS providers

Emanuele Rocca Scalable Applications

slide-5
SLIDE 5

Garage Innovators Keep the relational model PaaS providers

Who is this Garage Innovator, again?

good idea no money

Emanuele Rocca Scalable Applications

slide-6
SLIDE 6

Garage Innovators Keep the relational model PaaS providers

Utility Computing

“If computers of the kind I have advocated become the computers of the future, then computing may someday be organized as a public utility just as the telephone system is a public utility. The computer utility could become the basis of a new and important industry.” – John McCarthy, MIT Centennial, 1961

Emanuele Rocca Scalable Applications

slide-7
SLIDE 7

Garage Innovators Keep the relational model PaaS providers

Utility computing makes it feasable

The application should: scale up within seconds scale down when the crowd leaves (remember: no money)

Emanuele Rocca Scalable Applications

slide-8
SLIDE 8

Garage Innovators Keep the relational model PaaS providers

Toolbox

Storage Delivery Networks HTTP redirection Load balancers (network vs. application level) Round robin DNS

Emanuele Rocca Scalable Applications

slide-9
SLIDE 9

Garage Innovators Keep the relational model PaaS providers

Houston, we have a problem

The database

Emanuele Rocca Scalable Applications

slide-10
SLIDE 10

Garage Innovators Keep the relational model PaaS providers

But YOU can handle a flash crowd

10k new users in one day with 150$

Emanuele Rocca Scalable Applications

slide-11
SLIDE 11

Garage Innovators Keep the relational model PaaS providers

Outline

1

Garage Innovators

2

Keep the relational model

3

PaaS providers

Emanuele Rocca Scalable Applications

slide-12
SLIDE 12

Garage Innovators Keep the relational model PaaS providers

Give me my RDBMS back!

My data is relational I want strong consistency The application needs transactions Resistance to change

Emanuele Rocca Scalable Applications

slide-13
SLIDE 13

Garage Innovators Keep the relational model PaaS providers

Access patterns?

Turns out that different access patterns allow for different

  • ptimizations.

replication if you have lots of reads partitioning if you have writes that do not span partitions

Emanuele Rocca Scalable Applications

slide-14
SLIDE 14

Garage Innovators Keep the relational model PaaS providers

Service-oriented modeling

Go for a Service Oriented Design. separation of concerns independent data services each data service has exclusive access to its private data store

Emanuele Rocca Scalable Applications

slide-15
SLIDE 15

Garage Innovators Keep the relational model PaaS providers

Service-oriented modeling

Go for a Service Oriented Design. separation of concerns independent data services each data service has exclusive access to its private data store simplification of each database workload more efficient use of classic scaling techniques

Emanuele Rocca Scalable Applications

slide-16
SLIDE 16

Garage Innovators Keep the relational model PaaS providers

Service Oriented Data Denormalization

Emanuele Rocca Scalable Applications

slide-17
SLIDE 17

Garage Innovators Keep the relational model PaaS providers

Scalability of individual services

Emanuele Rocca Scalable Applications

slide-18
SLIDE 18

Garage Innovators Keep the relational model PaaS providers

Putting It All Together

You have to know what you are doing Any update to the code may require to restructure your data Denormalization allows efficient use of scalability techniques Strong consistency and transactional properties

Emanuele Rocca Scalable Applications

slide-19
SLIDE 19

Garage Innovators Keep the relational model PaaS providers

Outline

1

Garage Innovators

2

Keep the relational model

3

PaaS providers

Emanuele Rocca Scalable Applications

slide-20
SLIDE 20

Garage Innovators Keep the relational model PaaS providers

We want to host applications in a scalable way

Emanuele Rocca Scalable Applications

slide-21
SLIDE 21

Garage Innovators Keep the relational model PaaS providers

We want to host applications in a scalable way

Emanuele Rocca Scalable Applications

slide-22
SLIDE 22

Garage Innovators Keep the relational model PaaS providers

PaaS providers have their amount of fun too

cope with dynamic, changing workloads choose between different VM adaptations

1

capacity control

2

migration

3

replication

provide isolation fulfill SLAs

Emanuele Rocca Scalable Applications

slide-23
SLIDE 23

Garage Innovators Keep the relational model PaaS providers

PaaS providers have their amount of fun too

cope with dynamic, changing workloads choose between different VM adaptations

1

capacity control

2

migration

3

replication

provide isolation fulfill SLAs Changing the application is out of the question

Emanuele Rocca Scalable Applications

slide-24
SLIDE 24

Garage Innovators Keep the relational model PaaS providers

Impact of VM adaptations

VM adaptations can be beneficial there ain’t no such thing as a free lunch (TM) evaluate benefits taking costs into account

Emanuele Rocca Scalable Applications

slide-25
SLIDE 25

Garage Innovators Keep the relational model PaaS providers

Cost-Sensitive Adaptation Engine

Emanuele Rocca Scalable Applications

slide-26
SLIDE 26

Garage Innovators Keep the relational model PaaS providers

Cost-Sensitive Adaptation Engine

Emanuele Rocca Scalable Applications

slide-27
SLIDE 27

Garage Innovators Keep the relational model PaaS providers

Cost-Sensitive Adaptation Engine: LQN Solver

Emanuele Rocca Scalable Applications

slide-28
SLIDE 28

Garage Innovators Keep the relational model PaaS providers

Cost-Sensitive Adaptation Engine: LQN Solver

Emanuele Rocca Scalable Applications

slide-29
SLIDE 29

Garage Innovators Keep the relational model PaaS providers

Cost-Sensitive Adaptation Engine: LQN Solver

Emanuele Rocca Scalable Applications

slide-30
SLIDE 30

Garage Innovators Keep the relational model PaaS providers

Cost-Sensitive Adaptation Engine: Cost Mapping

Emanuele Rocca Scalable Applications

slide-31
SLIDE 31

Garage Innovators Keep the relational model PaaS providers

Cost-Sensitive Adaptation Engine: Cost Mapping

Emanuele Rocca Scalable Applications

slide-32
SLIDE 32

Garage Innovators Keep the relational model PaaS providers

Cost-Sensitive Adaptation Engine: Off-line model parametrization

Emanuele Rocca Scalable Applications

slide-33
SLIDE 33

Garage Innovators Keep the relational model PaaS providers

Cost-Sensitive Adaptation Engine: maximize utility

Emanuele Rocca Scalable Applications

slide-34
SLIDE 34

Garage Innovators Keep the relational model PaaS providers

Concerns

Needs per-application offline experiments Tested on 4 machines, does it scale? World Cup request rates scaled from 1200 to 80 req/sec...

Emanuele Rocca Scalable Applications

slide-35
SLIDE 35

Garage Innovators Keep the relational model PaaS providers

Conclusions

Scalability can be seen from very different angles There is no ”scale up” magic button We have seen how to design or refactor an application to improve its scalability How to provide a scalable hosting service fulfilling SLAs and without wasting money?

Emanuele Rocca Scalable Applications