SlideShare a Scribd company logo
1 of 24
Dharmesh Panchmatia, Director IT, Gaurav Goyal, Architect IT
Transforming a Large Mission-
Critical E-Commerce Platform from a
Relational Architecture to MongoDB
1
How to transform your e-commerce platform to enable
cloud native architecture
2
Best practices for migrating an e-commerce application
platform from relational to MongoDB
3
Planning considerations for data migration from
relational to MongoDB
Learning Objectives
Cisco Commerce Overview
Caching/
Security
Cisco Commerce
(New, Follow-on and Renewal)
Delivery
Platform
User
Experience
Customer
Experience
Web Mobile
(iOS, Android)
B2B
(Web Services, EDI/XML, Punch-outs)
Data Center /
Virtualization
Richardson (DC1) – UCS-B200 M2
Web, App Server – Active, DB – Active
Allen (DC2) – UCS-B200 M2
Web, App Server – Active, DB – Passive*MVDC
Capabilities
Integrated
Capabilities/
Workflow
MDM, Services,
Biz Rules
& Policies
Config
Engine
Deal
Routing
Rules
Party
Service
Pricing
Engine
Eligibility
Service
Offer
Mgmt
Notification
Engine
Akamai Caching Services
RealUserExperience/AppPerformanceMgmt
(AppDynamics,Akamai,ELK)
Oracle Access Manager / Oauth
Security/
Caching
Event Management Framework
Configure Price Quote
Deal
Approval
Order
Capture
Order
Orchestration
Cisco Commerce Architecture
40+B Order
Bookings
4-6M
Hits per Day
140K
Unique Users
Cisco Commerce by the Numbers
300+
Services
36
Applications
4M
Lines of Code
Pain Points
10-12 hour
downtimes for
code
Lack of agility due
to monolithic code
base
6+ month
effort for major
software
upgrades
Multiple platform
outages due to
infrastructure, storage
and network failures
1 32 4
Journey to Cloud Native
1 2 3 4
Zero downtime for
software upgrades
and code
deployments
Increased Agility -
move towards API
based Architecture
5X performance
improvement &
scalability
Fault tolerance for
high application
availability
Objectives
Ref Data
REFERENCE DATA SOURCE
DMPRD - RDBMS
Logging
Order Capture
DC1 - Tomcat
Order Capture
Addresses Items
Preferences
Roles
Contacts Logging
DC1 & DC2
Transaction
Data
Transaction
sync
Downstream
Publish
X-Functional
Services (73)
DC3DC2DC1
TRANSACTION DATA STORE
P S S S S
N1 N2 N3 N4 N5
DC2 - Tomcat
1 2
3
4
5
Journey to Cloud Native
Changed 110 backend integrations to Rest API calls
X-Functional
Dependencies
7 months without additional head count
Delivery
TimeLine
Delivering 26 Biz capabilities (10H, 7 M, 9 L) along with this changeBrownfield
Rewrote 120 K lines of back-end code;
Touched 600k lines of existing java code
Code
Risk Mitigation
• Backward Compatibility
• Extensive shadow testing for B2B Orders
• Phase rollout
Migration by the Numbers
• Migrate all reference data to Elastic Search
• Build APIs to leverage reference data
3. Reference Data
• MongoDB primary database for transactions
• Rewrite SQL code in middle tier (~800,000 lines of code )
4. Transaction Data
• Feature flag based approach to switch to RDBMS in case
of issues
• Phase rollout to mitigate functional parity risk
6. Backward Compatibility
1.Zero Downtime Deployment
• Leverage Blue-Green deployment to deploy front end /
middle tier code
• Use Consul as Service Registry
2. Decouple dependency
on other systems
• Migrate from DB access to APIs
• Influence other systems to provide fault tolerant APIs
• Leverage Kafka for publishing data to downstream systems5. Downstream Publish
Cloud Native Design Cookbook
Completed three
quarters without
issues
Software
Upgrades in
minutes without
downtime
Zero Downtime
Response Times
reduced to sub-
sec from 3-5 sec
earlier
5x Performance
Improvement
Eliminated
~120,000 lines
of BE code
Architecture
Optimization
Benefits & Post Go-Live Status
7+ infrastructure
outages since go live,
no business impact
Multiple upgrades
without any downtime
Fault Tolerance
Best Practices
Data Model
Error Order
Order
Ext
Financial
Summary
Shipping
Group
Line Contact Payment TaxDtls
Smart
Account
Line Trx
Info
Line
Details
Line
Pricing
Price
Adj
Line
TFS
Details
Child Tables
Order
Child Tables
RDBMS
Tables: 14
Indexes: 60
Sequences: 16
Mongo DB
Tables: 1
Indexes: 7
Sequences: 6
MongoDB
Collection
{ "_id" : "orderIdSeq",
"seqValue" : 0,
"cache" : NumberInt(100) }
JVM 1 JVM 2 JVM 3 JVM 4
0-100 101-200 201-300 301-400
backend seqValue = 400
cache
x 500
findAndModify ( )
1. lock that particular record,
2. increment the sequence,
3. return the value,
4. unlock it.
401-500
Custom Sequence
 Denormalize schema
 Optimize Docment Size
 Keep # of indexes to less than 20
 Minimize # of sequences
 Cache sequences in the middle tier
