dallas breakfast seminar

41
Architec(ng for the Cloud Larry Gilreath II, Enterprise Solu5on Architect

Upload: nuodb

Post on 16-Jul-2015

86 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Dallas Breakfast Seminar

Architec(ng  for  the  Cloud  Larry  Gilreath  II,  Enterprise  Solu5on  Architect  

Page 2: Dallas Breakfast Seminar

Why  Cloud?

Page 3: Dallas Breakfast Seminar

On  Demand  }  Uniform  Pay  As  You  Go  

Available  

What  is  Cloud?

Page 4: Dallas Breakfast Seminar

On  Demand  }  Uniform  Pay  As  You  Go  

Available  

What  is  Cloud?

Page 5: Dallas Breakfast Seminar

Compute  

Storage  

Security  Scaling  

Database  

Networking  Monitoring  

Messaging  

Workflow  

DNS  Load  Balancing  

Backup  CDN  On  Demand  }  Uniform  Pay  As  You  Go  

Available  

What  is  Cloud?

Page 6: Dallas Breakfast Seminar

From one compute instance…

Page 7: Dallas Breakfast Seminar

… to thousands

Page 8: Dallas Breakfast Seminar

…and back to one

Page 9: Dallas Breakfast Seminar

Loose  coupling  sets  you  free  

•  Load  balance  clusters    

Web  Servers  

App  Servers  Loosely  coupled  

with  a  load  balancer  

How  do  I  leverage  AWS?

Page 10: Dallas Breakfast Seminar

Loose  coupling  sets  you  free    •  Use  a  queue  to  pass  messages  between  components  

Web  Servers  

App  Servers  

Video  Processing  

Servers  

Queue  

