SlideShare a Scribd company logo
1 of 60
From Heroku to AWS
a Migration Story
Who am I?
• Sebastian Schleicher, Head of IT @Blinkist

http://about.me/sebastian.schleicher
• Blinkist

iOS & Android app with some backend & web app,

Head count of 40 with 10 Developers, 1 DevOps (since 2016)
The App in Focus
Ruby API
MongoDB
ENV["MONGODB_URL"]
Let’s get back to the
beginnings…
The Beginnings (2012)
• Dedicated Server, 79€/Month
• Virtualized Stack
• Puppet or Chef, don't remember
• Java API
• Subversion
Set up by Student Friend
}
Deployment Process
build *.war file
ftp upload api.war > webapps/
Tomcat auto deploy ✅
❓
tail -f tomcat.logs
ssh tomcat-machine
Deployment Process
• ❌ Manual upload of artifact files
• ❌ No tests
• ❌ Unclear deployment state
• ❌ Some Tomcat instance ….
• 🚙 Subversion
• ✅ Centralized logging

(as there’s only one server 🙈)
Problems
• Our experience

We - naive developers - thought that’s a good way of doing it
• No knowledge of infrastructure

We’re good application developers, no more
• Hardware outtake

During final presentation in front of our investors. We had to recover
somehow without the student friend 😱
We’ve had to switch, Heroku comes to our rescue
Heroku
• Developers must love it
• Simple Deployment via Git remote
• No operations
• No infrastructure
• Beautiful CLI
• Scale at ease
Blinkist’s Heroku Stack
• Switched from Java to Ruby and started writing tests
• Switched from Subversion to Git/-hub
• CI/CD with Codeship
• Logging via Heroku Log Drains to Loggly
Set up within 1 week! 😂
And we scaled it.
Heroku App Count
0
4
8
12
16
2012 2013 2014 2015 2016
15
7
4
3
2
Deployment Process
git push
test
deploy
✅
@Codeship
@Heroku
Deployment Process
• 🚀 Git with GitHub
• ✅ Everything’s tested before …
• ✅ … CI tool automatically deploys
• ✅ Centralized logging (also more multiple apps)
We thought to be heroes for ever and ever!
Advantages
• No 24/7 availability

We could go into our weekend within fearing for an outtake
• No maintenance

Heroku takes care of patching systems and keeping everything
healthy
• New features every month

Heroku continuously adds new features like Review-Dynos (swag!)
This is the best of the best! 😻
but…
Disadvantages
• Availability

Heroku dynos are-unreachable quite frequently for different reasons
• Multi-tenant system

One single Heroku Customer and screw the stack 

(our dyno’s IPs got blocked a few times by CDNs)
• Low network performance

Inbound and outbound latency can be pretty high
• Request queuing

Takes up to 10% of the overall request time
• Performance improvements are pricey

2015 Heroku introduced new, more expensive dyno types
Disadvantage: Lock-in
• Lack of infrastructure knowledge 💣

Heroku let us scale without learning about infrastructure
• No fallback

We weren’t able to point our DNS to another system
• Poor performance

We couldn’t optimize our code anymore regarding speed
We wanted to
• Make our apps deployable everywhere (pot.)

No more platform lock-in
• Gain more control over the infrastructure

Change network, memory, CPU to our needs
• Keep costs at an adequate level

We need to grow reasonable
• Keep our current release pace and deployment quality

The new solution has to be simple to work with
• Teach developers to work with infrastructure

Empower them to master the whole stack
We decided to 

dockerize and AWSify 

our stack …
… and hired a
DevOps Hero.
The goal for deployment
git push
test
deploy
✅
@Codeship
@AWS
Our approach
• Dockerize the service

We need to have a containerized runtime env
• Deploy via Elastic Beanstalk (Multicontainer)

Create a Heroku-style deployment experience
• CI/CD via Codeship

Using their script-based integration
First challenge from Business
• World wide App feature in October 2016

In Apple AppStore and Google PlayStore
• Potentially high increase in load

From ~2.5k RPM to 15k (6x!)
We dockerized and deployed

