(WSFC) and SQL Server AlwaysOn Availability Groups on the AWS ...
AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change
-
Upload
daniel-richardson -
Category
Technology
-
view
4.749 -
download
1
description
Transcript of AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change
![Page 1: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/1.jpg)
© 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc.
Customer Story: JUST EATDaniel Richardson, Director of Engineering
30 APRIL 2014
![Page 2: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/2.jpg)
![Page 3: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/3.jpg)
• 13 countries• 36,000 restaurants• Nearly 6 million active
accounts• Nearly 1000 orders a
minute at peak
![Page 4: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/4.jpg)
What we use
Amazon EC2 Amazon EMR Amazon Route 53
Elastic LoadBalancing
AWS Direct Connect
Amazon VPC Auto Scaling
Amazon S3 Amazon EBS
Amazon Glacier
CloudFront
DynamoDB Amazon RDS Amazon SimpleDB
Amazon Redshift
CloudWatch AWS Data Pipeline AWS CloudFormatio
n
IAM Amazon SES
Amazon SNS Amazon SQS Amazon SWF
![Page 5: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/5.jpg)
Engineering goals
High Availability Rapid Change
![Page 6: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/6.jpg)
How we meet our goals
Teams
• Small• Independent• Responsible from
development to live• Focused on features for
consumers and restaurants
Architecture
• Small components• Loosely coupled• Highly available• Designed for failure• Infrastructure as code
![Page 7: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/7.jpg)
Meeting our goals with AWS• We want small,
independent teams that own loosely coupled components
• Separate platform into many CloudFormation stacks
![Page 8: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/8.jpg)
CloudFormation
• Create and manage a set of related AWS resources
• Define resources in template using JSON– Easy to inspect and validate– Easy to consume and generate– Easy to diff and source control
• CloudFormation creates a running stack from template and manages the lifecycle of resources
![Page 9: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/9.jpg)
CloudFormation stacks and teams
Platform Services
Websites and Apps
APIs
![Page 10: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/10.jpg)
Meeting our goals with AWS• We want teams to
take responsibility for the high availability of their components
• Make use of highly available building blocks
Auto Scaling
Amazon Route 53
Elastic LoadBalancing Amazon S3 Amazon
EBSAmazon Glacier
DynamoDB Amazon RDS
Amazon SES
Amazon SNS Amazon SQS
![Page 11: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/11.jpg)
Inside a stack – Order API
Platform Services
Websites and Apps
APIs
![Page 12: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/12.jpg)
Inside a stack – Order API
Auto Scaling group
eu-west-1a
eu-west-1b
eu-west-1c
Amazon S3 bucket
Amazon DynamoDB table
Amazon SQS queue
Amazon SNS topic
Elastic Load Balancer
Route53 hosted zone
![Page 13: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/13.jpg)
Launching a stack – Order API
• CloudFormation template is generated as output• The template defines the entire stack
• CloudFormation generates resources defined in templateand manages their lifecycle
• Running stack
• Ruby command line utility takes information about thefeature as parameters
• Combines component-specific requirements with commonresources, standards and best practices
EnvMan
Template
Stack
![Page 14: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/14.jpg)
Demo: High availability (…or how avoid having your Saturday night ruined)
![Page 15: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/15.jpg)
Restaurant Devices
![Page 16: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/16.jpg)
High availability
Auto Scaling group
eu-west-1a
eu-west-1b
eu-west-1c
Elastic Load BalancerPerforms health checks
JCT devices in restaurants
Active
Backup
Devices connect to Elastic IP Address
![Page 17: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/17.jpg)
Let’s break something
![Page 18: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/18.jpg)
![Page 19: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/19.jpg)
![Page 20: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/20.jpg)
![Page 21: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/21.jpg)
High availability
Auto Scaling group
eu-west-1a
eu-west-1b
eu-west-1c
Elastic Load BalancerPerforms health checks
JCT devices in restaurants
Active
Backup
Devices connect to Elastic IP Address
![Page 22: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/22.jpg)
High availability
Auto Scaling group
eu-west-1a
eu-west-1b
eu-west-1c
JCT devices in restaurants
Backup
StackMan
Elastic Load BalancerPerforms health checks
![Page 23: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/23.jpg)
High availability
Auto Scaling group
eu-west-1a
eu-west-1b
eu-west-1c
JCT devices in restaurants
Active
BackupStackMan
Elastic Load BalancerPerforms health checks
![Page 24: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/24.jpg)
Did it work?
![Page 25: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/25.jpg)
![Page 26: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/26.jpg)
Meeting our goals with AWS• We want teams that
can focus on building new features that customers will love
• Treat infrastructure as code
![Page 27: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/27.jpg)
Order workflow
Order placed
Send to restaurant
Accepted
RefusedAnalysis
Good
Potential Issue
Email confirmatio
n
Send text message
![Page 28: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/28.jpg)
Order workflow
Order placed
Send to restaurant
Accepted
RefusedAnalysis
Good
Potential Issue
Email confirmatio
n
Send text message
Amazon SNS Amazon SQS
![Page 29: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/29.jpg)
Order workflow
OrdersAnalysis
Potentialissue
Good
Send torestaurant
Accepted
Refused
Confirmationemail
Textmessage
![Page 30: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/30.jpg)
Order workflow
OrdersAnalysis
Potentialissue
Good
Send torestaurant
Accepted
Refused
Confirmationemail
Textmessage
![Page 31: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/31.jpg)
Order workflow
OrdersAnalysis
Potentialissue
Good
Send torestaurant
Accepted
Refused
Confirmationemail
Textmessage
Publish message to topic
Other parts of the platform can subscribe
![Page 32: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/32.jpg)
JustSaying
• Open source library for publishing and consuming events / messages over SNS
• Create SNS topics at runtime in code but expressed as business rules
• Download next month: http://github.com/justeat/
![Page 33: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/33.jpg)
JustSayingpublic class OrderAccepted : Message { public OrderAccepted(int orderId) { OrderId = orderId; } public int OrderId { get; private set; }}
var publisher = FluentNotificationStack.Register(configuration => { configuration.Component = Component.OrderValidator; configuration.PublishFailureReAttempts = 3; }) .WithSnsMessagePublisher<OrderAccepted>("OrderProcessing");
publisher.Publish(new OrderAccepted(7349753));
![Page 34: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/34.jpg)
AWS allows us to meet out goals
Engineering goals• Small, independent teams
that own loosely coupled components
• Teams take responsibility for high availability of their components
• Teams that can focus on building new features that customers will love
AWS
• Separate platform into many CloudFormation stacks
• Make use of highly available building blocks
• Treat infrastructure as code
![Page 35: AWS Summit London 2014 - JUST EAT - High Availability and Rapid Change](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e5ffd8b42aa50c8b45d0/html5/thumbnails/35.jpg)
Find out more
• Blog – http://tech.just-eat.com• Open source - https://github.com/justeat• Yes, we’re hiring - http://tech.just-eat.com/jobs• Come and talk to us later – look for the t-shirts