SlideShare uma empresa Scribd logo
1 de 41
Pavel Pratyush, CTO, Deporvillage
pavel@deporvillage.com
Migration of a high-traffic
E-commerce website from
Legacy Monolith to
Microservices
Deporvillage in Numbers
>1M
>2000
>100K
Page Views per Day
Orders Per Day
SKUs in Stock
Deporvillage in Numbers
>100
6
#274
Countries we Ship To
Languages
Financial Times
What
We Had
Monolith
Magento
MySQL
Web Traffic
Backoffice
ERP Integration
3P Integrations
Why It Had to Go Away
● Ugly Monolith - The Company Grew Too Fast
● Too many WTF is this in the code base
● Hack Solutions.
● Solutions that worked with 10M revenue wouldn’t work for
100M
● Legacy Codebase - PHP for everything
● One single MySQL DB for all data - Transactional or otherwise
● Scale! Scale! Scale!
So, Why
Microservices?
● Another Monolith?
● E-Commerce Domain Microservices
● Leverage other programming languages - Golang,
Node.JS
● Independent Scalability
● Talent Acquisition & Retention
Because it is Cool? (sic)
The
Starting Point
Team A
Team Reorganization
Team Reorganization
Exercise
One Big
Team
Team B
Common Backlog
01
Impactful, Incremental Deliverables
02
Independent Sprints
03
Problems
&
Steps
Shipping Rate &
Timing Calculation
is a piece of Shit!
01
03
02
01
02
03
Order Flow into
ERP System
Transactional
Mails are
Incoherent
Shipping
Service
Order Service
Notification
Service
● 1st Microservice
● Written in PHP
● Own Data Store - MongoDB
● Reuse logic from “Older scripts”
● New Platform CI/CD Pipeline - Containers
● Plugs into Checkout - Impact!
● Uses Queue to process non web info - Carrier Statuses
Shipping Service
● Still Written in PHP
● Own Data Store - MongoDB
● Uses the Platform CI/CD Pipeline - Containers
● ERP/Warehouse uses this instead of Magento API for
order retrieval - Impact!
● Uses Queue to import orders from Magento - Scale
Order Service
● Reuse a POC written in PHP
● Own Data Store - MongoDB
● The Platform CI/CD Pipeline is getting complex
● Sends Your order has been shipped email - Impact
● Uses Queues to Send Emails - Scale
● Uses different emailing channels for different types of
email - $$$
Notification Service
The Mega
Project
User Journey - Before
Home Category Product Cart Checkout
User Journey - After
Home Category Product Cart Checkout
User Journey - After
Home Category Product Cart Checkout
User Journey - After
Home Category Product Cart Checkout
So, How did we
do it?
The Recipe
Strangler
Façade
Pattern
01
03
02
04
05
06
Polyglot
Systems
Async Data
Sync
Monorepo
Containers
Stakeholder
Management
https://www.majesco.com/innovating-insurance-microservices-part-3/
FrontControllerService(Façade)
API Gateway
Magento
Frontend
Service
SSR
Service
Catalog
Service
Magento
Adapter
Service
MySQL ElasticMongo
Shipping
Service
Mongo
Order
Service
Mongo
Translation
Service
Mongo
Redis
Filter Service
Catalog Populate
Service
Data Sync
Magento
One of the Other
Microservice Data
Store
● Catalog Data
○ Stock
○ Price
○ Photos
○ Description
● Configuration Data
○ Settings
○ Exchange Rates
○ Categories
○ Tax Data
Message Queue
Workers
29
The Monorepo
● No - Not because Google, Facebook, Twitter use it.
● Atomic Pull Requests for cross-service feature requests
● Easy to adapt for devs coming from a Monolith Codebase
● Faster dev environment Setup
● Single Pipeline for CI/CD is simpler in the beginning
● Cross team pull requests are easier
Why Monorepo?
Containers -
How we Build & Ship Code
● Standardized container types
○ api | app | worker | job
● Heavy use of docker-compose
○ --no-deps | depends
● Single docker network between Legacy & Platform in
local environment
● dev-entrypoints for dev specific bootstrapping/tweaks -
nodemon for e.g
● Application config is environment dependent
Containers - Docker
● master gets deployed automatically to Staging.
● pull-requests are built and tested automatically
● unit tests are executed using the docker images directly -
custom entrypoint for docker run
● api/functional tests are not part of the CD pipeline
● We use bitbucket pipelines for CI/CD (docker based)
● We use gocd for running api/functional tests
● Slack for monitoring ci/cd events
Containers - CI/CD
● K8S for all environments - test, staging, production
● Amazon EKS - Managed K8S Control Plane
● When tuned properly - horizontal pod autoscaler works
like a charm
● Use of Public & Private ingress controllers
● Pod health checks for monitoring
● Affinity parametres for distributing heavier
microservices onto different nodes
Containers - K8S
Stakeholder
Management
How are we doing it?
KPIs
Impactful Steps
Process Improvements
Improves Visibility
Improves Confidence
Reduces Frustrations
Wins
● Improved Business KPIs - Avg. Page Load Time, Avg
Server Response Time, Conversion %
● Code Coverage - Non existent to >85%
● Modularity - Faster development of newer features
● Maintainability - Not a 10 year old hacked off php
codebase anymore
● Scalability - The platform scales to 8x traffic without
additional hardware (real stress tests)
Wins - A lot of Them!
Challenges?
● Untangling Legacy codebase is messy!
● Requirements be like - Exactly like how it works
currently
● Delivery Forecasting is not easy, complexity of
deliverables changes in-transit
● Distributed Systems are massively complex than
monoliths - consistency, pipelines, logging, tracing
● Learning Curve - a lot of new things in the picture now
Challenges - Always, always!
Thanks!Pavel Pratyush, CTO, Deporvillage
pavel@deporvillage.com