Schema Definition
 Complete data migration before query
optimization
 Use projections
 Update only changed apptributes
 Use WriteConcern: 2 / majoirty,
ReadPreference: Primary Preferred
 Avoid complex queries in MongoDB
Query Optimization
Best Practices
 Authentication &
Authorization a must
 Change passwords every 6
months
 Encrypt sensitive data
Security
 Setup alerts in Ops
Manager
 Use Ops Manager for
backups & upgrades
 Print queries taking more
than Xms.
Ops Manager
Best Practices
 Leverage 3rd data center for
all adhoc queries
 MongoDB Compass,
MongoChef, RoboMongo
 BI Connector (SQL
Queries, tableau etc)
Reporting
Ops Manager is must for
mission critical apps.
Keep an eye on Headroom
during bulk data migration.
Lessons Learned
SAN/SSD is a must
Subscribe to MongoDB bug
advisory & have frequent
upgrades
Most of the performance issues arises
because of missing or wrong indexes.
Create indexes in
background after bulk
data migration
MongoDB provides ACID
properties at document level
v/s transaction.
WriteConcern: majority for
critical transactions
Lessons
Learned
RDBMS to MongoDB Data Migration
DATA
MIGRATION
TO DB
DATA
MIGRATION
TO MONGO
ON USERS
REQUEST
SYNC
MAPPING EVENT
ONE TIME REAL TIME SYNC SCHEDULED
POLLING
CONTINUOUS
SYNC
RESTRICTED
MODE
RDBMS
BACKEND
BASED
WEB SERVICE
BASED
POLLING
BASED
MONGO
DB
POLL ON
INTERVAL
BASIS
DATA
MIGRATION
TO DB
R2M M2R
R2M M2R
R2M
R2M M2R
R2M: RDBMS to MongoDB
M2R: MongoDB to RDBMS
DEMO
https://github.com/gagoyal01/mongodb-rdbms-sync
1
How to transform your e-commerce platform to enable
cloud native architecture
2
Best practices for migrating an e-commerce application
platform from relational to MongoDB
3
Planning considerations for data migration from
relational to MongoDB
Learning Objectives
Questions and Answers
 Authentication & Authorization a must
 Change passwords every 6 months
 Encrypt sensitive data
 Define Read/Write and Read Only user
roles
 Leverage 3rd data center for all adhoc
queries
Security
 Setup alerts in Ops Manager
 Use Ops Manager for backups &
upgrades
 Print queries taking more than Xms.
Ops Manager
Best Practices

More Related Content

What's hot

