20141021 aws cloud taekwon - startup best practices on aws
DESCRIPTION
AWS APAC Principal Technology Evangelist인 Markku Lepisto의 발표내용입니다.TRANSCRIPT
Startup Best Practices on AWS Markku Lepistö Principal Technology Evangelist @markkulepisto
IDEA ! For the next -
Fail Fast Fail Cheap
Fail Forward
Scale Success
Validate Idea
Minimum Viable Product (MVP)
Release quickly Limited core features Iterate in production Decisions based on data
“Production is truly the only place you can validate your code”
- Michael Nygard, author of ‘Release it!
Application Architecture for MVP’s Core Features
Tightly Coupled, Monolithic (monster)
Decomposed to Services
Decomposed to Services
Decomposed to Services
Define Your MVP’s Building Blocks
Define Your MVP’s Building Blocks
Compute
Object Store
Load Balancer
SQL Database
Identity & Access
Data Warehouse
Application Lifecycle
CDN
Recommendation Engine
Social Login SSO
BI Analytics
Web Server
Reverse Proxy
My Second Cool Feature My Cool Feature
Focus
Focus on Your Core Differentiator
Offload Undifferentiating Ones to Services
Amazon EC2
Amazon S3
Elastic Load Balancing
Amazon RDS
AWS IAM
Amazon RedShift
AWS OpsWorks
Amazon CloudFront
EasyRec
HybridAuth
JasperSoft
Puma
Nginx
My Second Cool Feature My Cool Feature
Amazon Web Services
Regions, Zones and Edge Locations
Platform Services
Databases
Caching
Relational
No SQL
Analytics
Hadoop
Real-time
Data Workflows
Data Warehouse
App Services
Queuing
Orchestration
App Streaming
Transcoding
Search
Deployment & Management
Containers
Dev/ops Tools
Resource Templates
Usage Tracking
Monitoring and Logs
Mobile Services
Identity
Sync
Mobile Analytics
Notifications
Foundation Services
Compute (VMs, Auto-scaling and Load Balancing)
Storage (Object, Block and Archive)
Security & Access Control Networking
Infrastructure Regions CDN and Points of Presence Availability Zones
Enterprise Applications
Virtual Desktops
Collaboration and Sharing
Discover SW Components – AWS marketplace
Discover SW Components – GitHub
Discover SW Components – NetflixOSS
Services are Black Boxes Exposed via APIs
My Cool Feature
Iterate, even re-write internal
implementation
API is stable, with few changes,
potentially versioning
API
e.g JSON / REST over HTTP
Loose Coupling Enables Scale-out and Resiliency
Use Message Queues
Loose Coupling Enables Scale-out and Resiliency
Use Message Queues
Simple Queue Service (SQS)
Loose Coupling Enables Scale-out and Resiliency
Use Idempotent Interfaces
Loose Coupling Enables Scale-out and Resiliency
Use Circuit Breakers
Loose Coupling Enables Scale-out and Resiliency
Use Circuit Breakers
Temporarily bypass unresponsive
service. Switch to degraded mode
transactions
Auto Scale, Load Balance, Monitor, HA Assure Each Service Separately
Statelessness Enables Scale-out
Separate State and Data from Compute Instances
Load Balanced, Auto Scaling pool of EC2 Workers
Scalable Services for
State and Data ElastiCache DynamoD
B S3
Amazon DynamoDB
Zero Admin NoSQL Service
Unlimited Storage
Provisioned Throughput
<10ms response time
Durable on SSD
Cloud-SOA
Service Oriented Architecture
Cloud-native New Applications SOA principles leveraging Cloud services Architect for • Automation • Scale • Cost • Availability • Data
Applications are • Always-on • Self-healing • Anti-fragile
Implemented by Two-Pizza Teams
Small, autonomous teams Full responsibility for Service X Decoupled launch schedules No handovers Trust
Putting It All Together into a Solution
Putting It All Together into a Solution
Putting It All Together into a Solution
Putting It All Together into a Solution
= Programmable Platform
If you can program it You can automate it
AWS SDKs
Java SDK … res = ec2.runInstances new RunInstancesRequest([ imageId: "ami-00754474", keyName: ”MyKeyPair", instanceType: ”m3.medium", securityGroups: [”MySecurityGroup"], minCount: 1, maxCount: 1, userData: "AWSWeb.war".bytes.encodeBase64().toString() ]) …
Unified Command Line Interface
~ $ aws ec2 run-instances --image-id ami-554ac83c --min-count 1 --max-count 1 --key-name MyKeyPair --security-groups MySecurityGroup
« Cloud Instance is an implementation of a known, good state »
Dr Rich Wolski, UCSB
AMI AMI AMI
YOUR CODE
CORE SERVICES
3rd PARTY LIBRARIES
OPERATING SYSTEM
YOUR CODE
CORE SERVICES
3rd PARTY LIBRARIES
OPERATING SYSTEM
YOUR CODE
CORE SERVICES
3rd PARTY LIBRARIES
OPERATING SYSTEM
Pre-baked Image Base OS Image + Orchestration
3rd Party Configuration Mgmt & Orchestration Tools
AWS OpsWorks AWS CloudFormation AWS Elastic Beanstalk
DevOps framework for application lifecycle
management and automation
Templates to deploy & update infrastructure
as code
Automated resource management – web
apps made easy
DIY / On Demand DIY, on demand
resources: EC2, S3, custom AMI’s, etc.
Control Convenience
AWS Services for Application Lifecycle Management
CloudFormation Template
SOURCE CODE REPOSITORY
DNS
CONTINUOUS INTEGRATION SERVER
PROJECT MANAGEMENT SERVER
BUILDS
DATABASE
STORAGE
CLOUDFORMATION TEMPLATE
BUILD + DB SNAPSHOT
Application Versions + Infrastructure Versions
Application Your Code
Infrastructure To Run and Support Your Code
Deliver Continuously
test
Continuous Integration
code build plan
Agile Development
Source http://www.collab.net
deploy operate
collaboration
valu
e
DevOps
release
Continuous Delivery
Go Global – in Minutes
Launch in a test market A/B Testing Collect all logs Analytics Insights Iterate or Pivot
Once you hit the sweet spot – Replicate to all regions
Measure outliers & ends of distribution
Measure & Log Everything
Amazon CloudWatch
COLLECT | STORE | ANALYZE | SHARE
Import Export
Glacier
S3 EC2
Redshift DynamoDB
EMR
Data Pipeline
S3 Direct Connect
Leverage AWS Big Data Services
CloudFront
Kinesis
Keep Iterating
Keep Innovating
« Want to increase innovation? Lower the cost of failure »
Joi Ito MIT MediaLabs
AWS Lowers the Cost of Failure
Experiment Often
Fail quickly at
a low cost
More Innovation
Experiment Infrequently
Failure is expensive
Less
Innovation
“ON-PREMISE”
AWS Cloud Taekwon
Which Track to choose? I have used AWS before and/or
understand the basics?
I like to learn AWS basics & get my MVP go global
Track 1
NO
YES NO
I am a Techie & want to Dive Deep into AWS
Track 2
YES
NO YES
I like to learn Startup Insights &
Best Practices
Track 3
YES NO