Download - Cloud concepts
![Page 1: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/1.jpg)
Last Updated: May. 2014
Committer and PMC member of Apache StratosSenior Software Engineer, WSO2
Lahiru Sandaruwan
Cloud Concepts
![Page 2: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/2.jpg)
*
Agenda
• Some core concepts• Vertical/horizontal scaling techniques• Capacity planning• SLA Awareness• Autoscaling• Fault tolerance• Q&A, Discussion
![Page 3: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/3.jpg)
*
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](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/4.jpg)
*
Availability
![Page 5: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/5.jpg)
*
Availability
![Page 6: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/6.jpg)
*
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](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/7.jpg)
*
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](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/8.jpg)
*
Vertical Scaling
• Get the maximum out of each allocated JVM or resource
• Increase CPU size• Increase memory
![Page 9: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/9.jpg)
*
Horizontal Scaling
![Page 10: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/10.jpg)
*
Load Balancing
• Load balancing algorithms• Round robin• Weighted• Response based• Health check• Failover-only
![Page 11: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/11.jpg)
*
Clustering for scalability
![Page 12: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/12.jpg)
*
Clustering for availability
Group Communication Channel/State replication
![Page 13: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/13.jpg)
*
Capacity Planning
Source: http://srinathsview.blogspot.com/2012/05/how-to-measure-performance-of-server.html
![Page 14: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/14.jpg)
*
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](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/15.jpg)
*
Static membership
• Predefined members• Other (non-predefined) nodes cannot join
M2M1
M3 M4
Static group
N
![Page 16: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/16.jpg)
*
Dynamic membership
• No predefined members• Nodes can join & leave
M2M1
M3 M4
Dynamic group
NJoin
![Page 17: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/17.jpg)
*
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](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/18.jpg)
*
Multicast based membership management
N
M2
M1
M3
M4
Join (IP, Port)
![Page 19: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/19.jpg)
*
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](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/20.jpg)
*
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](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/21.jpg)
*
● 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](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/22.jpg)
*
● Monitoring the cloud parameters● Trigger an event if a SLA violation happened● Acting upon the events
SLA Awareness: Solution
![Page 23: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/23.jpg)
*
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](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/24.jpg)
*
Auto-scaling – steady load
![Page 25: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/25.jpg)
*
Auto-scaling – load increasing
![Page 26: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/26.jpg)
*
Auto-scaling – load increasing
![Page 27: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/27.jpg)
*
Auto-scaling – steady load
![Page 28: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/28.jpg)
*
Auto-scaling – decreased load
![Page 29: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/29.jpg)
*
Auto-scaling – decreased load
![Page 30: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/30.jpg)
*
Auto-scaling – steady load
![Page 31: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/31.jpg)
*
Autoscaling - Analysis & Results
![Page 32: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/32.jpg)
*
Autoscaling - Analysis & Results
![Page 33: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/33.jpg)
*
Single node
Availability
Cost
LOWEST
HIGHEST
![Page 34: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/34.jpg)
*
Primary-secondary
Primary Secondary
Availability
Cost
LOWEST
HIGHEST
![Page 35: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/35.jpg)
*
Primary-secondary, multiple LB
Primary Secondary
keepalived
Availability
Cost
LOWEST
HIGHEST
![Page 36: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/36.jpg)
*
Active cluster, multiple LB
Active Active
keepalived
Active
Availability
Cost
LOWEST
HIGHEST
![Page 37: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/37.jpg)
*
Multi-zone or multi-datacenter Deployment
Region X
Zone 1
Zone 2
Cloud Controller
Availability
Cost
LOWEST
HIGHEST
![Page 38: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/38.jpg)
*
Multi-region deployment
Region X
Zone 1
Zone 2
Region Y
Zone 1
Zone 2
Availability
Cost
LOWEST
HIGHEST
![Page 39: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/39.jpg)
*
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](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/40.jpg)
*
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](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/41.jpg)
*
Stratos Architecture
![Page 42: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/42.jpg)
*
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](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/43.jpg)
*
DISCUSSION
![Page 44: Cloud concepts](https://reader033.vdocument.in/reader033/viewer/2022052904/557cf9b3d8b42a071b8b4b5e/html5/thumbnails/44.jpg)
*
Thanks!