ELEKS DevTalks #4: Amazon Web Services Crash Course
ELEKS DevTalks #4: Amazon Web Services Crash CourseELEKS DevTalks #4: Amazon Web Services Crash Course
ELEKS DevTalks #4: Amazon Web Services Crash CourseYuriy Guts
 
MongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and Kafka
MongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and KafkaMongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and Kafka
MongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and KafkaMongoDB
 
How to create custom dashboards in Elastic Search / Kibana with Performance V...
How to create custom dashboards in Elastic Search / Kibana with Performance V...How to create custom dashboards in Elastic Search / Kibana with Performance V...
How to create custom dashboards in Elastic Search / Kibana with Performance V...PerformanceVision (previously SecurActive)
 
Migrating from a monolith to microservices – is it worth it?
Migrating from a monolith to microservices – is it worth it?Migrating from a monolith to microservices – is it worth it?
Migrating from a monolith to microservices – is it worth it?Katherine Golovinova
 
Webinar: Gaining Insights into MongoDB with MongoDB Cloud Manager and New Relic
Webinar: Gaining Insights into MongoDB with MongoDB Cloud Manager and New RelicWebinar: Gaining Insights into MongoDB with MongoDB Cloud Manager and New Relic
Webinar: Gaining Insights into MongoDB with MongoDB Cloud Manager and New RelicMongoDB
 
Integration Solution Patterns
Integration Solution Patterns Integration Solution Patterns
Integration Solution Patterns WSO2
 
WSO2 and 2 Degrees Case Study
WSO2 and 2 Degrees Case StudyWSO2 and 2 Degrees Case Study
WSO2 and 2 Degrees Case StudyWSO2
 
IBM DataPower Gateway appliances feature & virtual edition comparison
IBM DataPower Gateway appliances feature & virtual edition comparisonIBM DataPower Gateway appliances feature & virtual edition comparison
IBM DataPower Gateway appliances feature & virtual edition comparisonIBM DataPower Gateway
 
