The Cloud Cost Model

advertisement
The Cloud Cost Model
Chapter 3
3/15/2016
1
AWS Account Activity
$2498.42
3/15/2016
2
Account Activity Expanded
590 Hrs
50.15
96.66
3/15/2016
3
Software Licenses
• Cloud environments come with costs bundled with the instances for the
common operating systems and software packages:
– Example: Windows, MySQL, Linux versions..
• Cloud is an impetus to work with freeware and open source.
– Open source is ideal for the cloud
– Flexibility of the open source made amazon cloud possible
• Beyond, open source best licensing model is the one charges by CPU-hour
• Amazon has recently introduced a feature where you can compute with
licenses you purchased; bring your own license (BYOL)
• Restricted software licenses are not good for cloud environment:
– Per user licensing that requires validation against a server, auditing and such
• Lesson: Make sure you understand the licensing for the products you use
3/15/2016
4
Simple Cost Model
• 0.10 c per hour if you leave the Linux instance on:
after 10 hours you terminate it, you pay $1.00
• http://aws.amazon.com/ec2/pricing/
• See also http://calculator.s3.amazonaws.com/calc5.html
• On page 49:
• 0.10/CPU-hour : one load balancer
• 0.40/CPU-hour: 2 application servers
• 0.80/CPU-hour: 2 database servers
$2.40+ 44.00+38.40 = 84.80 per day for a typical scenario leading to
$30,952 per year.
This + software licenses (if you use yours) + management tools (cloud
monitoring) + labor (who prepares and loads stuff on the cloud).
3/15/2016
5
A Sample Cloud ROI Analysis
• Pages 51 -53
• Lets go over it.
• On-demand instances let you pay for compute
capacity by the hour with no long-term
commitments.
• This frees you from costs and complexities of
planning, purchasing, and maintaining hardware
and transforms what are commonly large fixed
costs into much smaller variable cost.
3/15/2016
6
ROI contd.
• Reserved Instances give you the option to make a
one time payment for each instance you want to
reserve and in turn receive a significant discount
on the hourly usage charge for that instance.
• Spot instances enable you to bid for unused
Amazon Ec2 capacity. Instances are charged the
Spot Price which is set by Amazon Ec2 and
fluctuates periodically depending on the supply
of and demand for Spot Instance capacity.
3/15/2016
7
Scenario 1
• Traditional:
– Half rack at a reliable ISP with sufficient bandwidth to support your
needs
– Two good firewalls
– One hardware load balancer
– Two good GB Ethernet switches
– Six solid, commodity business servers
• The cloud option:
–
–
–
–
One medium 32-bit instance
Four large 64-bit during standard usage to meet peek demands
Assume open source software and services
Costs for time for setting up environments, monitoring services, labor
for management of environment.
• Table 3-1 gives the upfront and ongoing costs.
3/15/2016
8
Cost Analysis
• Costs associated with different infrastructures (I – initial, M-Monthly)
Internal-I
Rack
$3,000
Switches
$2,000
Load balancer $20,000
Servers
$24,000
Firewalls
$3,000
24/7 Support $0
Mgt. software $0
Expected labor $1,200
Degraded.PERF $0
Totals
$53,200
3/15/2016
Cloud-I Internal-M Cloud-M
$0
$500 $0
$0
$0
$0
$0
$0
$73
$0
$0
$1,206
$0
$0
$0
$0
$0
$400
$0
$100 $730
$1,200 $1,200 $600
$0
$100 $0
$1,200 $1,900 $3009
9
Cost Comparison
• 112,083 (internal) vs 94,452 (cloud)
• When the traffic patterns are static and steady
you may not need the cloud
• Cost savings are tremendous when the
variance between peak and average increases,
and between average and low increases.
• Excellent case: POP!World
3/15/2016
10
Service Levels for Cloud Applications
• Cloud companies provide customers a services
level agreement (SLA) that identifies key
metrics (service levels)
• The ability to understand and to fully trust the
availability, reliability, and performance of the
cloud is key conceptual block before moving
into the cloud.
3/15/2016
11
Availability
• a = (p – (c X d) ))/p where
– a is the expected availability
– c the % of likelihood that you will encounter a
server loss in a given period
– d expected downtime from the loss of the server
– p the measurement period
• If you have 40% chance of your server failing
and it takes 24 hours to fix it, availability is:
• (8760 –0.40X24)/8760 = 0.999 or 99.9%
3/15/2016
12
Availability (contd.)
• Now consider other points of failures in the system:
two cable outage in two hours
• (8760 – ((0.4*24)+ (2.0*2)))/8760 = 99.84%
• Redundancy mitigates this problem. When you have
two or more physical components representing a
logical component, the expected downtime of the
logical component is the downtime of all the
components down simultaneously
• c X d now becomes (c X dn )/pn-1
• Applying this formula to a server with a duplicate we
get 99.99%
3/15/2016
13
Availability in Amazon AWS
• Amazon aws provides SLA for S3 and Ec2.
• Other companies such as GoGrid and
RackSpace are better.
• Study the availability computation for a typical
scenario.
3/15/2016
14
Summary
• EC2 instances are much less stable than
physical servers
• The multiplicity of availability zones can
mitigate lack of stability in an EC2 instance
• Best way to improve infrastructure is to have
spare parts lying around. In this respect cloud
can help. How?
3/15/2016
15
Reliability
• How well can you trust the system to protect data
integrity and execute the requested operations.
• Example 1: last class’s create key pair operation? What
happened to my .pem file?
• Example 2: I was preparing for this lecture, and my
laptop hard drive failed deleting my presentation.
• Data corruption is another reliability problem.
• What if your instance goes down? Don’t store anything
in the instance store.
• Store your data in EBS and snapshot it frequently.
3/15/2016
16
Performance
• Design your application so logic is spread across
multiple servers
• Use multi-threading to exploit multi-core in the
underlying architecture
• Clustering versus independent servers; a load
balancer working with a set of independent
nodes is better.
• Mind your storage when considering
performance: instance-store is unpredictable, EBS
is fine, S3 is slow
3/15/2016
17
Security
• Security issues:
• Legal implications, regulatory constraints,
standards, and compliance issues are different in
the cloud
• No perimeter security: you secure the traffic not
the infrastructure
• Cloud storage assumes high risk for
exploits(unproven)
• Virtualization solutions may have their own
vulnerabilities.
3/15/2016
18
Disaster Recovery
• Is the art of being able to resume normal
systems operations when faced with a disaster
scenario.
• Cloud is an ideal solution for disaster recovery
plans.
3/15/2016
19
Download