Mais conteúdo relacionado

Mais procurados

Creating an Elastic Platform Using Kafka and Microservices in OpenShift
Creating an Elastic Platform Using Kafka and Microservices in OpenShift Creating an Elastic Platform Using Kafka and Microservices in OpenShift
Creating an Elastic Platform Using Kafka and Microservices in OpenShift
confluent
 
Launching the Expedia Conversations Platform: From Zero to Production in Four...
Launching the Expedia Conversations Platform: From Zero to Production in Four...Launching the Expedia Conversations Platform: From Zero to Production in Four...
Launching the Expedia Conversations Platform: From Zero to Production in Four...
HostedbyConfluent
 

Mais procurados (20)

Creating an Elastic Platform Using Kafka and Microservices in OpenShift
Creating an Elastic Platform Using Kafka and Microservices in OpenShift Creating an Elastic Platform Using Kafka and Microservices in OpenShift
Creating an Elastic Platform Using Kafka and Microservices in OpenShift
 
Disaster Recovery for Multi-Region Apache Kafka Ecosystems at Uber
Disaster Recovery for Multi-Region Apache Kafka Ecosystems at UberDisaster Recovery for Multi-Region Apache Kafka Ecosystems at Uber
Disaster Recovery for Multi-Region Apache Kafka Ecosystems at Uber
 
Achieving end-to-end visibility into complex event-sourcing transactions usin...
Achieving end-to-end visibility into complex event-sourcing transactions usin...Achieving end-to-end visibility into complex event-sourcing transactions usin...
Achieving end-to-end visibility into complex event-sourcing transactions usin...
 
Defrag 2014 - Blend Web IDEs, Open Source and PaaS to Create and Deploy APIs
Defrag 2014 - Blend Web IDEs, Open Source and PaaS to Create and Deploy APIsDefrag 2014 - Blend Web IDEs, Open Source and PaaS to Create and Deploy APIs
Defrag 2014 - Blend Web IDEs, Open Source and PaaS to Create and Deploy APIs
 
Java Support On Google App Engine
Java Support On Google App EngineJava Support On Google App Engine
Java Support On Google App Engine
 
Released WEBridge 4 SAP R 3 on 9/9 of 2014
Released WEBridge 4 SAP R 3 on 9/9 of 2014Released WEBridge 4 SAP R 3 on 9/9 of 2014
Released WEBridge 4 SAP R 3 on 9/9 of 2014
 
