building for the cloud | nc csdn cloud conference 2012

32
Copyright © 2012 ChinaNetCloud Server Management Cloud computing Consulting Running the World’s Internet Servers Building for the Cloud By Steve Mushero

Upload: china-netcloud

Post on 24-Jun-2015

84 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Building for the Cloud | NC CSDN Cloud Conference 2012

Copyright © 2012 ChinaNetCloudServer Management Cloud computing Consulting

Running the World’s Internet Servers

Building for the CloudBy Steve Mushero

Page 2: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

About Steve

Founder, CEO & CTO of ChinaNetCloud Before that, CTO of Tudou ( 土豆网 )

Seven years in China From Silicon Valley, Seattle, New York

20+ years experience as CTO Experience in dev & ops

Many patents on Internet Data Exchange

Page 3: Building for the Cloud | NC CSDN Cloud Conference 2012

3

Running the World’s Internet Servers www.ChinaNetCloud.com

ChinaNetCloud - About

We manage servers

for Chinese Internet Companies

Thousands of Servers - Hundreds of Customers

We've seen every type & size system

Page 4: Building for the Cloud | NC CSDN Cloud Conference 2012

4

Running the World’s Internet Servers www.ChinaNetCloud.com

ChinaNetCloud - Clouds

China's Oldest Cloud Company

Our Public Cloud – SH & BJ & HK

Build Private Clouds – Everywhere, every week

Also on Amazon & RackSpace

Page 5: Building for the Cloud | NC CSDN Cloud Conference 2012

5

Running the World’s Internet Servers www.ChinaNetCloud.com

Build for the Cloud ?

What does this mean ?

Page 6: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Build for the Cloud

Your Web App will run on a Cloud

Public or Private Many choices Inside & Outside China Simple & Complex

Page 7: Building for the Cloud | NC CSDN Cloud Conference 2012

7

Running the World’s Internet Servers www.ChinaNetCloud.com

How are Clouds Different ?

Just the same – VM servers

But different

Page 8: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Cloud Differences

Flexible, grow with you Scalable by SERVER

Even on the SAME SERVER – upgrade Can easily destroy & rebuild

Important for auto-deploy Can clone

Important for scaling, dev/test Some have LOTS of extra services

Page 9: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Cloud Worries

Low Performance Low CPU Low RAM Low Network Low or Variable I/O

Page 10: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Cloud Worries

Hit all limits sooner Big servers are expensive $$$

($500/month+)

And problems can be harder to fix

Requires better management to scale

Page 11: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Cloud Security

Not a big problem

Don't worry about it If really worried, encrypt drives

Always use iptables firewalls Always use best security practices

Page 12: Building for the Cloud | NC CSDN Cloud Conference 2012

12

Running the World’s Internet Servers www.ChinaNetCloud.com

You should . . .

Keep it Simple !

Separate Everything

Why: Better control, monitor, troubleshoot

Load Balance, Web, App ServerSearch, MemCache, DB, Queue

API, Storage, Logs, & Everything Else

Page 13: Building for the Cloud | NC CSDN Cloud Conference 2012

13

Running the World’s Internet Servers www.ChinaNetCloud.com

Cloud API ?

API is a Linux / Windows Server

This is GREAT !

Allows dev / test / prod to matchFrom Laptop to Cloud to Hybrid to Physical

Amazon understood this first

Page 14: Building for the Cloud | NC CSDN Cloud Conference 2012

14

Running the World’s Internet Servers www.ChinaNetCloud.com

Architecture Differences

More Servers & Parts

Split everything – Apps, DBs, functions

Horizontal Scaling – All components

Sub-services – NoSQL, Cache, Queues, Search

Think about using Cloud Services

Page 15: Building for the Cloud | NC CSDN Cloud Conference 2012

15

Running the World’s Internet Servers www.ChinaNetCloud.com

Architecture Differences

Easier to do HA at all levels

API / SoA is best practice

Hybrid Clouds interesting

Page 16: Building for the Cloud | NC CSDN Cloud Conference 2012

16

Running the World’s Internet Servers www.ChinaNetCloud.com

Hybrid Clouds

Virtual & Physical servers in same system

Common in larger systems

Split out DB for IOor Game / Image / Video or CPU

Our largest: 100 servers / 250,000,000 pages/day

Page 17: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Auto-Scaling

Good, in theory

Not useful, in practice

Many issues

Expensive

Forget it

Focus on HA & Reliability

Page 18: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Auto-Deploy

Push code to Production

Puppet, Chef, Capistrano, Jenkins

Useful, though watch DB changes

Easier on Cloud, but still complex

Waste of valuable dev resources for startup

Rare in China

Page 19: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Always Destroy & Create ?

Right-Scale & Other 'Deploy' Systems

Any problem, new code, use new Instance/VM

Not reality for startups

Logs, details, server changes ?

Requires PERFECT server management

Forget this idea

Page 20: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Cloud Problems

I/O is often poor, or fast, then slow

CPU is very limited (not obvious !)

Upgrade instance problems

IP Addresses changes

Storage can be great or messy or both

The details are very important !

Page 21: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Cloud Extra Services

Amazon has many good ones

Most standards-based – MySQL, etc.

LB, DB, Cache, Email, CDN, Search, DNS

Performance & tuning is limited

But simple & useful

Don't get locked-in

Page 22: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Cloud App APIs

PaaS – Platform as a Service

Google App Engine, Azure

Not very popular

Locks you in

Not available in China

Forget about them

Page 23: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Cloud Storage

Local vs. iSCSI (EBS) vs. Remote (S3)

Local most common / easiest

EBS Better on EC2 – Great, complex

Page 24: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Cloud Backups

Many choices

Push to S3 / Remote if you can

Use snapshots if you can

Use VM to test restore !

Page 25: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Public vs. Private Clouds

Private is cheaper to scaleEspecially in China

More secure

We do new Private Clouds weekly

Public is the future for most systems

Page 26: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Cloud Providers – EC2

Best global system

Very powerful & popular

Lots of added services

Hard to use in China – billing, performance

Page 27: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Cloud Providers – AliCloud

New but promising

Limited features, but improving

AWS compatibility will be important

Page 28: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Cloud Providers – Shanda

New – Still single line bandwidth

Hope for national use this summer

Good feature plans & team

Page 29: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Cloud Providers – Other

A few small ones in China

Good for simple projects

1-4 Servers

Limited features

Check details

Page 30: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Public Cloud Pricing

EC2 & HiChina Samples

Small VM – 2GB RAM, 2 CPU

475-750 RMB / Month / Server

Large VM – 8GB RAM, 2-4 CPU

1450-1750 RMB / Month / Server

Page 31: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Summary

Plan for the cloud

Use the cloud to make life easier

Build for scale & success

Start today

Page 32: Building for the Cloud | NC CSDN Cloud Conference 2012

Running the World’s Internet Servers www.ChinaNetCloud.com

Questions ?