Nearly 1,000 takeaways ordered a minute from hungry consumers, with near real time confirmation from restaurants and delivery of their food just 45 minutes later is a hard technical challenge.
AWS allows the many small engineering teams at JUST EAT to take responsibility to meet that challenge, as they build and operate a platform that delivers a takeaway experience for consumers to love.
Learn how we migrated our e-commerce platform to AWS and organise both our platform and teams around the the twin goals of rapid change and high availability. During the session we break things live in production, and watch how the JUST EAT platform is designed around AWS to recover quickly and automatically.
6. 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
7. Meeting our goals with AWS
• We want small,
independent teams
that own loosely
coupled components
• Separate platform into
many CloudFormation
stacks
8. 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
10. 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 Load
Balancing Amazon S3 Amazon EBS Amazon Glacier DynamoDB Amazon RDS
Amazon SES Amazon SNS Amazon SQS
11. Inside a stack – Order API
Platform
Services
Websites
and Apps
APIs
12. 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
13. Launching a stack – Order API
• CloudFormation template is generated as output
• The template defines the entire stack
• CloudFormation generates resources defined in template
and manages their lifecycle
• Running stack
• Ruby command line utility takes information about the
feature as parameters
• Combines component-specific requirements with common
resources, standards and best practices
EnvMan
Template
Stack
16. High availability
Auto Scaling group
eu-west-1a
eu-west-1b
eu-west-1c
Elastic Load Balancer
Performs health checks
JCT devices in
restaurants
Active
Backup
Devices connect to Elastic IP Address
21. High availability
Auto Scaling group
eu-west-1a
eu-west-1b
eu-west-1c
Elastic Load Balancer
Performs health checks
JCT devices in
restaurants
Active
Backup
Devices connect to Elastic IP Address
22. High availability
Auto Scaling group
eu-west-1a
eu-west-1b
eu-west-1c
JCT devices in
restaurants
Backup
StackMan
Elastic Load Balancer
Performs health checks
23. High availability
Auto Scaling group
eu-west-1a
eu-west-1b
eu-west-1c
JCT devices in
restaurants
Active
Backup
StackMan
Elastic Load Balancer
Performs health checks
26. Meeting our goals with AWS
• We want teams that
can focus on building
new features that
customers will love
• Treat infrastructure as
code
27. Order workflow
Order placed
Send to
restaurant
Accepted
RefusedAnalysis
Good
Potential
Issue
Email
confirmation
Send text
message
28. Order workflow
Order placed
Send to
restaurant
Accepted
RefusedAnalysis
Good
Potential
Issue
Email
confirmation
Send text
message
Amazon SNS Amazon SQS
32. 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/
33. JustSaying
public 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));
34. 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
35. 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