bpmNEXT 2018: Exploiting cloud infrastructure for efficient business process ...
bpmNEXT 2018: Exploiting cloud infrastructure for efficient business process ...bpmNEXT 2018: Exploiting cloud infrastructure for efficient business process ...
bpmNEXT 2018: Exploiting cloud infrastructure for efficient business process ...
 
Modernization patterns to refactor a legacy application into event driven mic...
Modernization patterns to refactor a legacy application into event driven mic...Modernization patterns to refactor a legacy application into event driven mic...
Modernization patterns to refactor a legacy application into event driven mic...
 
MongoDB .local London 2019: Nationwide Building Society: Building Mobile Appl...
MongoDB .local London 2019: Nationwide Building Society: Building Mobile Appl...MongoDB .local London 2019: Nationwide Building Society: Building Mobile Appl...
MongoDB .local London 2019: Nationwide Building Society: Building Mobile Appl...
 
Building scalable data with kafka and spark
Building scalable data with kafka and sparkBuilding scalable data with kafka and spark
Building scalable data with kafka and spark
 
How Zillow Unlocked Kafka to 50 Teams in 8 months | Shahar Cizer Kobrinsky, Z...
How Zillow Unlocked Kafka to 50 Teams in 8 months | Shahar Cizer Kobrinsky, Z...How Zillow Unlocked Kafka to 50 Teams in 8 months | Shahar Cizer Kobrinsky, Z...
How Zillow Unlocked Kafka to 50 Teams in 8 months | Shahar Cizer Kobrinsky, Z...
 
Cloud native Kafka | Sascha Holtbruegge and Margaretha Erber, HiveMQ
Cloud native Kafka | Sascha Holtbruegge and Margaretha Erber, HiveMQCloud native Kafka | Sascha Holtbruegge and Margaretha Erber, HiveMQ
Cloud native Kafka | Sascha Holtbruegge and Margaretha Erber, HiveMQ
 
Systematic Migration of Monolith to Microservices
Systematic Migration of Monolith to MicroservicesSystematic Migration of Monolith to Microservices
Systematic Migration of Monolith to Microservices
 
Migrating from OWB to ODI
Migrating from OWB to ODIMigrating from OWB to ODI
Migrating from OWB to ODI
 
Kafka Streams
Kafka StreamsKafka Streams
Kafka Streams
 
MongoDB .local London 2019: Migrating a Monolith to MongoDB Atlas – Auto Trad...
MongoDB .local London 2019: Migrating a Monolith to MongoDB Atlas – Auto Trad...MongoDB .local London 2019: Migrating a Monolith to MongoDB Atlas – Auto Trad...
MongoDB .local London 2019: Migrating a Monolith to MongoDB Atlas – Auto Trad...
 
[WSO2Con USA 2018] Up-leveling Brownfield Integration
[WSO2Con USA 2018] Up-leveling Brownfield Integration [WSO2Con USA 2018] Up-leveling Brownfield Integration
[WSO2Con USA 2018] Up-leveling Brownfield Integration
 
Launching the Expedia Conversations Platform: From Zero to Production in Four...
Launching the Expedia Conversations Platform: From Zero to Production in Four...Launching the Expedia Conversations Platform: From Zero to Production in Four...
Launching the Expedia Conversations Platform: From Zero to Production in Four...
 
Introduction to ksqlDB and stream processing (Vish Srinivasan - Confluent)
Introduction to ksqlDB and stream processing (Vish Srinivasan  - Confluent)Introduction to ksqlDB and stream processing (Vish Srinivasan  - Confluent)
Introduction to ksqlDB and stream processing (Vish Srinivasan - Confluent)
 
Blazing fast sites using Blaze, Hybrid CMS NYC
Blazing fast sites using Blaze, Hybrid CMS NYCBlazing fast sites using Blaze, Hybrid CMS NYC
Blazing fast sites using Blaze, Hybrid CMS NYC
 

Semelhante a Migration of a high-traffic E-commerce website from Legacy Monolith to Microservices

