SlideShare a Scribd company logo
1 of 14
From monolith to
microservices
23 November 2017
Singapore
Mihkel Aamer.
mihkel.aamer@transferwise.com
What this talk is about
● How TransferWise started
● Challenges we had when scaling both engineering
organisation and growing customer base
● Our transition strategy and progress to
microservices
● How microservices have helped and what are the
benefits that we have seen
● Where we are today and what new technologies we
adopted in order to make best use of μ-services
architecture
● What are the learnings
System in early days of TransferWise
Organization scaled...
● Build pipeline
○ Build stability
○ Build speed
○ Flaky tests
○ Merge queue
● Deployment
bottleneck
● Code ownership
clarity
● Difficult to have
overview of all
application changes
…and more people started using TransferWise.
● Production stability and reliability
○ Batch jobs taking resources from consumer web
○ DDL changes and MySQL table metadata locking
○ Cascading failures
● Security
○ Isolating sensitive concepts: auth, PCI card data
● Performance & scalability
○ Database QPS and CPU utilization
○ RAM requirements for Grails and time it takes to
compile and for application startup
○ Reaching limits of commodity hardware
Moving to services.
Measuring progress:
● % of code in
services vs
monolith
● Database QPS
monolith
database vs
service
databases
● API calls to
services vs
monolith
● Amount of
data in service
DBs vs
monolith
database
μ-Services benefits.
● We have seen μ-Services to address many of our previous problems:
○ Cleaner architecture and interface definitions: RESTful API, Kafka
messaging leading to functional isolation
○ Engineers can iterate and deploy independently -> no deployment
bottleneck
○ Smaller codebases and easier to change -> tests run fast and simple
fixes can go live in minutes
● Using latest technology and choosing the best stack for the job
○ Apache Spark for fraud analysis, Zookeeper vs database locking
● Scaling of the business
○ Handling exponential growth in payment volumes and web traffic
○ Scaling database load and size, DDL locking problems are isolated
Individual service view
Average service size ~12,000 LOC
Config service
REST API
Eureka discovery
Logging and monitoring
● Log server (syslog)
● Rollbar
● New relic
● Zabbix + Victorops
● Grafana
Public gateway
μ-Services learnings
Microservices are not only technical evolution, it is also cultural and
organizational mindset shift. We found that there are several prerequisites:
● Infrastructure automation
○ Distributed logging and tracing: syslog and ELK
○ Rapid application deployment: Octopus
○ Rapid provisioning: Ansible
○ Database backups, replication, recovery: ServiceDB setup
● Testing and developing “locally” -> dev-cloud
● API standardisation (for public API product) -> public gateway
● Monitoring: need both business and technical. Many services -> more
things can break. Circuit breakers and dealing with downstream failure.
● Service discovery and client side load balancing with Eureka and Ribbon
Envoy service mesh
● Business analytics with distributed databases: pg_ninja, looker
Octopus
86 services
4-5 services added per month
300 deployments per
week
increasing rapidly
Questions.

More Related Content

Similar to From monolith to microservices

Accelerating a Path to Digital With a Cloud Data Strategy
Accelerating a Path to Digital With a Cloud Data StrategyAccelerating a Path to Digital With a Cloud Data Strategy
Accelerating a Path to Digital With a Cloud Data Strategy
MongoDB
 

Similar to From monolith to microservices (20)

ITB2017 - Nginx ppf intothebox_2017
ITB2017 - Nginx ppf intothebox_2017ITB2017 - Nginx ppf intothebox_2017
ITB2017 - Nginx ppf intothebox_2017
 
NGINX: The Past, Present and Future of the Modern Web
NGINX: The Past, Present and Future of the Modern WebNGINX: The Past, Present and Future of the Modern Web
NGINX: The Past, Present and Future of the Modern Web
 
WTF is a Microservice - Rafael Schloming, Datawire
WTF is a Microservice - Rafael Schloming, DatawireWTF is a Microservice - Rafael Schloming, Datawire
WTF is a Microservice - Rafael Schloming, Datawire
 
NGINX Microservices Reference Architecture: What’s in Store for 2019 – EMEA
NGINX Microservices Reference Architecture: What’s in Store for 2019 – EMEANGINX Microservices Reference Architecture: What’s in Store for 2019 – EMEA
NGINX Microservices Reference Architecture: What’s in Store for 2019 – EMEA
 
How to Empower a Platform With a Data Pipeline At a Scale
How to Empower a Platform With a Data Pipeline At a ScaleHow to Empower a Platform With a Data Pipeline At a Scale
How to Empower a Platform With a Data Pipeline At a Scale
 
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthUSENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
 
High-Speed Reactive Microservices
High-Speed Reactive MicroservicesHigh-Speed Reactive Microservices
High-Speed Reactive Microservices
 
Ledingkart Meetup #1: Monolithic to microservices in action
Ledingkart Meetup #1: Monolithic to microservices in actionLedingkart Meetup #1: Monolithic to microservices in action
Ledingkart Meetup #1: Monolithic to microservices in action
 