to Elastic Beanstalk in high
speed mode
…and benchmarked
this setup with locust.io
AWS
6x c4.xlarge
Heroku
That’s impressive 

(and scary)
We switched the
API to run on AWS
Heroku shutdown
AWS startup
AWS API today
We can now challenge
any App feature
But what about
deployment?
Beanstalk
Deployment Process
git push
docker build
docker test
✅
Collect and prepare
Beanstalk config files in
BusyBox
zip -r config.zip *
upload to S3
Create new app
version for ENV
Wait for Beanstalk
to become green
@CI/CD
Deployment Duration
Minutes
0
4
8
12
16
Heroku Beanstalk via Codeship Beanstalk via CircleCI
10
15
2
Timeout during deployment
Due to Elastic Beanstalk, not CircleCI
Deployment Process
• ✅ Everything automated
• ❌ Random test failures

(e.g. DB wasn’t ready when specs started)
• ❌ Custom-build scripts
• ❌ Long running deployment process
• ❌ Rolling updates sometimes fail on single machines
This felt like a big step backwards
Side note: Update Env Variable
Minutes
0
2,5
5
7,5
10
Heroku Beanstalk
10
1
And the 

developer experience?
Developer experience
• Annoyance due to deployment times

Our devs get nervous if a deployment takes more
than 10 minutes
• Lack of simple CLI

They need to ssh into the machines and navigate
around with root permissions
• Lack of some Heroku features

Like the (swag!) PR review apps
Let’s check costs!
Beanstalk setup per app
Load Balancer
EC2 EC2 EC2
API
Beanstalk setup at scale
ELB
EC2 EC2 EC2
ELB
EC2 EC2
ELB
EC2 EC2 EC2
API
ELB
EC2 EC2 EC2
WEB
SERVICES
ELB
EC2 EC2 EC2
Already 14 EC2 plus 5 ELB instances in this example
Beanstalk setup
• Pricy scaling

Having one EC2 instance per docker process is
extremely expensive with multiple apps/services. 

Usually you’ll have at least 1 ELB plus 2 EC2 instances
• Hard to maintain

Changes to the infrastructure need to be rolled out
across apps
• Increasing deployment time

The more instances we have per ELB, the longer the
deployment takes
So where are we now?
Recap: We wanted to
• ✅ Make our apps deployable everywhere

Thanks to Docker, potentially easy
• ✅ Gain more control over the infrastructure

Done, we can choose the EC2 instance type easily
• ❌ Keep costs at an adequate level

Beanstalk scales at high prices as many EC2 instances are needed
• ❌ Keep our current release pace and deployment quality

The new process is error prone and slow
• ❌ Teach developers to work with infrastructure

They avoid working in this infrastructure as it’s too risky to f*** it up
How can we improve?
Costs: Beanstalk setup
Classic Load Balancer
EC2 EC2 EC2
> Memo: We’re talking about Multicontainer environment <
API
Classic Load Balancer
ECS ECS ECS
EC2 EC2 EC2
What is powering it?
API
Multiple Apps
Classic Load Balancer
ECS ECS ECS
API
Classic Load Balancer
ECS ECS ECS
Service A
EC2 EC2 EC2 EC2 EC2 EC2
So: Switch to pure ECS
Application Load Balancer
API 

Service A

Service B
API 

Service A

Service B
API 

Service A

Service B
ECS ECS ECS
EC2 EC2 EC2
us-east1-a us-east1-b us-east1-c
Release pace and quality
• Split Docker images

Pre-create docker base images with GEMs installed
• Minimize Docker images

We continuously evaluate other ways to minimize image
sizes, e.g. docker-squash, clean up GEMs
• Powerful ECS instances over small Beanstalk EC2s

Bigger instances with higher networking will deploy docker
images quicker
Developer satisfaction
• Mistrust in Docker for development

Our developers are hard to convince of the benefits of Docker
for local development - never change a running system…
• Workshop for infrastructure basics

We’re continuously holding workshops on Docker for
development and other infrastructure topics
• Stabilize releases

Only a trusted and reliable system will be accepted
• Build a CLI

