44
Last Updated: May. 2014 Committer and PMC member of Apache Stratos Senior Software Engineer, WSO2 Lahiru Sandaruwan Cloud Concepts

Cloud concepts

Embed Size (px)

DESCRIPTION

This is a presentation i have done in WSO2. I have referred and used slides from Azeez's slides at http://www.slideshare.net/afkham_azeez/java-colombo-developing-highly-scalable-apps?qid=65a88726-9fbd-44d6-ae16-36eecffdcc9f&v=default&b=&from_search=2

Citation preview

Page 1: Cloud concepts

Last Updated: May. 2014

Committer and PMC member of Apache StratosSenior Software Engineer, WSO2

Lahiru Sandaruwan

Cloud Concepts

Page 2: Cloud concepts

*

Agenda

• Some core concepts• Vertical/horizontal scaling techniques• Capacity planning• SLA Awareness• Autoscaling• Fault tolerance• Q&A, Discussion

Page 3: Cloud concepts

*

Scalability

"The ability of the of a system to continue to operate correctly even when it is scaled to a larger size”

Page 4: Cloud concepts

*

Availability

Page 5: Cloud concepts

*

Availability

Page 6: Cloud concepts

*

High Availability

A system that is designed for continuous operation in the event of a failure of one or more components. However, the system may display some degradation of service, but will continue to perform correctly.

High Availability: The proportion of time during which the service is accessible with reasonable response times should be close to 100%.

Page 7: Cloud concepts

*

How to decide required scale (capacity) & availability?

• Average throughput (TPS)• Max throughput (TPS)• Monetary value of a transaction• Average loss & max loss per second of

downtime• Decide on how much to invest based on cost vs.

benefit tradeoff

Page 8: Cloud concepts

*

Vertical Scaling

• Get the maximum out of each allocated JVM or resource

• Increase CPU size• Increase memory

Page 9: Cloud concepts

*

Horizontal Scaling

Page 10: Cloud concepts

*

Load Balancing

• Load balancing algorithms• Round robin• Weighted• Response based• Health check• Failover-only

Page 11: Cloud concepts

*

Clustering for scalability

Page 12: Cloud concepts

*

Clustering for availability

Group Communication Channel/State replication

Page 14: Cloud concepts

*

Capacity Planning

Throughput = number of completed requests / time to complete the requests

No. of servers = (projected max load * 1.3) / max throughput of one server

max throughput of one server = max throughput of that server for the slowest scenario in the set of use cases

Page 15: Cloud concepts

*

Static membership

• Predefined members• Other (non-predefined) nodes cannot join

M2M1

M3 M4

Static group

N

Page 16: Cloud concepts

*

Dynamic membership

• No predefined members• Nodes can join & leave

M2M1

M3 M4

Dynamic group

NJoin

Page 17: Cloud concepts

*

Hybrid membership• Some predefined (well-known) members, and some

dynamic members• Nodes can join & leave• Membership revolves around the static members

Hybrid group

N

M2M1

M3 M4

Static members

M6M5

M7

Dynamic members

Join (IP, Port)

Page 18: Cloud concepts

*

Multicast based membership management

N

M2

M1

M3

M4

Join (IP, Port)

Page 19: Cloud concepts

*

Well-known Address (WKA) based membership management

Hybrid group

NWK2

WK1

WK3 WK4

Static members

M6M5

M7

Dynamic members

Join (IP, Port)

Notify

Page 20: Cloud concepts

*

Multicast vs. WKA

Multicast WKA

All nodes should be in the same subnet Nodes can be in different networks

All nodes should be in the same multicast domainNo multicasting requirement

Multicasting should not be blocked

No fixed IP addresses or hosts required At least one well-known IP address or host required

Failure of any member does not affect membership discovery

New members can join with some WKA nodes down, but not if all WKA nodes are down

Does not work on IaaSs such as Amazon EC2 IaaS-friendly

Requires keepalived, elastic IPs or some other mechanism for remapping IP addresses of WK members in cases of failure

Page 21: Cloud concepts

*

● Solves performance, availability, and economic costs issues

● Currently the customer needs a considerable capacity planning

● Reduce cost of cloud: reduce economic cost and energy footprint

SLA Awareness

Page 22: Cloud concepts

*

● Monitoring the cloud parameters● Trigger an event if a SLA violation happened● Acting upon the events

SLA Awareness: Solution

Page 23: Cloud concepts

*

Auto-scaling

• Scale-out when load increases• Scale-in when load decreases• Always use the optimum amount of resources• Try out

• AWS ELB • Apache Stratos Load Balancer• WSO2 ELB

Page 24: Cloud concepts

*

Auto-scaling – steady load

Page 25: Cloud concepts

*

Auto-scaling – load increasing

Page 26: Cloud concepts

*

Auto-scaling – load increasing

Page 27: Cloud concepts

*

Auto-scaling – steady load

Page 28: Cloud concepts

*

Auto-scaling – decreased load

Page 29: Cloud concepts

*

Auto-scaling – decreased load

Page 30: Cloud concepts

*

Auto-scaling – steady load

Page 31: Cloud concepts

*

Autoscaling - Analysis & Results

Page 32: Cloud concepts

*

Autoscaling - Analysis & Results

Page 33: Cloud concepts

*

Single node

Availability

Cost

LOWEST

HIGHEST

Page 34: Cloud concepts

*

Primary-secondary

Primary Secondary

Availability

Cost

LOWEST

HIGHEST

Page 35: Cloud concepts

*

Primary-secondary, multiple LB

Primary Secondary

keepalived

Availability

Cost

LOWEST

HIGHEST

Page 36: Cloud concepts

*

Active cluster, multiple LB

Active Active

keepalived

Active

Availability

Cost

LOWEST

HIGHEST

Page 37: Cloud concepts

*

Multi-zone or multi-datacenter Deployment

Region X

Zone 1

Zone 2

Cloud Controller

Availability

Cost

LOWEST

HIGHEST

Page 38: Cloud concepts

*

Multi-region deployment

Region X

Zone 1

Zone 2

Region Y

Zone 1

Zone 2

Availability

Cost

LOWEST

HIGHEST

Page 39: Cloud concepts

*

Multiple IaaS (hybrid) DeploymentAvailability

Cost

LOWEST

HIGHEST

Private cloud (data center)

Zone 1

Zone 2

Amazon EC2

Zone 1

Zone 2

Rackspace Cloud

Zone 1

Zone 2

Page 40: Cloud concepts

*

Sin

gle

Nod

e

Prim

ary-

Sec

onda

ry, s

ingl

e LB

Mul

ti-no

de a

ctiv

e cl

uste

r- S

ingl

e zo

ne

Mul

ti-re

gion

Prim

ary-

Sec

onda

ry,

with

mul

tiple

LB

s

Mul

ti-zo

ne Mul

ti-Ia

aS

Cost of Availability

Page 41: Cloud concepts

*

Stratos Architecture

Page 42: Cloud concepts

*

References

๏ http://www.cari-info.org/cari-2012/session%201/1B3.pdf๏ http://domino.research.ibm.com/library/cyberdig.

nsf/papers/16D9BBF221540A0785257784004FC33D๏ http://ieeexplore.ieee.org/xpl/login.jsp?

tp=&arnumber=5452504&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D5452504

๏ http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=5990687&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D5990687

๏ http://www.slideshare.net/afkham_azeez/java-colombo-developing-highly-scalable-apps

- Azeez’s talk at Java Colombo

Page 43: Cloud concepts

*

DISCUSSION

Page 44: Cloud concepts

*

Thanks!