Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Sascha Möllering | zanox AG 
Cloud Architecture
About me 
Sascha Möllering 
sascha.moellering@zanox.com 
Lead Engineer / DevOps Hipster 
zanox AG 
http://www.der-maschine...
About me 
Java Magazin 11.14 
Architektur im Kontext der Cloud: Patterns und 
Best Practices 
AWS Virtual Cloud Summit 
Co...
Agenda 
• AWS Overview 
• Creating a cloud service 
• Real World example 
• Cloud deployment 
• Q&A
How can we scale?
How can we scale?
AWS Overview 
Region 
US-WEST (N. California) EU-WEST (Ireland) 
ASIA PAC 
(Tokyo) 
ASIA PAC 
(Singapore) 
US-WEST (Oregon...
AWS Overview 
Availability 
Zone
AWS Overview 
EC2: Resizable compute capacity 
AutoScaling: scale up or down 
Route 53: Domain Name System 
ELB: Load Bala...
AWS Overview 
RDS: Managed database service 
DynamoDB: NoSQL implementation 
Redshift: data warehouse solution 
ElastiCach...
AWS Overview 
S3: Highly-scalable object storage 
CloudFront: CDN implementation 
CloudWatch: Monitoring service 
IAM: Ide...
Starting point 
• How can we leverage the Cloud? 
• Our application: 
– Simple Java based web application 
– One applicati...
Creating a cloud service 
• Initial setup: 
– Route53 for DNS 
– One Elastic IP (static IPs for the Cloud) 
– One EC2 inst...
Creating a cloud service 
Availability Zone
Creating a cloud service 
• Simple approach to scale: 
– More RAM 
– More CPU power 
– More IOPS 
– Different EC2 instance...
Creating a cloud service 
• Problems: 
– No failover 
– No redundancy 
– Database and application on one instance 
– Does ...
Creating a cloud service 
• Separate Web Application from DB 
– One EC2 instance for the Web Application 
– One EC2 instan...
Creating a cloud service 
Availability Zone 
Database
Creating a cloud service 
• Problems: 
– No failover 
– No redundancy 
– Does still not scale very well
Creating a cloud service 
• Add an ELB 
• Add EC2 instance for Web Application 
• Different AZs 
• Standby DB instance 
– ...
Creating a cloud service
Creating a cloud service 
Availability Zone 
Database 
Availability Zone 
Database
Creating a cloud service 
• Problems: 
– Still limited scaling capabilities 
– If one EC2 instance crashes, 50% less 
capa...
Creating a cloud service 
• Add additional EC2 instances 
• Add read replicas in RDS
Creating a cloud service 
Availability Zone 
Database 
Availability Zone 
Database
Creating a cloud service 
• Problems: 
– Naive implementation 
– Does not leverage AWS services 
– Limited scaling 
– Can ...
Creating a cloud service 
• Refactoring 
• Introduce caches to take load from DB 
• Use S3 and CloudFront to ship static 
...
Creating a cloud service 
• Autoscaling 
– Automatic resizing of compute clusters 
based on demand 
– Integrated to Amazon...
Creating a cloud service 
Auto Scaling 
Availability Zone 
group
Creating a cloud service 
• Started with a simple web application 
• Added several Amazon services 
• Managed to shift loa...
Creating a cloud service 
• Next steps: 
– SOA 
– Loose coupling: decouple interactions 
– Amazon services, don‘t reinvent...
Real world example 
• Elastic architecture that grows and 
shrinks 
• Multiple AZs 
• Use case: streaming data 
• Decoupli...
Internet 
Architecture 
Availability Zone 
Auto Scaling group 
Auto Scaling group 
Availability Zone
Architecture
Vert.x 
“Vert.x is a lightweight, high performance application 
platform for the JVM that's designed for modern 
mobile, w...
Architecture 
• Main framework Vert.x 
• mod-kinesis (Kinesis-Adapter for Vert.x) 
• AWS Java SDK 
• IAM roles for Amazon ...
Deployment 
Workstation 
GitHub 
Jenkins 
Nexus 
Python/Fabric 
Datacenter 
Artefakt
Deployment 
EC2 instance with Docker 
registry (port 5000) 
S3 bucket to store 
Docker images
Deployment 
Amazon Cloud 
Workstation 
GitHub 
Jenkins 
Python/Boto 
Docker Image 
Docker Registry S3 bucket with 
Docker ...
Deployment
Deployment
Deployment
EC2 instances and ELB 
python start_docker_instance.py  
-r <myregistry>:5000  
-i kinesis-producer  
-t 95  
-q 2  
-s qu...
EC2 instances and ELB 
python start_elb.py  
-r <myregistry>:5000  
-i kinesis-producer  
-t 95  
-s quality  
-d '-d -p 8...
EC2 instances and ELB
EC2 instances and ELB
Cloud Architecture: Patterns and Best Practices
Cloud Architecture: Patterns and Best Practices
Upcoming SlideShare
Loading in …5
×

Cloud Architecture: Patterns and Best Practices

4,488 views

Published on

This talk shows some of the patterns and best practices if you start using the cloud.

Published in: Technology
  • Be the first to comment

Cloud Architecture: Patterns and Best Practices

  1. 1. Sascha Möllering | zanox AG Cloud Architecture
  2. 2. About me Sascha Möllering sascha.moellering@zanox.com Lead Engineer / DevOps Hipster zanox AG http://www.der-maschinenstuermer.de/ @sascha242
  3. 3. About me Java Magazin 11.14 Architektur im Kontext der Cloud: Patterns und Best Practices AWS Virtual Cloud Summit Continuous delivery in AWS using Docker http://aws-summit.de/ Entwickler Spezial: Docker Über den Wolken: Ein Erfahrungsbericht zum Docker-Einsatz in der Amazon Cloud
  4. 4. Agenda • AWS Overview • Creating a cloud service • Real World example • Cloud deployment • Q&A
  5. 5. How can we scale?
  6. 6. How can we scale?
  7. 7. AWS Overview Region US-WEST (N. California) EU-WEST (Ireland) ASIA PAC (Tokyo) ASIA PAC (Singapore) US-WEST (Oregon) US-EAST (Virginia) SOUTH AMERICA (Sao Paulo) GOV CLOUD ASIA PAC (Sydney) EU-CENTRAL (Frankfurt)
  8. 8. AWS Overview Availability Zone
  9. 9. AWS Overview EC2: Resizable compute capacity AutoScaling: scale up or down Route 53: Domain Name System ELB: Load Balancing Elastic IP: Static IP address
  10. 10. AWS Overview RDS: Managed database service DynamoDB: NoSQL implementation Redshift: data warehouse solution ElastiCache: Managed cache Kinesis: Service for streaming data
  11. 11. AWS Overview S3: Highly-scalable object storage CloudFront: CDN implementation CloudWatch: Monitoring service IAM: Identity and Access Management EMR: Managed Hadoop
  12. 12. Starting point • How can we leverage the Cloud? • Our application: – Simple Java based web application – One application – One database – Runs in our own DC
  13. 13. Creating a cloud service • Initial setup: – Route53 for DNS – One Elastic IP (static IPs for the Cloud) – One EC2 instance • Web Application • Database – One AZ
  14. 14. Creating a cloud service Availability Zone
  15. 15. Creating a cloud service • Simple approach to scale: – More RAM – More CPU power – More IOPS – Different EC2 instance type • Approach will hit a barrier
  16. 16. Creating a cloud service • Problems: – No failover – No redundancy – Database and application on one instance – Does not scale very well
  17. 17. Creating a cloud service • Separate Web Application from DB – One EC2 instance for the Web Application – One EC2 instance for the DB – Or: Managed DB service (RDS) • One AZ
  18. 18. Creating a cloud service Availability Zone Database
  19. 19. Creating a cloud service • Problems: – No failover – No redundancy – Does still not scale very well
  20. 20. Creating a cloud service • Add an ELB • Add EC2 instance for Web Application • Different AZs • Standby DB instance – Multi AZ setup in RDS
  21. 21. Creating a cloud service
  22. 22. Creating a cloud service Availability Zone Database Availability Zone Database
  23. 23. Creating a cloud service • Problems: – Still limited scaling capabilities – If one EC2 instance crashes, 50% less capability
  24. 24. Creating a cloud service • Add additional EC2 instances • Add read replicas in RDS
  25. 25. Creating a cloud service Availability Zone Database Availability Zone Database
  26. 26. Creating a cloud service • Problems: – Naive implementation – Does not leverage AWS services – Limited scaling – Can be quite expensive
  27. 27. Creating a cloud service • Refactoring • Introduce caches to take load from DB • Use S3 and CloudFront to ship static content • Store session data in DynamoDB • Add Autoscaling
  28. 28. Creating a cloud service • Autoscaling – Automatic resizing of compute clusters based on demand – Integrated to Amazon CloudWatch – Maximum and minimum pool sizes – Autoscaling policies triggered by CloudWatch alarms
  29. 29. Creating a cloud service Auto Scaling Availability Zone group
  30. 30. Creating a cloud service • Started with a simple web application • Added several Amazon services • Managed to shift load from application to services • Added caches and CDN • Added Autoscaling
  31. 31. Creating a cloud service • Next steps: – SOA – Loose coupling: decouple interactions – Amazon services, don‘t reinvent the wheel – Database federation – Database sharding
  32. 32. Real world example • Elastic architecture that grows and shrinks • Multiple AZs • Use case: streaming data • Decoupling using Kinesis • IAM Roles for managing credentials • CloudWatch for monitoring
  33. 33. Internet Architecture Availability Zone Auto Scaling group Auto Scaling group Availability Zone
  34. 34. Architecture
  35. 35. Vert.x “Vert.x is a lightweight, high performance application platform for the JVM that's designed for modern mobile, web, and enterprise applications.”
  36. 36. Architecture • Main framework Vert.x • mod-kinesis (Kinesis-Adapter for Vert.x) • AWS Java SDK • IAM roles for Amazon EC2 instances • Coda Hale metrics and CloudWatch reporter • Jedis (Redis client for Java) • …
  37. 37. Deployment Workstation GitHub Jenkins Nexus Python/Fabric Datacenter Artefakt
  38. 38. Deployment EC2 instance with Docker registry (port 5000) S3 bucket to store Docker images
  39. 39. Deployment Amazon Cloud Workstation GitHub Jenkins Python/Boto Docker Image Docker Registry S3 bucket with Docker Images
  40. 40. Deployment
  41. 41. Deployment
  42. 42. Deployment
  43. 43. EC2 instances and ELB python start_docker_instance.py -r <myregistry>:5000 -i kinesis-producer -t 95 -q 2 -s quality -d '-d -p 8080:8080' https://github.com/SaschaMoellering/aws-docker-scripts
  44. 44. EC2 instances and ELB python start_elb.py -r <myregistry>:5000 -i kinesis-producer -t 95 -s quality -d '-d -p 8080:8080' https://github.com/SaschaMoellering/aws-docker-scripts
  45. 45. EC2 instances and ELB
  46. 46. EC2 instances and ELB

×