We want to build or find a CLI to easily interact with our apps
Maintainability of infrastructure
• No more UI based infrastructure

Our current AWS services are created fully by click
• Scripted infrastructure

We believe that every bit of our tech stack has to be
code. Terraform seems to be a promising solution
that offers a descriptive approach to creating a
reproducible, reviewable and testable environment
of infrastructure components and there their
interconnections.
http://www.meetup.com/de-DE/terraform-berlin-user-group/
We’ll talk about our
results and learnings
in Q1/2017
From Heroku to AWS
a Migration Story
to be continued
I’m looking forward to
receive your feedback 

and inspiration
- Thank you -

More Related Content

What's hot

DevOps and AWS - Code PaLOUsa 2017
DevOps and AWS  - Code PaLOUsa 2017DevOps and AWS  - Code PaLOUsa 2017
DevOps and AWS - Code PaLOUsa 2017James Strong
 
Adobe Experience Manager - Replication deep dive
Adobe Experience Manager - Replication deep diveAdobe Experience Manager - Replication deep dive
Adobe Experience Manager - Replication deep divemwmd
 
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...C4Media
 
Microservices Architecture for Content Management Systems using AWS Lambda an...
Microservices Architecture for Content Management Systems using AWS Lambda an...Microservices Architecture for Content Management Systems using AWS Lambda an...
Microservices Architecture for Content Management Systems using AWS Lambda an...Mitoc Group
 
Alfresco Process Services (APS) and the Internet of Things
Alfresco Process Services (APS) and the Internet of ThingsAlfresco Process Services (APS) and the Internet of Things
Alfresco Process Services (APS) and the Internet of ThingsNathan McMinn
 
Alfresco Process Services REST API - Alfresco DevCon 2018
 Alfresco Process Services REST API - Alfresco DevCon 2018 Alfresco Process Services REST API - Alfresco DevCon 2018
Alfresco Process Services REST API - Alfresco DevCon 2018Dennis Koch
 
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...Steve Kessler
 
ECS19 Elio Struyf - Setting Up Your SPFx CI/CD pipelines on Azure DevOps
ECS19 Elio Struyf - Setting Up Your SPFx CI/CD pipelines on Azure DevOpsECS19 Elio Struyf - Setting Up Your SPFx CI/CD pipelines on Azure DevOps
ECS19 Elio Struyf - Setting Up Your SPFx CI/CD pipelines on Azure DevOpsEuropean Collaboration Summit
 
Writing less code with Serverless on AWS at OOP 2022
Writing less code with Serverless on AWS at OOP 2022Writing less code with Serverless on AWS at OOP 2022
Writing less code with Serverless on AWS at OOP 2022Vadym Kazulkin
 
Evolving Services Into A Cloud Native World
Evolving Services Into A Cloud Native WorldEvolving Services Into A Cloud Native World
Evolving Services Into A Cloud Native WorldIain Hull
 
From Zero to Serverless (DogFoodCon 2018)
From Zero to Serverless (DogFoodCon 2018)From Zero to Serverless (DogFoodCon 2018)
From Zero to Serverless (DogFoodCon 2018)Chad Green
 
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...Vadym Kazulkin
 
DevOps - A Gentle Introduction
DevOps - A Gentle IntroductionDevOps - A Gentle Introduction
DevOps - A Gentle IntroductionGanesh Samarthyam
 
Micro service architecture - building scalable web solutions - George James -...
Micro service architecture - building scalable web solutions - George James -...Micro service architecture - building scalable web solutions - George James -...
Micro service architecture - building scalable web solutions - George James -...Red Blue Blur Ideas
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Ryan Cuprak
 
DevCon 2018 - 5 ways to use AWS with Alfresco
DevCon 2018 - 5 ways to use AWS with AlfrescoDevCon 2018 - 5 ways to use AWS with Alfresco
DevCon 2018 - 5 ways to use AWS with AlfrescoGavin Cornwell
 
Embracing Failure - Fault Injection and Service Resilience at Netflix
Embracing Failure - Fault Injection and Service Resilience at NetflixEmbracing Failure - Fault Injection and Service Resilience at Netflix
Embracing Failure - Fault Injection and Service Resilience at NetflixJosh Evans
 
