MongoDB @ Fiverr:
The Road to Atlas
14 May 2019
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
Sergei Makarevich Moshe Belostotsky
Hi! We are,
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
What is Fiverr?
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
Fiverr's mission is to change how the world works
together.
Fiver is a global marketplace connecting freelancers
and businesses for their digital services needs.
Meet Fiverr.
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
Background: Fiverr development DNA
Some facts...
● Task Forces - Business Domain oriented development teams
● Very fast MVP development cycle
● Many AB tests at once (80~ in parallel, 25~ new per week)
● Large amount of rollouts (52~ at once)
● High deploy rate (100~ per day)
● Ruby as the main language, Golang and Nodejs
● Micro-services architecture with CQRS (command query responsibility segregation) and event sourcing
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
Once upon a time
There was a tiny startup
That had to get to market- FAST
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
Architecture V1 – The quick way
Main incentive: get to market - FAST
SQL
Monolith:
Ruby on Rails
● Fastest to iterate
● Single SQL Database
● Memcached as caching layer
Memcached
READ/WRITE READ/WRITE
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
Advantages of Relational Schema backed Database
Why do we want to use it?
● Fast and simple integration with RoR ORM
● “Protection” from data inconsistency
● Common knowledge and practice
● Reliability and resilience
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
But then…
The small startup became bigger...
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
Relational Database Bottleneck
The collapse of the naive approach
● Table locks on multiple insert/updates
● Severe impact on large tables with high write rate due to the locks above
● Schema changes are a “pain”
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
Architecture V2 - Async writes
Main incentive: Fiverr at scale
SQL
Ruby on Rails
Monolith
● Async writes to alleviate stress from web
● RabbitMQ for passing command events
RabbitMQ
WorkerREAD/WRITE
WRITE
Memcached
READ
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
And bigger...
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
Problem: Relational Database slows us down
We need to find another solution...
● Databases became too big with too many indexes to alter schema without downtime
● Database schema changes require “maintenance windows”
● Transactions are not “MUST” on most of the features
● The need to change schema slows the development
● Code reverts should drive schema updates as well
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
Solution: Document store Database
Why do we want to use it?
● Faster than Relational database on large sets
● No schema
○ No need of infra changes with new features
○ Also when reverting a feature…
● Have good enough ORM for RoR (Mongoid)
● Can create databases/collections without DevOps as bottle-neck
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
Architecture V3 - Microservices
Main incentive: Scale for productivity
Ruby on Rails Monolith
● Microservices
● Use new tech outside the monolith
● Teams get more ownership and
autonomy
● Schemaless and fast storage -
Introduced MongoDB RabbitMQ
Worker
AMQP
Consumer
MongoDB
Service
HTTP API
Worker
AMQP
Consumer
MongoDB
Service
HTTP API
READ/WRITE
Gigs serviceOrders service
Memcached
READ/WRITE
READ/WRITE
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
MongoDB replica-sets in Fiverr
mongo-rs
fiverr_prod
RoR
app1
app2app3
app4
app5
mongo-rs2
fiverr_prod
app4
app5
app6
mongo-rs3
fiverr_prod
app7
app8
app9
mongo-rs4
fiverr_prod
app10
app11
app12
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
And even bigger...
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
Architecture V4 - LOSA
Data flow
Worker
AMQP&Kafka
Consumer
Dataview
Service
HTTP API
Gig authoring service
RoR (API Gateway)
Worker
Kafka
Consumer
Dataview
Service
HTTP API
Controller
READ WRITE
Buyer dashboard
Kafka
PRODUCE/CONSUME
View (Server side rendered)
CONSUME
● Micro-frontends
● Kubernetes
● Backend, view oriented, microservices
serving data over REST
● Read optimized private DBs
● Kafka as event broker
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
MongoDB replica-sets in fiverr
mongo-rs
RoR
app1
app2app3
app4
app5
mongo-rs2
fiverr_prod
app4
app5
app6
mongo-rs3
fiverr_prod
app7
app8
app9
mongo-rs4
app10
app11
app12
mongo-rs5
app...
app...
app...
mongo-rs6
app...
app...
app...
mongo-rs7
app...
app...
app...
fiverr_prod
mongo-rs8
app...
app...
app...
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
Problem: Cross-domain self-hosted databases
● Database sizing by the highest consumer and buffer
● Failure causes cross domain interruptions - Up to full service denial
● No ownership on the data and performance: DevOps as bottleneck
● Takes a lot of time and resources to maintain/backup/support/optimize the databases
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
Solution: Domain Dedicated databases
● More accurate size: smaller databases
● Failures cause small extent of damage (mostly one domain)
● Co-ownership between Domain (Development Team) ownership and DevOps
● Higher Development team autonomy
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
MongoDB as a service
Do you really want to manage so many
clusters on your own??
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
MongoDB Atlas
And so, our road to Atlas begins...
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
MongoDB Atlas
First, we need to make some lists...
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
Knowing Yourself
Making checklists and preparing the existing environment
● Our source databases (versions, storage engines)
● Client specs (their types and versions)
● Application classification (migration readiness)
● Source infra specifications (VPC)
● New database scale and sizing
● Activating new features after the cutoff
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
Knowing Yourself
More preparations and coordinations
● How and when to migrate?
● Who should check the process?
● A new staging environment?
● Breaking changes that might pop-up?
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
MongoDB Atlas
Once we were all set up, we took on the road
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
The Migration Process
Automating the process
● Running the migration process itself
● Pitfalls and how to overcome them
● Failures along the road
● System impact during the migration
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
The Migration Process
Switching over to Atlas
● Finishing the migration process
● Defining successful migration
● Post migration actions
● Monitoring application and cluster behavior
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
MongoDB Atlas
Taking first steps, and it is a whole new world
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
New Environment and Features
First technical impressions and perks
● The alerts and activity systems
● Real time and metrics monitoring
● The performance advisor tab
● Users and teams access control
● On-demand cluster configuration update
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
Knowing the Road
The ongoing work and migrations
● Monitoring systems consolidation
● Building new and scaling existing clusters
● Working with the Atlas API
● Setting up proper alerts and signals
● Refreshing the staging environment
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
So what’s next?
Things we are planning
● Fully automate cluster creation and scaling
● Continue data migrations to Atlas
● Align all clients with Atlas prerequisites
● Test new Atlas infra features (NVM)
© 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
moshe.b@fiverr.com
sergei.m@fiverr.com
Thank You
We’re hiring :)

