building for the cloud | nc csdn cloud conference 2012
TRANSCRIPT
Copyright © 2012 ChinaNetCloudServer Management Cloud computing Consulting
Running the World’s Internet Servers
Building for the CloudBy Steve Mushero
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
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
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
5
Running the World’s Internet Servers www.ChinaNetCloud.com
Build for the Cloud ?
What does this mean ?
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
7
Running the World’s Internet Servers www.ChinaNetCloud.com
How are Clouds Different ?
Just the same – VM servers
But different
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
Running the World’s Internet Servers www.ChinaNetCloud.com
Cloud Worries
Low Performance Low CPU Low RAM Low Network Low or Variable I/O
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
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
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
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
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
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
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
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
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
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
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 !
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
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
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
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 !
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
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
Running the World’s Internet Servers www.ChinaNetCloud.com
Cloud Providers – AliCloud
New but promising
Limited features, but improving
AWS compatibility will be important
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
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
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
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
Running the World’s Internet Servers www.ChinaNetCloud.com
Questions ?