用Serverless技術快速開發line聊天機器人
用Serverless技術快速開發line聊天機器人用Serverless技術快速開發line聊天機器人
用Serverless技術快速開發line聊天機器人Kevin Luo
 

What's hot (20)

DevOps and AWS - Code PaLOUsa 2017
DevOps and AWS  - Code PaLOUsa 2017DevOps and AWS  - Code PaLOUsa 2017
DevOps and AWS - Code PaLOUsa 2017
 
Adobe Experience Manager - Replication deep dive
Adobe Experience Manager - Replication deep diveAdobe Experience Manager - Replication deep dive
Adobe Experience Manager - Replication deep dive
 
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
 
Microservices Architecture for Content Management Systems using AWS Lambda an...
Microservices Architecture for Content Management Systems using AWS Lambda an...Microservices Architecture for Content Management Systems using AWS Lambda an...
Microservices Architecture for Content Management Systems using AWS Lambda an...
 
Alfresco Process Services (APS) and the Internet of Things
Alfresco Process Services (APS) and the Internet of ThingsAlfresco Process Services (APS) and the Internet of Things
Alfresco Process Services (APS) and the Internet of Things
 
Alfresco Process Services REST API - Alfresco DevCon 2018
 Alfresco Process Services REST API - Alfresco DevCon 2018 Alfresco Process Services REST API - Alfresco DevCon 2018
Alfresco Process Services REST API - Alfresco DevCon 2018
 
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
 
ECS19 Elio Struyf - Setting Up Your SPFx CI/CD pipelines on Azure DevOps
ECS19 Elio Struyf - Setting Up Your SPFx CI/CD pipelines on Azure DevOpsECS19 Elio Struyf - Setting Up Your SPFx CI/CD pipelines on Azure DevOps
ECS19 Elio Struyf - Setting Up Your SPFx CI/CD pipelines on Azure DevOps
 
Writing less code with Serverless on AWS at OOP 2022
Writing less code with Serverless on AWS at OOP 2022Writing less code with Serverless on AWS at OOP 2022
Writing less code with Serverless on AWS at OOP 2022
 
Evolving Services Into A Cloud Native World
Evolving Services Into A Cloud Native WorldEvolving Services Into A Cloud Native World
Evolving Services Into A Cloud Native World
 
React Native Workshop
React Native WorkshopReact Native Workshop
React Native Workshop
 
From Zero to Serverless (DogFoodCon 2018)
From Zero to Serverless (DogFoodCon 2018)From Zero to Serverless (DogFoodCon 2018)
From Zero to Serverless (DogFoodCon 2018)
 
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
 
Spinnaker Microsrvices
Spinnaker MicrosrvicesSpinnaker Microsrvices
Spinnaker Microsrvices
 
DevOps - A Gentle Introduction
DevOps - A Gentle IntroductionDevOps - A Gentle Introduction
DevOps - A Gentle Introduction
 
Micro service architecture - building scalable web solutions - George James -...
Micro service architecture - building scalable web solutions - George James -...Micro service architecture - building scalable web solutions - George James -...
Micro service architecture - building scalable web solutions - George James -...
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
 
DevCon 2018 - 5 ways to use AWS with Alfresco
DevCon 2018 - 5 ways to use AWS with AlfrescoDevCon 2018 - 5 ways to use AWS with Alfresco
DevCon 2018 - 5 ways to use AWS with Alfresco
 
Embracing Failure - Fault Injection and Service Resilience at Netflix
Embracing Failure - Fault Injection and Service Resilience at NetflixEmbracing Failure - Fault Injection and Service Resilience at Netflix
Embracing Failure - Fault Injection and Service Resilience at Netflix
 
用Serverless技術快速開發line聊天機器人
用Serverless技術快速開發line聊天機器人用Serverless技術快速開發line聊天機器人
用Serverless技術快速開發line聊天機器人
 

Similar to From Heroku to Amazon AWS