Cpp In Soa
Cpp In SoaCpp In Soa
Cpp In Soa
WSO2
 
Running Data Platforms Like Products
Running Data Platforms Like ProductsRunning Data Platforms Like Products
Running Data Platforms Like Products
VMware Tanzu
 

Semelhante a Migration of a high-traffic E-commerce website from Legacy Monolith to Microservices (20)

Dynomite @ RedisConf 2017
Dynomite @ RedisConf 2017Dynomite @ RedisConf 2017
Dynomite @ RedisConf 2017
 
RedisConf17 - Dynomite - Making Non-distributed Databases Distributed
RedisConf17 - Dynomite - Making Non-distributed Databases DistributedRedisConf17 - Dynomite - Making Non-distributed Databases Distributed
RedisConf17 - Dynomite - Making Non-distributed Databases Distributed
 
Preparing for Neo - Singapore OutSystems User Group October 2022 Meetup
Preparing for Neo - Singapore OutSystems User Group October 2022 MeetupPreparing for Neo - Singapore OutSystems User Group October 2022 Meetup
Preparing for Neo - Singapore OutSystems User Group October 2022 Meetup
 
Praxistaugliche notes strategien 4 cloud
Praxistaugliche notes strategien 4 cloudPraxistaugliche notes strategien 4 cloud
Praxistaugliche notes strategien 4 cloud
 
Mulesoft Meetup Milano #9 - Batch Processing and CI/CD
Mulesoft Meetup Milano #9 - Batch Processing and CI/CDMulesoft Meetup Milano #9 - Batch Processing and CI/CD
Mulesoft Meetup Milano #9 - Batch Processing and CI/CD
 
Challenges In Modern Application
Challenges In Modern ApplicationChallenges In Modern Application
Challenges In Modern Application
 
The what, why and how of knative
The what, why and how of knativeThe what, why and how of knative
The what, why and how of knative
 
Storing State Forever: Why It Can Be Good For Your Analytics
Storing State Forever: Why It Can Be Good For Your AnalyticsStoring State Forever: Why It Can Be Good For Your Analytics
Storing State Forever: Why It Can Be Good For Your Analytics
 
Cpp In Soa
Cpp In SoaCpp In Soa
Cpp In Soa
 
How to Make Money Solving 5 Major Problems of Cloud Hosting Customers
How to Make Money Solving 5 Major Problems of Cloud Hosting CustomersHow to Make Money Solving 5 Major Problems of Cloud Hosting Customers
How to Make Money Solving 5 Major Problems of Cloud Hosting Customers
 
Keepler | What's next on Google Cloud?
Keepler | What's next on Google Cloud? Keepler | What's next on Google Cloud?
Keepler | What's next on Google Cloud?
 
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
PHP At 5000 Requests Per Second: Hootsuite’s Scaling StoryPHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
 
Running Data Platforms Like Products
Running Data Platforms Like ProductsRunning Data Platforms Like Products
Running Data Platforms Like Products
 
Refactoring to Microservices
Refactoring to MicroservicesRefactoring to Microservices
Refactoring to Microservices
 
Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...
Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...
Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...
 
Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...
Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...
Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...
 
Enabling Telco to Build and Run Modern Applications
Enabling Telco to Build and Run Modern Applications Enabling Telco to Build and Run Modern Applications
Enabling Telco to Build and Run Modern Applications
 
From prototype to production - The journey of re-designing SmartUp.io
From prototype to production - The journey of re-designing SmartUp.ioFrom prototype to production - The journey of re-designing SmartUp.io
From prototype to production - The journey of re-designing SmartUp.io
 
Workshop: Delivering chnages for applications and databases
Workshop: Delivering chnages for applications and databasesWorkshop: Delivering chnages for applications and databases
Workshop: Delivering chnages for applications and databases
 
BigQuery ML - Machine learning at scale using SQL
BigQuery ML - Machine learning at scale using SQLBigQuery ML - Machine learning at scale using SQL
BigQuery ML - Machine learning at scale using SQL
 

Último

VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Dr.Costas Sachpazis
 

Último (20)

UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 

Migration of a high-traffic E-commerce website from Legacy Monolith to Microservices