42
Elastic Cloud Elastic Cloud H 2 enry Elastic Cloud Elastic Cloud Henry Huang Henry Huang

Elastic cloud

Embed Size (px)

DESCRIPTION

A puppy introduction on Elastic Cloud

Citation preview

Elastic CloudElastic Cloud

H2enry

Elastic CloudElastic CloudHenry HuangHenry Huang

Outline

• AWS Overview• EC2 Basic Concepts• EC2 Tools• Pricing

AWS Products

Dropbox using S3

• https://www.dropbox.com/help/27

Customers

Asia Pacific customersAsia Pacific customers

Partners

AWS Regions• US-East (N. Virginia)• US-West (N. California)• US-West (Oregon)• GovCloud (US)• EU (Dublin)• Singapore• Tokyo

Regions and Availability Zones

• Isolated from failures in other Availability zones

AWS as LEGO

Elastic Compute Cloud• Instance

– Instance Type– Instance Storage– AMI

• Network & Security– Elastic IP address– Security Group– AWS Credentials

Instance & AMI

Elastic Compute CloudElastic Compute Cloud

InstanceInstance InstanceInstance InstanceInstance InstanceInstance

InstanceInstance

CPUCPU

MemoryMemory

StorageStorage

AMIAMI

AMIAMI a template that contains a software configuration (operating system, applications, etc.)

General Instance TypesFamily Description

Standard Have memory-to-CPU ratios suitable for most general purpose applications

Micro Provide a small amount of consistent CPU resources and allow you to burst CPU capacity when additional cycles are available. They are well suited for lower throughput applications and web sites

High-CPU Have proportionally more CPU resources than memory (RAM) and are well suited for compute-intensive applications

High-Memory Have proportionally more memory resources and are well suited for high throughput applications, such as database and memory caching applications

Cluster Compute

Have a very large amount of CPU coupled with increased networking performance, making them well suited for High Performance Compute (HPC) applications and other demanding network-bound applications

Cluster GPU Provide general-purpose graphics processing units (GPUs), with proportionally high CPU and increased network performance for applications that benefit from highly parallelized processing.

Available Instance Types

•EC2 Compute Unit (ECU) One provides the equivalent CPU capacity of a 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor

Virtualization Type

• Para-virtual– Guests run a modified operating system (with xen

drivers)

• HVM– Utilize Intel VT-x and AMD-V. Guests can run a

unmodified operating system– Only supported in cluster instances.

Instance Storage

• Varies by data persistence– Ephemeral Store– Persistent Store

• Varies by storage role– Root Device Storage– Additional Storage

Data Persistence View

S3S3

Ephemeral Store

Persistent Store

Instance Storage

Elastic Block Store

Instance Store

AMIAMIEBS Snapshot ……

Instance Store

Ephemeral Store

Instance Store

the data persists only for live EC2 instance

Storage amount varies by instance type

Cannot be attached to another instance

Elastic Block Store

Persistent Store

Elastic Block Store

multiple volumes can be attached to a single instance

EBS volumes that are created and attached to an instance at launch are, by default, deleted when that instance is terminated.

EBS volumes attached to an instance after it is already running are, by default, not deleted on instance termination.

Can take snapshot of EBS volumes

Comparison

Store Role View

Root Device Storage

Instance StoreElastic Block Store

AMIAMI

S3S3

From Bundled Tasks

From Bundled Tasks

From EBS Snapshot From EBS Snapshot

Copied toCreate EBS Volume

Additional Storage Additional Storage

Elastic Block Store Instance Store

AMI Type

AMIAMI

Instance-Store Backed

Instance-Store Backed

EBS BackedEBS Backed

Different Root Device Storage

Characteristic

EBS-Backed AMIs instance store-backed AMIs

Boot Time Usually Less than 1 minute Usually Less than 5 minutes

Size Limit 1 TB 10 GB

AMI State Can Start, Stop, Create Image and Terminate

Can Start and Terminate Only

Root Device Location

Amazon EBS volume Instance storage

Data Persistence

Ephemeral storage still available, but not exposed by default

All data is ephemeral unless separate EBS volume attached

Upgrading The instance type, kernel, RAM disk, and user data can be changed while the instance is stopped.

Instance attributes are fixed for the life of an instance

Charges Instance usage, Amazon EBS volume usage, and Amazon EBS snapshot charges for AMI storage

Instance usage and Amazon S3 charges for AMI storage

AMI Creation/Bundling

Uses a single command/call Requires installation and use of AMI tools

Additional EBS volumes can be attached to either type

Instance-store backed AMI

EBS backed AMI

Instance on EBS

Instance on instance store

Networking and Security• Elastic IP address

– static IP addresses (public)– associated with your account, not a particular instance– by default, all accounts are limited to 5 Elastic IPv4

addresses

• Security group– inbound network firewall– specify the protocols, ports, and source IP ranges that

are allowed to reach your instances

AWS Credentials

A.W.S Interfaces

• Web Management Console (web UI)• Software Library & SDK

– multi-languages (Java, PHP, Python, Ruby, .NET)– Multi-platforms

• Command Line Interface• Resource Management Tools

– Puppet Chef, PyChef, etc.

EC2 Command Line Tools

• EC2 AMI Tools• EC2 API Tools

Usage

• AMI Tools (rpm install)

• API Tools– Java version 5 or later to run (either JRE or JDK)– Set system variables (JAVA_HOME; EC2_HOME;

EC2_PRIVATE_KEY & EC2_CERT)– Better to include commands in “~/.bashrc” or

“/etc/profile” for permanent usage

Useful API Commands

PricingMode Recommended

ApplicationPayment Shortage

On-Demand Still in development or testing

Hourly rates Cannot launch instance in urgent periods

Reserved Usage predictable; Capacity reserved

Upfront one-time fee per instance non-refundable

Spot Flexible start and end time

Hourly rates with maximum hourly price

Instance will be shut down when exceed maximum hourly price

Amazon Pricing

Reserved + Large InstanceRegion 1 yr term 3 yr term Linux/UNIX

Usage

US East $910 $1400 $0.12 per hour

US West $910 $1400 $0.16 per hour

EU $910 $1400 $0.16 per hour

Singapore $910 $1400 $0.16 per hour

Tokyo $956 $1470 $0.18 per hour

Amazon Pricing

Reference

• http://aws.silentreader.net/• http://docs.amazonwebservices.com/AWSEC2

/latest/UserGuide/• http://aws.amazon.com/ec2/pricing/• http://calculator.s3.amazonaws.com/calc5.ht

ml