[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise
[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise
[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital EnterpriseWSO2
 
Delivering the Promise of SOA - Enterprise Integration Made Easy
Delivering the Promise of SOA - Enterprise Integration Made EasyDelivering the Promise of SOA - Enterprise Integration Made Easy
Delivering the Promise of SOA - Enterprise Integration Made EasyWSO2
 
An Introduction to Alibaba Cloud’s Message Service
An Introduction to Alibaba Cloud’s Message ServiceAn Introduction to Alibaba Cloud’s Message Service
An Introduction to Alibaba Cloud’s Message ServiceAlibaba Cloud
 
MuleSoft Database Connector
MuleSoft Database ConnectorMuleSoft Database Connector
MuleSoft Database Connectorkrishna2162
 
Microservices: Where do they fit within a rapidly evolving integration archit...
Microservices: Where do they fit within a rapidly evolving integration archit...Microservices: Where do they fit within a rapidly evolving integration archit...
Microservices: Where do they fit within a rapidly evolving integration archit...Kim Clark
 
Datasheet: WebSphere DataPower B2B Appliance XB62
Datasheet: WebSphere DataPower B2B Appliance XB62Datasheet: WebSphere DataPower B2B Appliance XB62
Datasheet: WebSphere DataPower B2B Appliance XB62Sarah Duffy
 
WSO2Con US 2013 - Connected Business - making it happen
WSO2Con US 2013 - Connected Business - making it happenWSO2Con US 2013 - Connected Business - making it happen
WSO2Con US 2013 - Connected Business - making it happenWSO2
 
Azure API Manegement Introduction and Integeration with BizTalk
Azure API Manegement Introduction and Integeration with BizTalkAzure API Manegement Introduction and Integeration with BizTalk
Azure API Manegement Introduction and Integeration with BizTalkShailesh Dwivedi
 
Data power v7 update - Ravi Katikala
Data power v7 update - Ravi KatikalaData power v7 update - Ravi Katikala
Data power v7 update - Ravi Katikalafloridawusergroup
 
WSO2 Product Release Webinar: WSO2 Dashboard Server 2.0
WSO2 Product Release Webinar: WSO2 Dashboard Server 2.0WSO2 Product Release Webinar: WSO2 Dashboard Server 2.0
WSO2 Product Release Webinar: WSO2 Dashboard Server 2.0WSO2
 

What's hot (20)

ELEKS DevTalks #4: Amazon Web Services Crash Course
ELEKS DevTalks #4: Amazon Web Services Crash CourseELEKS DevTalks #4: Amazon Web Services Crash Course
ELEKS DevTalks #4: Amazon Web Services Crash Course
 
Data in Azure
Data in AzureData in Azure
Data in Azure
 
MongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and Kafka
MongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and KafkaMongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and Kafka
MongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and Kafka
 
How to create custom dashboards in Elastic Search / Kibana with Performance V...
How to create custom dashboards in Elastic Search / Kibana with Performance V...How to create custom dashboards in Elastic Search / Kibana with Performance V...
How to create custom dashboards in Elastic Search / Kibana with Performance V...
 
Migrating from a monolith to microservices – is it worth it?
Migrating from a monolith to microservices – is it worth it?Migrating from a monolith to microservices – is it worth it?
Migrating from a monolith to microservices – is it worth it?
 
Webinar: Gaining Insights into MongoDB with MongoDB Cloud Manager and New Relic
Webinar: Gaining Insights into MongoDB with MongoDB Cloud Manager and New RelicWebinar: Gaining Insights into MongoDB with MongoDB Cloud Manager and New Relic
Webinar: Gaining Insights into MongoDB with MongoDB Cloud Manager and New Relic
 
Integration Solution Patterns
Integration Solution Patterns Integration Solution Patterns
Integration Solution Patterns
 
WSO2 and 2 Degrees Case Study
WSO2 and 2 Degrees Case StudyWSO2 and 2 Degrees Case Study
WSO2 and 2 Degrees Case Study
 
IBM DataPower Gateway appliances feature & virtual edition comparison
IBM DataPower Gateway appliances feature & virtual edition comparisonIBM DataPower Gateway appliances feature & virtual edition comparison
IBM DataPower Gateway appliances feature & virtual edition comparison
 
[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise
[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise
[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise
 
Intorduction to Datapower
Intorduction to DatapowerIntorduction to Datapower
Intorduction to Datapower
 
Delivering the Promise of SOA - Enterprise Integration Made Easy
Delivering the Promise of SOA - Enterprise Integration Made EasyDelivering the Promise of SOA - Enterprise Integration Made Easy
Delivering the Promise of SOA - Enterprise Integration Made Easy
 
An Introduction to Alibaba Cloud’s Message Service
An Introduction to Alibaba Cloud’s Message ServiceAn Introduction to Alibaba Cloud’s Message Service
An Introduction to Alibaba Cloud’s Message Service
 
MuleSoft Database Connector
MuleSoft Database ConnectorMuleSoft Database Connector
MuleSoft Database Connector
 
Microservices: Where do they fit within a rapidly evolving integration archit...
Microservices: Where do they fit within a rapidly evolving integration archit...Microservices: Where do they fit within a rapidly evolving integration archit...
Microservices: Where do they fit within a rapidly evolving integration archit...
 
Datasheet: WebSphere DataPower B2B Appliance XB62
Datasheet: WebSphere DataPower B2B Appliance XB62Datasheet: WebSphere DataPower B2B Appliance XB62
Datasheet: WebSphere DataPower B2B Appliance XB62
 
WSO2Con US 2013 - Connected Business - making it happen
WSO2Con US 2013 - Connected Business - making it happenWSO2Con US 2013 - Connected Business - making it happen
WSO2Con US 2013 - Connected Business - making it happen
 
Azure API Manegement Introduction and Integeration with BizTalk
Azure API Manegement Introduction and Integeration with BizTalkAzure API Manegement Introduction and Integeration with BizTalk
Azure API Manegement Introduction and Integeration with BizTalk
 
Data power v7 update - Ravi Katikala
Data power v7 update - Ravi KatikalaData power v7 update - Ravi Katikala
Data power v7 update - Ravi Katikala
 
WSO2 Product Release Webinar: WSO2 Dashboard Server 2.0
WSO2 Product Release Webinar: WSO2 Dashboard Server 2.0WSO2 Product Release Webinar: WSO2 Dashboard Server 2.0
WSO2 Product Release Webinar: WSO2 Dashboard Server 2.0
 

Similar to Transforming a Large Mission-Critical E-Commerce Platform from a Relational Architecture to MongoDB

MongoDB in a Mainframe World
MongoDB in a Mainframe WorldMongoDB in a Mainframe World
MongoDB in a Mainframe WorldMongoDB
 
La creación de una capa operacional con MongoDB
La creación de una capa operacional con MongoDBLa creación de una capa operacional con MongoDB
La creación de una capa operacional con MongoDBMongoDB
 
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 StrategyMongoDB
 
在-MongoDB-Cloud-上構建無服務器化應用
在-MongoDB-Cloud-上構建無服務器化應用在-MongoDB-Cloud-上構建無服務器化應用
在-MongoDB-Cloud-上構建無服務器化應用Amazon Web Services
 
Technology Overview
Technology OverviewTechnology Overview
Technology OverviewLiran Zelkha
 
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 StrategyMongoDB
 
Azure Overview Csco
Azure Overview CscoAzure Overview Csco
Azure Overview Cscorajramab
 
Introduction to MongoDB Enterprise
Introduction to MongoDB EnterpriseIntroduction to MongoDB Enterprise
Introduction to MongoDB EnterpriseMongoDB
 
Solving enterprise challenges through scale out storage & big compute final
Solving enterprise challenges through scale out storage & big compute finalSolving enterprise challenges through scale out storage & big compute final
Solving enterprise challenges through scale out storage & big compute finalAvere Systems
 
Refactoring to Microservices
Refactoring to MicroservicesRefactoring to Microservices
Refactoring to MicroservicesJacinto Limjap
 
Data Driven Advanced Analytics using Denodo Platform on AWS
Data Driven Advanced Analytics using Denodo Platform on AWSData Driven Advanced Analytics using Denodo Platform on AWS
Data Driven Advanced Analytics using Denodo Platform on AWSDenodo
 
MongoDB Breakfast Milan - Mainframe Offloading Strategies
MongoDB Breakfast Milan -  Mainframe Offloading StrategiesMongoDB Breakfast Milan -  Mainframe Offloading Strategies
MongoDB Breakfast Milan - Mainframe Offloading StrategiesMongoDB
 
Building a Single Logical Data Lake: For Advanced Analytics, Data Science, an...
Building a Single Logical Data Lake: For Advanced Analytics, Data Science, an...Building a Single Logical Data Lake: For Advanced Analytics, Data Science, an...
Building a Single Logical Data Lake: For Advanced Analytics, Data Science, an...Denodo
 
Schnellere Digitalisierung mit einer cloudbasierten Datenstrategie
Schnellere Digitalisierung mit einer cloudbasierten DatenstrategieSchnellere Digitalisierung mit einer cloudbasierten Datenstrategie
Schnellere Digitalisierung mit einer cloudbasierten DatenstrategieMongoDB
 
Exploring Opportunities in Crisis by Ramco
Exploring Opportunities in Crisis by RamcoExploring Opportunities in Crisis by Ramco
Exploring Opportunities in Crisis by RamcoIndiaMART InterMESH Ltd
 
Zero Dollar Migration Program
Zero Dollar Migration ProgramZero Dollar Migration Program
Zero Dollar Migration ProgramVMware Tanzu
 
Windowsazureplatform Overviewlatest
Windowsazureplatform OverviewlatestWindowsazureplatform Overviewlatest
Windowsazureplatform Overviewlatestrajramab
 
How leading financial services organisations are winning with tech
How leading financial services organisations are winning with techHow leading financial services organisations are winning with tech
How leading financial services organisations are winning with techMongoDB
 
Critical Considerations for Moving Your Core Business Applications to the Clo...
Critical Considerations for Moving Your Core Business Applications to the Clo...Critical Considerations for Moving Your Core Business Applications to the Clo...
Critical Considerations for Moving Your Core Business Applications to the Clo...Amazon Web Services
 

Similar to Transforming a Large Mission-Critical E-Commerce Platform from a Relational Architecture to MongoDB (20)

MongoDB in a Mainframe World
MongoDB in a Mainframe WorldMongoDB in a Mainframe World
MongoDB in a Mainframe World
 
Serverless_with_MongoDB
Serverless_with_MongoDBServerless_with_MongoDB
Serverless_with_MongoDB
 
La creación de una capa operacional con MongoDB
La creación de una capa operacional con MongoDBLa creación de una capa operacional con MongoDB
La creación de una capa operacional con MongoDB
 
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-Cloud-上構建無服務器化應用
在-MongoDB-Cloud-上構建無服務器化應用在-MongoDB-Cloud-上構建無服務器化應用
在-MongoDB-Cloud-上構建無服務器化應用
 
Technology Overview
Technology OverviewTechnology Overview
Technology Overview
 
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
 
Azure Overview Csco
Azure Overview CscoAzure Overview Csco
Azure Overview Csco
 
Introduction to MongoDB Enterprise
Introduction to MongoDB EnterpriseIntroduction to MongoDB Enterprise
Introduction to MongoDB Enterprise
 
Solving enterprise challenges through scale out storage & big compute final
Solving enterprise challenges through scale out storage & big compute finalSolving enterprise challenges through scale out storage & big compute final
Solving enterprise challenges through scale out storage & big compute final
 
Refactoring to Microservices
Refactoring to MicroservicesRefactoring to Microservices
Refactoring to Microservices
 
Data Driven Advanced Analytics using Denodo Platform on AWS
Data Driven Advanced Analytics using Denodo Platform on AWSData Driven Advanced Analytics using Denodo Platform on AWS
Data Driven Advanced Analytics using Denodo Platform on AWS
 
MongoDB Breakfast Milan - Mainframe Offloading Strategies
MongoDB Breakfast Milan -  Mainframe Offloading StrategiesMongoDB Breakfast Milan -  Mainframe Offloading Strategies
MongoDB Breakfast Milan - Mainframe Offloading Strategies
 
Building a Single Logical Data Lake: For Advanced Analytics, Data Science, an...
Building a Single Logical Data Lake: For Advanced Analytics, Data Science, an...Building a Single Logical Data Lake: For Advanced Analytics, Data Science, an...
Building a Single Logical Data Lake: For Advanced Analytics, Data Science, an...
 
Schnellere Digitalisierung mit einer cloudbasierten Datenstrategie
Schnellere Digitalisierung mit einer cloudbasierten DatenstrategieSchnellere Digitalisierung mit einer cloudbasierten Datenstrategie
Schnellere Digitalisierung mit einer cloudbasierten Datenstrategie
 
Exploring Opportunities in Crisis by Ramco
Exploring Opportunities in Crisis by RamcoExploring Opportunities in Crisis by Ramco
Exploring Opportunities in Crisis by Ramco
 
Zero Dollar Migration Program
Zero Dollar Migration ProgramZero Dollar Migration Program
Zero Dollar Migration Program
 
Windowsazureplatform Overviewlatest
Windowsazureplatform OverviewlatestWindowsazureplatform Overviewlatest
Windowsazureplatform Overviewlatest
 
How leading financial services organisations are winning with tech
How leading financial services organisations are winning with techHow leading financial services organisations are winning with tech
How leading financial services organisations are winning with tech
 
Critical Considerations for Moving Your Core Business Applications to the Clo...
Critical Considerations for Moving Your Core Business Applications to the Clo...Critical Considerations for Moving Your Core Business Applications to the Clo...
Critical Considerations for Moving Your Core Business Applications to the Clo...
 

More from MongoDB

MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump StartMongoDB
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB
 

More from MongoDB (20)

MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
 

Transforming a Large Mission-Critical E-Commerce Platform from a Relational Architecture to MongoDB

  • 1. Dharmesh Panchmatia, Director IT, Gaurav Goyal, Architect IT Transforming a Large Mission- Critical E-Commerce Platform from a Relational Architecture to MongoDB
  • 2. 1 How to transform your e-commerce platform to enable cloud native architecture 2 Best practices for migrating an e-commerce application platform from relational to MongoDB 3 Planning considerations for data migration from relational to MongoDB Learning Objectives
  • 4. Caching/ Security Cisco Commerce (New, Follow-on and Renewal) Delivery Platform User Experience Customer Experience Web Mobile (iOS, Android) B2B (Web Services, EDI/XML, Punch-outs) Data Center / Virtualization Richardson (DC1) – UCS-B200 M2 Web, App Server – Active, DB – Active Allen (DC2) – UCS-B200 M2 Web, App Server – Active, DB – Passive*MVDC Capabilities Integrated Capabilities/ Workflow MDM, Services, Biz Rules & Policies Config Engine Deal Routing Rules Party Service Pricing Engine Eligibility Service Offer Mgmt Notification Engine Akamai Caching Services RealUserExperience/AppPerformanceMgmt (AppDynamics,Akamai,ELK) Oracle Access Manager / Oauth Security/ Caching Event Management Framework Configure Price Quote Deal Approval Order Capture Order Orchestration Cisco Commerce Architecture
  • 5. 40+B Order Bookings 4-6M Hits per Day 140K Unique Users Cisco Commerce by the Numbers 300+ Services 36 Applications 4M Lines of Code
  • 6. Pain Points 10-12 hour downtimes for code Lack of agility due to monolithic code base 6+ month effort for major software upgrades Multiple platform outages due to infrastructure, storage and network failures 1 32 4
  • 8. 1 2 3 4 Zero downtime for software upgrades and code deployments Increased Agility - move towards API based Architecture 5X performance improvement & scalability Fault tolerance for high application availability Objectives
  • 9. Ref Data REFERENCE DATA SOURCE DMPRD - RDBMS Logging Order Capture DC1 - Tomcat Order Capture Addresses Items Preferences Roles Contacts Logging DC1 & DC2 Transaction Data Transaction sync Downstream Publish X-Functional Services (73) DC3DC2DC1 TRANSACTION DATA STORE P S S S S N1 N2 N3 N4 N5 DC2 - Tomcat 1 2 3 4 5 Journey to Cloud Native
  • 10. Changed 110 backend integrations to Rest API calls X-Functional Dependencies 7 months without additional head count Delivery TimeLine Delivering 26 Biz capabilities (10H, 7 M, 9 L) along with this changeBrownfield Rewrote 120 K lines of back-end code; Touched 600k lines of existing java code Code Risk Mitigation • Backward Compatibility • Extensive shadow testing for B2B Orders • Phase rollout Migration by the Numbers
  • 11. • Migrate all reference data to Elastic Search • Build APIs to leverage reference data 3. Reference Data • MongoDB primary database for transactions • Rewrite SQL code in middle tier (~800,000 lines of code ) 4. Transaction Data • Feature flag based approach to switch to RDBMS in case of issues • Phase rollout to mitigate functional parity risk 6. Backward Compatibility 1.Zero Downtime Deployment • Leverage Blue-Green deployment to deploy front end / middle tier code • Use Consul as Service Registry 2. Decouple dependency on other systems • Migrate from DB access to APIs • Influence other systems to provide fault tolerant APIs • Leverage Kafka for publishing data to downstream systems5. Downstream Publish Cloud Native Design Cookbook
  • 12. Completed three quarters without issues Software Upgrades in minutes without downtime Zero Downtime Response Times reduced to sub- sec from 3-5 sec earlier 5x Performance Improvement Eliminated ~120,000 lines of BE code Architecture Optimization Benefits & Post Go-Live Status 7+ infrastructure outages since go live, no business impact Multiple upgrades without any downtime Fault Tolerance
  • 14. Data Model Error Order Order Ext Financial Summary Shipping Group Line Contact Payment TaxDtls Smart Account Line Trx Info Line Details Line Pricing Price Adj Line TFS Details Child Tables Order Child Tables RDBMS Tables: 14 Indexes: 60 Sequences: 16 Mongo DB Tables: 1 Indexes: 7 Sequences: 6
  • 15. MongoDB Collection { "_id" : "orderIdSeq", "seqValue" : 0, "cache" : NumberInt(100) } JVM 1 JVM 2 JVM 3 JVM 4 0-100 101-200 201-300 301-400 backend seqValue = 400 cache x 500 findAndModify ( ) 1. lock that particular record, 2. increment the sequence, 3. return the value, 4. unlock it. 401-500 Custom Sequence
  • 16.  Denormalize schema  Optimize Docment Size  Keep # of indexes to less than 20  Minimize # of sequences  Cache sequences in the middle tier Schema Definition  Complete data migration before query optimization  Use projections  Update only changed apptributes  Use WriteConcern: 2 / majoirty, ReadPreference: Primary Preferred  Avoid complex queries in MongoDB Query Optimization Best Practices
  • 17.  Authentication & Authorization a must  Change passwords every 6 months  Encrypt sensitive data Security  Setup alerts in Ops Manager  Use Ops Manager for backups & upgrades  Print queries taking more than Xms. Ops Manager Best Practices  Leverage 3rd data center for all adhoc queries  MongoDB Compass, MongoChef, RoboMongo  BI Connector (SQL Queries, tableau etc) Reporting
  • 18. Ops Manager is must for mission critical apps. Keep an eye on Headroom during bulk data migration. Lessons Learned SAN/SSD is a must Subscribe to MongoDB bug advisory & have frequent upgrades Most of the performance issues arises because of missing or wrong indexes. Create indexes in background after bulk data migration MongoDB provides ACID properties at document level v/s transaction. WriteConcern: majority for critical transactions Lessons Learned
  • 19. RDBMS to MongoDB Data Migration
  • 20. DATA MIGRATION TO DB DATA MIGRATION TO MONGO ON USERS REQUEST SYNC MAPPING EVENT ONE TIME REAL TIME SYNC SCHEDULED POLLING CONTINUOUS SYNC RESTRICTED MODE RDBMS BACKEND BASED WEB SERVICE BASED POLLING BASED MONGO DB POLL ON INTERVAL BASIS DATA MIGRATION TO DB R2M M2R R2M M2R R2M R2M M2R R2M: RDBMS to MongoDB M2R: MongoDB to RDBMS
  • 22. 1 How to transform your e-commerce platform to enable cloud native architecture 2 Best practices for migrating an e-commerce application platform from relational to MongoDB 3 Planning considerations for data migration from relational to MongoDB Learning Objectives
  • 24.  Authentication & Authorization a must  Change passwords every 6 months  Encrypt sensitive data  Define Read/Write and Read Only user roles  Leverage 3rd data center for all adhoc queries Security  Setup alerts in Ops Manager  Use Ops Manager for backups & upgrades  Print queries taking more than Xms. Ops Manager Best Practices

Editor's Notes

  1. Created 34 new services and moved 20+ reference objects to Elastic Search
  2. DNS – Domain Name Service ES- Elastic Search
  3. Do not store null values or default values in the document For documents greaten than 16MB, have another overflow document in the same collection Use projections to select subset of a document (Minimize Traffic) Update only changed apptributes instead of updating the complete document Use findAndModify() to lock documents and $addToSet() to add additional lines to an array
  4. Setup alerts in Ops Manager for Node down, Primary re-election, Connections count
  5. Setup alerts in Ops Manager for Node down, Primary re-election, Connections count