More Related Content

PDF
Fiverr architecture
PDF
MongoDB @ Pango
PDF
New Features in MongoDB Atlas
PDF
Polyglot, fault-tolerant event-driven programming with kafka, kubernetes and ...
PDF
How We Fixed Our MongoDB Problems
PDF
Making Sense of Time Series Data in MongoDB
PDF
MongoDB .local Chicago 2019: MongoDB Atlas Data Lake Technical Deep Dive
PDF
5 lessons learned for Successful Migration to Confluent Cloud
Fiverr architecture
MongoDB @ Pango
New Features in MongoDB Atlas
Polyglot, fault-tolerant event-driven programming with kafka, kubernetes and ...
How We Fixed Our MongoDB Problems
Making Sense of Time Series Data in MongoDB
MongoDB .local Chicago 2019: MongoDB Atlas Data Lake Technical Deep Dive
5 lessons learned for Successful Migration to Confluent Cloud

What's hot (20)

KEY
Modular Web Applications With Netzke
PDF
MongoDB .local Munich 2019: Mastering MongoDB on Kubernetes – MongoDB Enterpr...
PPTX
The Rise of Microservices - Containers and Orchestration
PDF
Advanced Caching Patterns used by 2000 microservices - Api World
PDF
Jax london - Battle-tested event-driven patterns for your microservices archi...
PDF
MongoDB .local Bengaluru 2019: MongoDB Atlas Data Lake Technical Deep Dive
PDF
How Different are MongoDB Drivers
PDF
MongoDB .local London 2019: Migrating a Monolith to MongoDB Atlas – Auto Trad...
PPTX
Webinar - Build Cloud-native platform using Docker, Kubernetes, Prometheus, I...
PDF
Open sourcing a successful internal project - Reversim 2021
PPTX
[HashiConf 2019] "Securing Cloud Native Communication with Ambassador and Con...
PDF
MongoDB .local London 2019: New Encryption Capabilities in MongoDB 4.2: A Dee...
PDF
MongoDB .local London 2019: Modern Data Backup and Recovery from On-premises ...
PDF
MongoDB Europe 2016 - Ops Manager and Cloud Manager
PPTX
Standardizing Microservice Management With a Service Mesh
PDF
MongoDB .local Bengaluru 2019: Using MongoDB Services in Kubernetes: Any Plat...
PDF
Polyglot, Fault Tolerant Event-Driven Programming with Kafka, Kubernetes and ...
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
PDF
5 lessons learned for successful migration to Confluent cloud | Natan Silinit...
PDF
MongoDB Europe 2016 - Star in a Reasonably Priced Car - Which Driver is Best?
Modular Web Applications With Netzke
MongoDB .local Munich 2019: Mastering MongoDB on Kubernetes – MongoDB Enterpr...
The Rise of Microservices - Containers and Orchestration
Advanced Caching Patterns used by 2000 microservices - Api World
Jax london - Battle-tested event-driven patterns for your microservices archi...
MongoDB .local Bengaluru 2019: MongoDB Atlas Data Lake Technical Deep Dive
How Different are MongoDB Drivers
MongoDB .local London 2019: Migrating a Monolith to MongoDB Atlas – Auto Trad...
Webinar - Build Cloud-native platform using Docker, Kubernetes, Prometheus, I...
Open sourcing a successful internal project - Reversim 2021
[HashiConf 2019] "Securing Cloud Native Communication with Ambassador and Con...
MongoDB .local London 2019: New Encryption Capabilities in MongoDB 4.2: A Dee...
MongoDB .local London 2019: Modern Data Backup and Recovery from On-premises ...
MongoDB Europe 2016 - Ops Manager and Cloud Manager
Standardizing Microservice Management With a Service Mesh
MongoDB .local Bengaluru 2019: Using MongoDB Services in Kubernetes: Any Plat...
Polyglot, Fault Tolerant Event-Driven Programming with Kafka, Kubernetes and ...
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
5 lessons learned for successful migration to Confluent cloud | Natan Silinit...
MongoDB Europe 2016 - Star in a Reasonably Priced Car - Which Driver is Best?
Ad