Building Efficient Parallel Testing Platforms with Docker
Building Efficient Parallel Testing Platforms with DockerBuilding Efficient Parallel Testing Platforms with Docker
Building Efficient Parallel Testing Platforms with DockerLaura Frank Tacho
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2Docker, Inc.
 
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...DynamicInfraDays
 
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAnnouncing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAmazon Web Services
 
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWSCloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWSAWS Vietnam Community
 
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container ServicePlay Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container ServiceJosh Padnick
 
Handling 1 Billion Requests/hr with Minimal Latency Using Docker
Handling 1 Billion Requests/hr with Minimal Latency Using DockerHandling 1 Billion Requests/hr with Minimal Latency Using Docker
Handling 1 Billion Requests/hr with Minimal Latency Using DockerMatomy
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
 
Into the cloud
Into the cloudInto the cloud
Into the cloudTomas Riha
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsAmazon Web Services
 
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERContinuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERIndrajit Poddar
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...E. Camden Fisher
 
Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realistsKarthik Gaekwad
 
A tale of two pizzas: Developer tools at AWS
A tale of two pizzas: Developer tools at AWSA tale of two pizzas: Developer tools at AWS
A tale of two pizzas: Developer tools at AWSAmazon Web Services
 
SRV312 DevOps on AWS: Building Systems to Deliver Faster
SRV312 DevOps on AWS: Building Systems to Deliver FasterSRV312 DevOps on AWS: Building Systems to Deliver Faster
SRV312 DevOps on AWS: Building Systems to Deliver FasterAmazon Web Services
 
Container Orchestration for .NET Developers
Container Orchestration for .NET DevelopersContainer Orchestration for .NET Developers
Container Orchestration for .NET DevelopersMike Melusky
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsAmazon Web Services
 
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Lean IT Consulting
 

Similar to From Heroku to Amazon AWS (20)

Building Efficient Parallel Testing Platforms with Docker
Building Efficient Parallel Testing Platforms with DockerBuilding Efficient Parallel Testing Platforms with Docker
Building Efficient Parallel Testing Platforms with Docker
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2
 
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
 
Container Days
Container DaysContainer Days
Container Days
 
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAnnouncing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck Talks
 
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWSCloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
 
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container ServicePlay Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
 
Handling 1 Billion Requests/hr with Minimal Latency Using Docker
Handling 1 Billion Requests/hr with Minimal Latency Using DockerHandling 1 Billion Requests/hr with Minimal Latency Using Docker
Handling 1 Billion Requests/hr with Minimal Latency Using Docker
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
Into the cloud
Into the cloudInto the cloud
Into the cloud
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERContinuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
 
Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realists
 
JustLetMeCode-Final
JustLetMeCode-FinalJustLetMeCode-Final
JustLetMeCode-Final
 
A tale of two pizzas: Developer tools at AWS
A tale of two pizzas: Developer tools at AWSA tale of two pizzas: Developer tools at AWS
A tale of two pizzas: Developer tools at AWS
 
SRV312 DevOps on AWS: Building Systems to Deliver Faster
SRV312 DevOps on AWS: Building Systems to Deliver FasterSRV312 DevOps on AWS: Building Systems to Deliver Faster
SRV312 DevOps on AWS: Building Systems to Deliver Faster
 
Container Orchestration for .NET Developers
Container Orchestration for .NET DevelopersContainer Orchestration for .NET Developers
Container Orchestration for .NET Developers
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
 

Recently uploaded

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 