Commit Conf 2018 - Hotelbeds' journey to a microservice cloud-based architecture
Commit Conf 2018 - Hotelbeds' journey to a microservice cloud-based architectureCommit Conf 2018 - Hotelbeds' journey to a microservice cloud-based architecture
Commit Conf 2018 - Hotelbeds' journey to a microservice cloud-based architecture
 
MuleSoft Manchester Meetup #4 slides 11th February 2021
MuleSoft Manchester Meetup #4 slides 11th February 2021MuleSoft Manchester Meetup #4 slides 11th February 2021
MuleSoft Manchester Meetup #4 slides 11th February 2021
 
TU Delft Presentation - Cloud & Serverless
TU Delft Presentation - Cloud & ServerlessTU Delft Presentation - Cloud & Serverless
TU Delft Presentation - Cloud & Serverless
 
Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020
 
Accelerating a Path to Digital With a Cloud Data Strategy
Accelerating a Path to Digital With a Cloud Data StrategyAccelerating a Path to Digital With a Cloud Data Strategy
Accelerating a Path to Digital With a Cloud Data Strategy
 
Last Conference 2017: Big Data in a Production Environment: Lessons Learnt
Last Conference 2017: Big Data in a Production Environment: Lessons LearntLast Conference 2017: Big Data in a Production Environment: Lessons Learnt
Last Conference 2017: Big Data in a Production Environment: Lessons Learnt
 
Infrastructure As Code
Infrastructure As CodeInfrastructure As Code
Infrastructure As Code
 
MRA AMA Part 8: Secure Inter-Service Communication
MRA AMA Part 8: Secure Inter-Service CommunicationMRA AMA Part 8: Secure Inter-Service Communication
MRA AMA Part 8: Secure Inter-Service Communication
 
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
 
Microservices at ibotta pitfalls and learnings
Microservices at ibotta pitfalls and learningsMicroservices at ibotta pitfalls and learnings
Microservices at ibotta pitfalls and learnings
 
Designing for operability and managability
Designing for operability and managabilityDesigning for operability and managability
Designing for operability and managability
 
Devoxx Belgium 2017 - easy microservices with JHipster
Devoxx Belgium 2017 - easy microservices with JHipsterDevoxx Belgium 2017 - easy microservices with JHipster
Devoxx Belgium 2017 - easy microservices with JHipster
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 

From monolith to microservices

  • 1. From monolith to microservices 23 November 2017 Singapore
  • 3. What this talk is about ● How TransferWise started ● Challenges we had when scaling both engineering organisation and growing customer base ● Our transition strategy and progress to microservices ● How microservices have helped and what are the benefits that we have seen ● Where we are today and what new technologies we adopted in order to make best use of μ-services architecture ● What are the learnings
  • 4. System in early days of TransferWise
  • 5. Organization scaled... ● Build pipeline ○ Build stability ○ Build speed ○ Flaky tests ○ Merge queue ● Deployment bottleneck ● Code ownership clarity ● Difficult to have overview of all application changes
  • 6. …and more people started using TransferWise. ● Production stability and reliability ○ Batch jobs taking resources from consumer web ○ DDL changes and MySQL table metadata locking ○ Cascading failures ● Security ○ Isolating sensitive concepts: auth, PCI card data ● Performance & scalability ○ Database QPS and CPU utilization ○ RAM requirements for Grails and time it takes to compile and for application startup ○ Reaching limits of commodity hardware
  • 7. Moving to services. Measuring progress: ● % of code in services vs monolith ● Database QPS monolith database vs service databases ● API calls to services vs monolith ● Amount of data in service DBs vs monolith database
  • 8. μ-Services benefits. ● We have seen μ-Services to address many of our previous problems: ○ Cleaner architecture and interface definitions: RESTful API, Kafka messaging leading to functional isolation ○ Engineers can iterate and deploy independently -> no deployment bottleneck ○ Smaller codebases and easier to change -> tests run fast and simple fixes can go live in minutes ● Using latest technology and choosing the best stack for the job ○ Apache Spark for fraud analysis, Zookeeper vs database locking ● Scaling of the business ○ Handling exponential growth in payment volumes and web traffic ○ Scaling database load and size, DDL locking problems are isolated
  • 9. Individual service view Average service size ~12,000 LOC Config service REST API Eureka discovery Logging and monitoring ● Log server (syslog) ● Rollbar ● New relic ● Zabbix + Victorops ● Grafana Public gateway
  • 10. μ-Services learnings Microservices are not only technical evolution, it is also cultural and organizational mindset shift. We found that there are several prerequisites: ● Infrastructure automation ○ Distributed logging and tracing: syslog and ELK ○ Rapid application deployment: Octopus ○ Rapid provisioning: Ansible ○ Database backups, replication, recovery: ServiceDB setup ● Testing and developing “locally” -> dev-cloud ● API standardisation (for public API product) -> public gateway ● Monitoring: need both business and technical. Many services -> more things can break. Circuit breakers and dealing with downstream failure. ● Service discovery and client side load balancing with Eureka and Ribbon Envoy service mesh ● Business analytics with distributed databases: pg_ninja, looker
  • 12. 86 services 4-5 services added per month