Similar to MongoDB @ Fiverr: The Road to Atlas (20)

KEY
Mongo Seattle - The Business of MongoDB
PPTX
Running MongoDB in the Cloud
KEY
MongoDB vs Mysql. A devops point of view
PPTX
mongoDB: Driving a data revolution
PPTX
Tim Marston.
PDF
Cloud Data Strategy event London
PDF
MongoDB at FrozenRails
PPTX
Mongodb beijingconf yottaa_3.3
PPTX
Tim marston
PDF
Introduction to MongoDB
PPTX
Accelerating a Path to Digital with a Cloud Data Strategy
PPTX
Faster, Simpler, Better - MongoDB to the rescue
KEY
PPTX
Why Organizations are Looking at Alternative Database Technologies – Introduc...
PDF
Introduction to MongoDB
PPTX
Mongo db intro.pptx
PPTX
MongoDB presentation
PPTX
An Evening with MongoDB Detroit 2013
PDF
How to Get Started with Your MongoDB Pilot Project
PPTX
Techorama - Evolvable Application Development with MongoDB
Mongo Seattle - The Business of MongoDB
Running MongoDB in the Cloud
MongoDB vs Mysql. A devops point of view
mongoDB: Driving a data revolution
Tim Marston.
Cloud Data Strategy event London
MongoDB at FrozenRails
Mongodb beijingconf yottaa_3.3
Tim marston
Introduction to MongoDB
Accelerating a Path to Digital with a Cloud Data Strategy
Faster, Simpler, Better - MongoDB to the rescue
Why Organizations are Looking at Alternative Database Technologies – Introduc...
Introduction to MongoDB
Mongo db intro.pptx
MongoDB presentation
An Evening with MongoDB Detroit 2013
How to Get Started with Your MongoDB Pilot Project
Techorama - Evolvable Application Development with MongoDB
Ad