Decouple  (ers  with  a  queue  

How  do  I  leverage  AWS?

Page 11: Dallas Breakfast Seminar

How  do  I  leverage  AWS?

Ver5cal  scaling  (more  CPU,  memory,  and  so  on)  will  eventually  run  out  of  room.  

Page 12: Dallas Breakfast Seminar

How  do  I  leverage  AWS?

Ver5cal  scaling  (more  CPU,  memory,  and  so  on)  will  eventually  run  out  of  room.  

Page 13: Dallas Breakfast Seminar

How  do  I  leverage  AWS?

Add  and  remove  instances  as  needed  

Page 14: Dallas Breakfast Seminar

How  do  I  leverage  AWS?

Add  and  remove  instances  as  needed  

Page 15: Dallas Breakfast Seminar

How  do  I  leverage  AWS?

Base  OS  AMI    

An AMI with minimal

components (OS, J2EE, and

Chef/Puppet) is launched. All

configuration occurs via

Chef/Puppet after instance

launch

                                 

OS  AMI  and  library  of  recipes  (install  scripts)  

Amazon  EC2  

Linux  

JEE  

   

Your  Code  

       S3  

Hibernate  

Tomcat  

Log4J  

Spring  

Struts  

Apache  

Linux  

JEE  

Linux  

JEE  

Chef/Puppet  

Chef/puppet  

scripts  

OS  AMI  

Fetch  on  boot  

Page 16: Dallas Breakfast Seminar

How  do  I  leverage  AWS?

Auto  Scaling  Group    

Result

Availability Zone A Availability Zone B

Page 17: Dallas Breakfast Seminar

How  do  I  leverage  AWS?

Auto  Scaling  Group    

Availability Zone A Availability Zone B

Page 18: Dallas Breakfast Seminar

How  do  I  leverage  AWS?

Auto  Scaling  Group    

Availability Zone A Availability Zone B

Page 19: Dallas Breakfast Seminar

How  do  I  leverage  AWS?

Auto  Scaling  Group    

Availability Zone A Availability Zone B

Page 20: Dallas Breakfast Seminar

How  do  I  leverage  AWS?

Auto  Scaling  Group    

Availability Zone A Availability Zone B

Page 21: Dallas Breakfast Seminar

Foundation Services

Compute Storage Database Network

AWS Global Infrastructure Regions

Availability Zones Edge Locations

Client-side Data Encryption & Data Integrity Authentication

Server-side Encryption (File System and/or Data)

Network Traffic Protection (Encryption/Integrity/Identity)

Platform, Applications, Identity & Access Management

Operating System, Network & Firewall Configuration

Customer Data

AWS

Cus

tom

er

Scale  without  Compromising  Security

Page 22: Dallas Breakfast Seminar

Virtual Private Cloud (VPC)

Page 23: Dallas Breakfast Seminar

A  Scalable  Web  Architecture  on  AWS

Availability Zone 1

Web Server Web Server

App Server App Server

Auto Scaling Group (Web Tier)

Auto Scaling Group (App Tier)

SLB

Master  

Availability Zone 2

Web Server Web Server

App Server App Server

Auto Scaling Group (Web Tier)

Auto Scaling Group (App Tier)

Slave  

Availability Zone n

Backups

Static Content

www.mywebsite.com

Build  security  in  every  layer  

SLB

Legend    EC2  Instance  +  

CloudWatch  

Security  Group  

Elas5c  Load  Balancer  

Route  53  Hosted  Zone  

CloudFront  

S3  Bucket  

RDS  Instance  

SSL  @  ELB  Security  Group:  

TCP  80  “amazon-­‐elb-­‐sg”    

Security  Group:  TCP  8080  “web”  

 

Security  Group:  TCP  8080  “slb”  

 DB  connec(on  over  

SSL      

DB  Security  Group:  TCP  3306  “app”  

 

Encrypted  file  system  over  EBS  

 

Bucket  policy    limi(ng  access  

 

Legend    AmazonEC2  

Instance  +  CloudWatch  

Security  Group  

Elas5c  Load  Balancer  

Route  53  Hosted  Zone  

CloudFront  

Amazon  S3  Bucket  

Amazon  RDS  Instance  

Page 24: Dallas Breakfast Seminar

Amazon CloudFormation Deployment and Management

…  and  then  reuse! Use AWS CloudFormation’s sample templates or create your own templates to describe the AWS resources, and any associated dependencies or runtime parameters, required to run your application.

Deploy and update a template and its associated collection of resources “called a stack” via the AWS Management Console, AWS CloudFormation command line tools or APIs. CloudFormation is available at no additional charge, and you pay only for the AWS resources needed.

Template   AWS  CloudForma5on   Stack  

Page 25: Dallas Breakfast Seminar

What  about  scaling  the  Data  Tier? This  is  where  NuoDB  delivers  HUGE  value  …  

Page 26: Dallas Breakfast Seminar

Here  are  some  addiBonal  resources:  AWS CloudFormation Sample Templates: https://aws.amazon.com/cloudformation/aws-cloudformation-templates/

 AWS User Groups: http://aws.amazon.com/usergroups/

  Introduction to AWS IAM Training Video: https://us-east-1-aws-training.s3.amazonaws.com/intro/iam.html

 Service Documentation: http://aws.amazon.com/documentation

 Pricing Calculator: http://aws.amazon.com/calculator/

 Economics: http://aws.amazon.com/economics/

 Pricing details for all services: http://aws.amazon.com/pricing/

 Solutions Case Studies: http://aws.amazon.com/solutions/case-studies

 Marketing Overview Materials: http://aws.amazon.com

 Videos & Webinars: http://www.youtube.com/AmazonWebServices

 AWS Blog: http://aws.typepad.com/

Page 27: Dallas Breakfast Seminar

Architecting for the Cloud

Seth Proctor, CTO @technicallyseth

Page 28: Dallas Breakfast Seminar

What’s unique about “cloud”?

Page 29: Dallas Breakfast Seminar

Cloud architecture   On-demand

  Scale-out for capacity & availability   Public infrastructure; dynamic provisioning

  Flexible   Commodity   Hybrid (public & private)

  Simple   Monitoring & management   Platform APIs and automation

  Resilient

Page 30: Dallas Breakfast Seminar

Why a different architecture?

  Greater capacity   Cost-effectiveness   Higher availability and better failure-handling   Lower latencies for global deployment

Page 31: Dallas Breakfast Seminar

Challenges

  Distribution brings challenges   Lots of failures happen with frequency   More difficult to get a global view   Security & data lifecycle is harder   Everything else about “distributed computing”

  Still, we can scale most layers   Load-balancers & name services at the top   Horizontally-scaled app servers   Caches & CDNs for content   Redundant disks and object stores

Page 32: Dallas Breakfast Seminar

Scaling the database is the real challenge

Page 33: Dallas Breakfast Seminar

Traditional database design

  RDBMS architectures start at the disk   Vertical scale follows   Caching helps, but often breaks consistency   HA systems become very expensive

  Schema & operation is hard to evolve   Hard to harness commodity infrastructure   Not designed to scale-out

Page 34: Dallas Breakfast Seminar

Common options

  Replication   Active-passive or (gulp) multi-master   Replicated data but visible delays & conflict

Sharding   Split one database into many sub-sets   More capacity but hard to evolve and relate

  Abandon consistency   Push correctness & conflict to the application   Simpler core architecture but painful for

applications and hard to reconcile failures

Page 35: Dallas Breakfast Seminar

Side-effects

  Applications are tied to deployment   Hence, dev-ops   Complex for on-demand changes, failures

  More, independent pieces   Harder to interpret failures   Complexity

Page 36: Dallas Breakfast Seminar

Global deployment

  Many motivations   Disaster Recovery   Lower-latency for distributed users   Data access & storage residency rules

  Trade-offs between latencies and safety   Storage may be a separate concern from interaction

Page 37: Dallas Breakfast Seminar

Approach Shared Disk Shared-Nothing/Sharded

Durable Distributed Cache

Key Idea Sharing a file system. Independent databases for disjoint subsets of data.

Replicating data in memory on-demand.

Topology

Example Oracle RAC DB2 Pure Scale

MySQL Cluster and most NoSQL/NewSQL

solutions

Distributed Database Designs

*Note: Most major web properties include custom-sharded MySQL or sharded PostgreSQL, including Facebook, GOOGLE, Wikipedia, Amazon, Flickr, Box.net, and Heroku.   12

Page 38: Dallas Breakfast Seminar

Peer to Peer Architecture

P

P P

S3Disk , ...

P

P NuoDB Database Peer Process

Provisioned, Manageable Resources

Peer to Peer Communications

SQL Client

Management Client

SQL Front-EndSQL Optimizer

Transaction Handling

Object CachingObject Coordination

Durability

P

Page 39: Dallas Breakfast Seminar

Magic Quadrant 2013

About NuoDB

Magic Quadrant 2013 & 2014

NuoDB delivers a distributed SQL database management system specifically designed for the cloud and the modern datacenter.

Magic Quadrant 2013

Page 40: Dallas Breakfast Seminar

Summary

  When architecting for the cloud..   Look for distributed architectures with on-

demand capabilities   Layer & abstract to support evolution and

react gracefully to failures   Assume your needs will evolve; plan with

scale in mind

  Please try out NuoDB!   http://dev.nuodb.com

Page 41: Dallas Breakfast Seminar

Thank you!