Recently uploaded (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 

From Heroku to Amazon AWS

  • 1. From Heroku to AWS a Migration Story
  • 2. Who am I? • Sebastian Schleicher, Head of IT @Blinkist
 http://about.me/sebastian.schleicher • Blinkist
 iOS & Android app with some backend & web app,
 Head count of 40 with 10 Developers, 1 DevOps (since 2016)
  • 3. The App in Focus Ruby API MongoDB ENV["MONGODB_URL"]
  • 4. Let’s get back to the beginnings…
  • 5. The Beginnings (2012) • Dedicated Server, 79€/Month • Virtualized Stack • Puppet or Chef, don't remember • Java API • Subversion Set up by Student Friend }
  • 6. Deployment Process build *.war file ftp upload api.war > webapps/ Tomcat auto deploy ✅ ❓ tail -f tomcat.logs ssh tomcat-machine
  • 7. Deployment Process • ❌ Manual upload of artifact files • ❌ No tests • ❌ Unclear deployment state • ❌ Some Tomcat instance …. • 🚙 Subversion • ✅ Centralized logging
 (as there’s only one server 🙈)
  • 8. Problems • Our experience
 We - naive developers - thought that’s a good way of doing it • No knowledge of infrastructure
 We’re good application developers, no more • Hardware outtake
 During final presentation in front of our investors. We had to recover somehow without the student friend 😱 We’ve had to switch, Heroku comes to our rescue
  • 9. Heroku • Developers must love it • Simple Deployment via Git remote • No operations • No infrastructure • Beautiful CLI • Scale at ease
  • 10. Blinkist’s Heroku Stack • Switched from Java to Ruby and started writing tests • Switched from Subversion to Git/-hub • CI/CD with Codeship • Logging via Heroku Log Drains to Loggly Set up within 1 week! 😂
  • 12. Heroku App Count 0 4 8 12 16 2012 2013 2014 2015 2016 15 7 4 3 2
  • 14. Deployment Process • 🚀 Git with GitHub • ✅ Everything’s tested before … • ✅ … CI tool automatically deploys • ✅ Centralized logging (also more multiple apps) We thought to be heroes for ever and ever!
  • 15. Advantages • No 24/7 availability
 We could go into our weekend within fearing for an outtake • No maintenance
 Heroku takes care of patching systems and keeping everything healthy • New features every month
 Heroku continuously adds new features like Review-Dynos (swag!) This is the best of the best! 😻
  • 17.
  • 18. Disadvantages • Availability
 Heroku dynos are-unreachable quite frequently for different reasons • Multi-tenant system
 One single Heroku Customer and screw the stack 
 (our dyno’s IPs got blocked a few times by CDNs) • Low network performance
 Inbound and outbound latency can be pretty high • Request queuing
 Takes up to 10% of the overall request time • Performance improvements are pricey
 2015 Heroku introduced new, more expensive dyno types
  • 19. Disadvantage: Lock-in • Lack of infrastructure knowledge 💣
 Heroku let us scale without learning about infrastructure • No fallback
 We weren’t able to point our DNS to another system • Poor performance
 We couldn’t optimize our code anymore regarding speed
  • 20. We wanted to • Make our apps deployable everywhere (pot.)
 No more platform lock-in • Gain more control over the infrastructure
 Change network, memory, CPU to our needs • Keep costs at an adequate level
 We need to grow reasonable • Keep our current release pace and deployment quality
 The new solution has to be simple to work with • Teach developers to work with infrastructure
 Empower them to master the whole stack
  • 21. We decided to 
 dockerize and AWSify 
 our stack …
  • 22. … and hired a DevOps Hero.
  • 23. The goal for deployment git push test deploy ✅ @Codeship @AWS
  • 24. Our approach • Dockerize the service
 We need to have a containerized runtime env • Deploy via Elastic Beanstalk (Multicontainer)
 Create a Heroku-style deployment experience • CI/CD via Codeship
 Using their script-based integration
  • 25. First challenge from Business • World wide App feature in October 2016
 In Apple AppStore and Google PlayStore • Potentially high increase in load
 From ~2.5k RPM to 15k (6x!)
  • 26. We dockerized and deployed
 to Elastic Beanstalk in high speed mode
  • 31. We switched the API to run on AWS
  • 35. We can now challenge any App feature
  • 37. Beanstalk Deployment Process git push docker build docker test ✅ Collect and prepare Beanstalk config files in BusyBox zip -r config.zip * upload to S3 Create new app version for ENV Wait for Beanstalk to become green @CI/CD
  • 38. Deployment Duration Minutes 0 4 8 12 16 Heroku Beanstalk via Codeship Beanstalk via CircleCI 10 15 2
  • 39. Timeout during deployment Due to Elastic Beanstalk, not CircleCI
  • 40. Deployment Process • ✅ Everything automated • ❌ Random test failures
 (e.g. DB wasn’t ready when specs started) • ❌ Custom-build scripts • ❌ Long running deployment process • ❌ Rolling updates sometimes fail on single machines This felt like a big step backwards
  • 41. Side note: Update Env Variable Minutes 0 2,5 5 7,5 10 Heroku Beanstalk 10 1
  • 42. And the 
 developer experience?
  • 43. Developer experience • Annoyance due to deployment times
 Our devs get nervous if a deployment takes more than 10 minutes • Lack of simple CLI
 They need to ssh into the machines and navigate around with root permissions • Lack of some Heroku features
 Like the (swag!) PR review apps
  • 45. Beanstalk setup per app Load Balancer EC2 EC2 EC2 API
  • 46. Beanstalk setup at scale ELB EC2 EC2 EC2 ELB EC2 EC2 ELB EC2 EC2 EC2 API ELB EC2 EC2 EC2 WEB SERVICES ELB EC2 EC2 EC2 Already 14 EC2 plus 5 ELB instances in this example
  • 47. Beanstalk setup • Pricy scaling
 Having one EC2 instance per docker process is extremely expensive with multiple apps/services. 
 Usually you’ll have at least 1 ELB plus 2 EC2 instances • Hard to maintain
 Changes to the infrastructure need to be rolled out across apps • Increasing deployment time
 The more instances we have per ELB, the longer the deployment takes
  • 48. So where are we now?
  • 49. Recap: We wanted to • ✅ Make our apps deployable everywhere
 Thanks to Docker, potentially easy • ✅ Gain more control over the infrastructure
 Done, we can choose the EC2 instance type easily • ❌ Keep costs at an adequate level
 Beanstalk scales at high prices as many EC2 instances are needed • ❌ Keep our current release pace and deployment quality
 The new process is error prone and slow • ❌ Teach developers to work with infrastructure
 They avoid working in this infrastructure as it’s too risky to f*** it up
  • 50. How can we improve?
  • 51. Costs: Beanstalk setup Classic Load Balancer EC2 EC2 EC2 > Memo: We’re talking about Multicontainer environment < API
  • 52. Classic Load Balancer ECS ECS ECS EC2 EC2 EC2 What is powering it? API
  • 53. Multiple Apps Classic Load Balancer ECS ECS ECS API Classic Load Balancer ECS ECS ECS Service A EC2 EC2 EC2 EC2 EC2 EC2
  • 54. So: Switch to pure ECS Application Load Balancer API 
 Service A
 Service B API 
 Service A
 Service B API 
 Service A
 Service B ECS ECS ECS EC2 EC2 EC2 us-east1-a us-east1-b us-east1-c
  • 55. Release pace and quality • Split Docker images
 Pre-create docker base images with GEMs installed • Minimize Docker images
 We continuously evaluate other ways to minimize image sizes, e.g. docker-squash, clean up GEMs • Powerful ECS instances over small Beanstalk EC2s
 Bigger instances with higher networking will deploy docker images quicker
  • 56. Developer satisfaction • Mistrust in Docker for development
 Our developers are hard to convince of the benefits of Docker for local development - never change a running system… • Workshop for infrastructure basics
 We’re continuously holding workshops on Docker for development and other infrastructure topics • Stabilize releases
 Only a trusted and reliable system will be accepted • Build a CLI
 We want to build or find a CLI to easily interact with our apps
  • 57. Maintainability of infrastructure • No more UI based infrastructure
 Our current AWS services are created fully by click • Scripted infrastructure
 We believe that every bit of our tech stack has to be code. Terraform seems to be a promising solution that offers a descriptive approach to creating a reproducible, reviewable and testable environment of infrastructure components and there their interconnections. http://www.meetup.com/de-DE/terraform-berlin-user-group/
  • 58. We’ll talk about our results and learnings in Q1/2017
  • 59. From Heroku to AWS a Migration Story to be continued
  • 60. I’m looking forward to receive your feedback 
 and inspiration - Thank you -