More from MongoDB (20)

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

Recently uploaded (20)

PPTX
Patient Appointment Booking in Odoo with online payment
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PPTX
Cybersecurity: Protecting the Digital World
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PDF
DNT Brochure 2025 – ISV Solutions @ D365
PPTX
CNN LeNet5 Architecture: Neural Networks
PDF
iTop VPN Crack Latest Version Full Key 2025
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
PDF
Cost to Outsource Software Development in 2025
PPTX
Trending Python Topics for Data Visualization in 2025
PDF
CCleaner 6.39.11548 Crack 2025 License Key
PDF
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
DOCX
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
Microsoft Office 365 Crack Download Free
PPTX
GSA Content Generator Crack (2025 Latest)
Patient Appointment Booking in Odoo with online payment
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
Cybersecurity: Protecting the Digital World
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
DNT Brochure 2025 – ISV Solutions @ D365
CNN LeNet5 Architecture: Neural Networks
iTop VPN Crack Latest Version Full Key 2025
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
Why Generative AI is the Future of Content, Code & Creativity?
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
Cost to Outsource Software Development in 2025
Trending Python Topics for Data Visualization in 2025
CCleaner 6.39.11548 Crack 2025 License Key
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
Designing Intelligence for the Shop Floor.pdf
Microsoft Office 365 Crack Download Free
GSA Content Generator Crack (2025 Latest)

MongoDB @ Fiverr: The Road to Atlas

  • 1. MongoDB @ Fiverr: The Road to Atlas 14 May 2019
  • 2. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. Sergei Makarevich Moshe Belostotsky Hi! We are,
  • 3. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. What is Fiverr?
  • 4. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. Fiverr's mission is to change how the world works together. Fiver is a global marketplace connecting freelancers and businesses for their digital services needs. Meet Fiverr.
  • 5. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential.
  • 6. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. Background: Fiverr development DNA Some facts... ● Task Forces - Business Domain oriented development teams ● Very fast MVP development cycle ● Many AB tests at once (80~ in parallel, 25~ new per week) ● Large amount of rollouts (52~ at once) ● High deploy rate (100~ per day) ● Ruby as the main language, Golang and Nodejs ● Micro-services architecture with CQRS (command query responsibility segregation) and event sourcing
  • 7. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. Once upon a time There was a tiny startup That had to get to market- FAST
  • 8. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. Architecture V1 – The quick way Main incentive: get to market - FAST SQL Monolith: Ruby on Rails ● Fastest to iterate ● Single SQL Database ● Memcached as caching layer Memcached READ/WRITE READ/WRITE
  • 9. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. Advantages of Relational Schema backed Database Why do we want to use it? ● Fast and simple integration with RoR ORM ● “Protection” from data inconsistency ● Common knowledge and practice ● Reliability and resilience
  • 10. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. But then… The small startup became bigger...
  • 11. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. Relational Database Bottleneck The collapse of the naive approach ● Table locks on multiple insert/updates ● Severe impact on large tables with high write rate due to the locks above ● Schema changes are a “pain”
  • 12. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. Architecture V2 - Async writes Main incentive: Fiverr at scale SQL Ruby on Rails Monolith ● Async writes to alleviate stress from web ● RabbitMQ for passing command events RabbitMQ WorkerREAD/WRITE WRITE Memcached READ
  • 13. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. And bigger...
  • 14. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. Problem: Relational Database slows us down We need to find another solution... ● Databases became too big with too many indexes to alter schema without downtime ● Database schema changes require “maintenance windows” ● Transactions are not “MUST” on most of the features ● The need to change schema slows the development ● Code reverts should drive schema updates as well
  • 15. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. Solution: Document store Database Why do we want to use it? ● Faster than Relational database on large sets ● No schema ○ No need of infra changes with new features ○ Also when reverting a feature… ● Have good enough ORM for RoR (Mongoid) ● Can create databases/collections without DevOps as bottle-neck
  • 16. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. Architecture V3 - Microservices Main incentive: Scale for productivity Ruby on Rails Monolith ● Microservices ● Use new tech outside the monolith ● Teams get more ownership and autonomy ● Schemaless and fast storage - Introduced MongoDB RabbitMQ Worker AMQP Consumer MongoDB Service HTTP API Worker AMQP Consumer MongoDB Service HTTP API READ/WRITE Gigs serviceOrders service Memcached READ/WRITE READ/WRITE
  • 17. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. MongoDB replica-sets in Fiverr mongo-rs fiverr_prod RoR app1 app2app3 app4 app5 mongo-rs2 fiverr_prod app4 app5 app6 mongo-rs3 fiverr_prod app7 app8 app9 mongo-rs4 fiverr_prod app10 app11 app12
  • 18. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. And even bigger...
  • 19. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. Architecture V4 - LOSA Data flow Worker AMQP&Kafka Consumer Dataview Service HTTP API Gig authoring service RoR (API Gateway) Worker Kafka Consumer Dataview Service HTTP API Controller READ WRITE Buyer dashboard Kafka PRODUCE/CONSUME View (Server side rendered) CONSUME ● Micro-frontends ● Kubernetes ● Backend, view oriented, microservices serving data over REST ● Read optimized private DBs ● Kafka as event broker
  • 20. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. MongoDB replica-sets in fiverr mongo-rs RoR app1 app2app3 app4 app5 mongo-rs2 fiverr_prod app4 app5 app6 mongo-rs3 fiverr_prod app7 app8 app9 mongo-rs4 app10 app11 app12 mongo-rs5 app... app... app... mongo-rs6 app... app... app... mongo-rs7 app... app... app... fiverr_prod mongo-rs8 app... app... app...
  • 21. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. Problem: Cross-domain self-hosted databases ● Database sizing by the highest consumer and buffer ● Failure causes cross domain interruptions - Up to full service denial ● No ownership on the data and performance: DevOps as bottleneck ● Takes a lot of time and resources to maintain/backup/support/optimize the databases
  • 22. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. Solution: Domain Dedicated databases ● More accurate size: smaller databases ● Failures cause small extent of damage (mostly one domain) ● Co-ownership between Domain (Development Team) ownership and DevOps ● Higher Development team autonomy
  • 23. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. MongoDB as a service Do you really want to manage so many clusters on your own??
  • 24. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. MongoDB Atlas And so, our road to Atlas begins...
  • 25. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. MongoDB Atlas First, we need to make some lists...
  • 26. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. Knowing Yourself Making checklists and preparing the existing environment ● Our source databases (versions, storage engines) ● Client specs (their types and versions) ● Application classification (migration readiness) ● Source infra specifications (VPC) ● New database scale and sizing ● Activating new features after the cutoff
  • 27. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. Knowing Yourself More preparations and coordinations ● How and when to migrate? ● Who should check the process? ● A new staging environment? ● Breaking changes that might pop-up?
  • 28. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. MongoDB Atlas Once we were all set up, we took on the road
  • 29. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. The Migration Process Automating the process ● Running the migration process itself ● Pitfalls and how to overcome them ● Failures along the road ● System impact during the migration
  • 30. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. The Migration Process Switching over to Atlas ● Finishing the migration process ● Defining successful migration ● Post migration actions ● Monitoring application and cluster behavior
  • 31. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. MongoDB Atlas Taking first steps, and it is a whole new world
  • 32. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. New Environment and Features First technical impressions and perks ● The alerts and activity systems ● Real time and metrics monitoring ● The performance advisor tab ● Users and teams access control ● On-demand cluster configuration update
  • 33. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. Knowing the Road The ongoing work and migrations ● Monitoring systems consolidation ● Building new and scaling existing clusters ● Working with the Atlas API ● Setting up proper alerts and signals ● Refreshing the staging environment
  • 34. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. So what’s next? Things we are planning ● Fully automate cluster creation and scaling ● Continue data migrations to Atlas ● Align all clients with Atlas prerequisites ● Test new Atlas infra features (NVM)
  • 35. © 2019 Fiverr Int. Lmt. All Rights Reserved. Proprietary & Confidential. moshe.b@fiverr.com sergei.m@fiverr.com Thank You We’re hiring :)