SlideShare a Scribd company logo
@vparihar

Scalability and High Availability with ReplicaSet
Vivek Parihar
AVP Engineering,Weboinse Lab
Who Am I?
●
●
●
●
●
●

A Weboniser and Rubyist
Blogger(vparihar01.github.com)
MongoDb user
Geek
DevOps
Mainly write Ruby, but have great passion for Javascript
and Cloud Platforms
● ...
Agenda
●
●
●
●
●
●
●

{10: Reasons, To: Love
}
Scalability with
What is Sharding?
What is Replica Set?
Replication Process
Advantaged of Replica Set vs Master/Slave
How to set up replica set on production
{10: Reasons , To: Love
I.RELATIVELY EASY TO SETUP
In simple 3 steps MongoDb is start running on your machine
Step-1. sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
Step-2. sudo apt-get install mongodb-10gen
Step-3. sudo /etc/init.d/mongodb start

}

Recommended for you

Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB

Topics Covered : - What is MongoDB? - SQL vs NoSQL - Document Data Model - CRUD operations - Cursor concepts - Benefits & drawbacks - Use cases & “Don’t Use!” cases

nosqlnodejsmeteor
MongoDB Fundamentals
MongoDB FundamentalsMongoDB Fundamentals
MongoDB Fundamentals

The document discusses MongoDB concepts including: - MongoDB uses a document-oriented data model with dynamic schemas and supports embedding and linking of related data. - Replication allows for high availability and data redundancy across multiple nodes. - Sharding provides horizontal scalability by distributing data across nodes in a cluster. - MongoDB supports both eventual and immediate consistency models.

mongodbnosql
Mongodb - NoSql Database
Mongodb - NoSql DatabaseMongodb - NoSql Database
Mongodb - NoSql Database

MongoDB is an open-source document database, and the leading NoSQL database. Written in C++. MongoDB has official drivers for a variety of popular programming languages and development environments. There are also a large number of unofficial or community-supported drivers for other programming languages and frameworks.

mongodbjavanosql
{10: Reasons , To: Love

}

II.It’s fast
On average

7 times faster
{10: Reasons , To: Love
III. Easy Scalability
{ Does Anyone know about scaling MySql? }

}
{10: Reasons , To: Love
IV. High Availability

}
{10: Reasons , To: Love
V. High Performance

}

Recommended for you

MySQL Cluster Basics
MySQL Cluster BasicsMySQL Cluster Basics
MySQL Cluster Basics

This presentation was written by Wagner Bianchi for the presentation on the Oracle Consulting Team/Professional Services meeting that took place in San Francisco/CA.

mysql cluster ndbd ndb sql mgm management ha engin
MongoDB presentation
MongoDB presentationMongoDB presentation
MongoDB presentation

It is a power point presentation, Prepared by Hyphen. This ppt is attached another doc file which is a Report

Indexing with MongoDB
Indexing with MongoDBIndexing with MongoDB
Indexing with MongoDB

Indexes are references to documents that are efficiently ordered by key and maintained in a tree structure for fast lookup. They improve the speed of document retrieval, range scanning, ordering, and other operations by enabling the use of the index instead of a collection scan. While indexes improve query performance, they can slow down document inserts and updates since the indexes also need to be maintained. The query optimizer aims to select the best index for each query but can sometimes be overridden.

mongodbmongonosql
{10: Reasons , To: Love
VI. Flexible Schema
{no schema: no problem}

}
{10: Reasons , To: Love MongoDb}
VII. Built in Sharding and Replication
{10: Reasons , To: Love

}

VIII. Courses are excellent to start working as a
developer/DBA with.
{10: Reasons , To: Love

}

IX. Deploy New Instances on Demand

Recommended for you

MongoDB World 2019: Becoming an Ops Manager Backup Superhero!
MongoDB World 2019: Becoming an Ops Manager Backup Superhero!MongoDB World 2019: Becoming an Ops Manager Backup Superhero!
MongoDB World 2019: Becoming an Ops Manager Backup Superhero!

Oh no! My backups aren't progressing! If something happens in production now, and I don't have current backups, I'll be out of a job for sure! If these words resonate with you, don’t worry; you’re not the only one! Backup issues are one of the most common topics we deal with in Technical Services. In this talk, we will go through the backup flow, talk about where things might go wrong, and the symptoms you will see in the logs and the UI. We will also talk about other commands you can run to confirm the diagnosis, and how support can assist if you’re still stuck. Finally, we will talk about the new backup architecture in 4.2 and how it simplifies some of these concerns. This session is suitable for those with all levels of Ops Manager experience, but attendees should have a basic understanding of MongoDB’s replication process before attending this session. After this talk, you will have leveled up your backup superpowers, and can swoop in to save your job (and the day)!

mongodbmongodb world
The Basics of MongoDB
The Basics of MongoDBThe Basics of MongoDB
The Basics of MongoDB

In this presentation, Raghavendra BM of Valuebound has discussed the basics of MongoDB - an open-source document database and leading NoSQL database. ---------------------------------------------------------- Get Socialistic Our website: http://valuebound.com/ LinkedIn: http://bit.ly/2eKgdux Facebook: https://www.facebook.com/valuebound/ Twitter: http://bit.ly/2gFPTi8

mongodbopen sourcenosql
MongoDB
MongoDBMongoDB
MongoDB

This document provides an overview and introduction to MongoDB, an open-source, high-performance NoSQL database. It outlines MongoDB's features like document-oriented storage, replication, sharding, and CRUD operations. It also discusses MongoDB's data model, comparisons to relational databases, and common use cases. The document concludes that MongoDB is well-suited for applications like content management, inventory management, game development, social media storage, and sensor data databases due to its flexible schema, distributed deployment, and low latency.

{10: Reasons , To: Love

}

X. BASE Rather Than ACID
ACID

BASE

Atomicity

Basically Available

Consistency

Soft State

Isolation

Eventual Consistency

Durable
Horizontal Scaling Vs Vertical Scaling
Scalability with
●
●
●
●
●
●

Horizontal Scaling
Auto-Sharding
Vertical Scaling
Replica Set
Performance {For: Read, For: Write}
Storage
Horizontal Scaling
● By adding more machines into the existing pool.
● In a database world horizontal-scaling is often based on
partitioning of the data i.e. each node contains only part
of the data.
● MongoDB achieves this through auto-sharding.

Recommended for you

Streaming replication in practice
Streaming replication in practiceStreaming replication in practice
Streaming replication in practice

This document discusses streaming replication in PostgreSQL. It covers how streaming replication works, including the write-ahead log and replication processes. It also discusses setting up replication between a primary and standby server, including configuring the servers and verifying replication is working properly. Monitoring replication is discussed along with views and functions for checking replication status. Maintenance tasks like adding or removing standbys and pausing replication are also mentioned.

postgresql databases
Introduction to MongoDB.pptx
Introduction to MongoDB.pptxIntroduction to MongoDB.pptx
Introduction to MongoDB.pptx

The document provides an introduction and overview of MongoDB, including what NoSQL is, the different types of NoSQL databases, when to use MongoDB, its key features like scalability and flexibility, how to install and use basic commands like creating databases and collections, and references for further learning.

#mongodb#nosql#whatismongodb
MySQL Performance Schema in MySQL 8.0
MySQL Performance Schema in MySQL 8.0MySQL Performance Schema in MySQL 8.0
MySQL Performance Schema in MySQL 8.0

An overview of MySQL Performance Schema in 8.0 Few use cases to utilize Performance Schema. A glimpse of new features in MySQL 8.0 with examples

mysqlperformance schema
Vertical Scaling
● Typically refers to adding more processors ,ram and
storage to a Symmetric Multiple Processing to extend
processing capability.
● In a database world vertical-scaling is done through
multi-core i.e. spreading the load between the CPU and
RAM resources of that machine.
MongoDb scalability and high availability with Replica-Set
What is Sharding?
● Sharding is a method for storing data across multiple
machines.
● Also known as Horizontal Scaling
● Divides the data set and distributes the data over
multiple servers, or shards.
What is Sharding?
Each shard is an independent database, and collectively,
the shards make up a single logical database.

Recommended for you

Amazon Aurora Storage Demystified: How It All Works (DAT363) - AWS re:Invent ...
Amazon Aurora Storage Demystified: How It All Works (DAT363) - AWS re:Invent ...Amazon Aurora Storage Demystified: How It All Works (DAT363) - AWS re:Invent ...
Amazon Aurora Storage Demystified: How It All Works (DAT363) - AWS re:Invent ...

Amazon Aurora is a high performance, highly scalable database service with MySQL- and PostgreSQL-compatibility. One of its key components is an innovative storage system that is optimized for database workloads and specifically designed to take advantage of modern cloud technology. Hear from the team that built Amazon Aurora's storage system on how the system is designed, how it works, and what you need to know to get the most out of it.

amazonawsreinvent2018databases
An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDB

This document provides an introduction to NoSQL and MongoDB. It discusses that NoSQL is a non-relational database management system that avoids joins and is easy to scale. It then summarizes the different flavors of NoSQL including key-value stores, graphs, BigTable, and document stores. The remainder of the document focuses on MongoDB, describing its structure, how to perform inserts and searches, features like map-reduce and replication. It concludes by encouraging the reader to try MongoDB themselves.

mongodbnosqlrefcam
MongoDB WiredTiger Internals: Journey To Transactions
MongoDB WiredTiger Internals: Journey To TransactionsMongoDB WiredTiger Internals: Journey To Transactions
MongoDB WiredTiger Internals: Journey To Transactions

MongoDB has adapted transaction feature (ACID Properties) in MongoDB 4.0. This talk focuses on the internals of how MongoDB adapted the ACID properties with Weird Tiger Engine. Weird tiger offers more future possibilities for MongoDB. This tech talk was presented at Mydbops Database Meetup on 27-04-2019 by Manosh Malai Senior Devops/NoSQL Consultant with Mydbops and Ranjith Database Administrator with Mydbops.

mongodbweird tigermongodb 4.0
Sharding offerings:
● Automatic balancing for changes in load and data
distribution
● Easy addition of new machines
● Scaling out to one thousand nodes
● No single points of failure
● Automatic failover
What is Replication?
● Replication is the process of synchronizing data across
multiple servers.
● Mongo achieves Replication through Replica Sets
● Replica sets are a form of asynchronous master/slave
replication
● A replica set consists of two or more nodes that are
copies of each other. (i.e.: replicas)
Purpose of Replication
Data Redundancy
●

Replica sets provide an automated method

for storing multiple copies of your data.
Purpose of Replication
Automated Failover / High Avalability
●

If primary fails then replica set will

attempt to select another member
to become the new primary.
●

This means that the failure of a

primary can be handled by the client
without any configuration changes
●

Use heartbeat signal to detect failure

Recommended for you

Optimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performanceOptimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performance

When it comes to optimizing the performance of a database, DBAs have to look at everything from the OS to the network. In this session, MariaDB Enterprise Architect Manjot Singh shares best practices for getting the most out of MariaDB. He highlights recommended OS settings, important configuration and tuning parameters, options for improving replication and clustering performance and features such as query result caching.

PostgreSQL Replication Tutorial
PostgreSQL Replication TutorialPostgreSQL Replication Tutorial
PostgreSQL Replication Tutorial

PostgreSQL is one of the most advanced relational databases. It offers superb replication capabilities. The most important features are: Streaming replication, Point-In-Time-Recovery, advanced monitoring, etc.

synchronous replicationpostgresql replicationpostgresql
Evolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best PracticesEvolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best Practices

There are several exciting and long-awaited features released from MongoDB 4.0. He will focus on the prime features, the kind of problem it solves, and the best practices for deploying replica sets.

mongodb 4.0mongodbmydbops
Purpose of Replication
●

Distributed Read Load/Read Scaling
By default, the primary node of a replica set is accessed for all reads and
writes.

●

Disaster Recovery
Replica sets allows for a “delayed secondary” node.
This node can provide a window for recovering from disastrous
events such as:
○ bad deployments
○ dropped tables and collections
Replication Process
● Members of a replica set replicate data continuously
● MongoDB applies database operations on the primary
and then records the operations on the primary’s oplog.
● All replica set members contain a copy of the oplog,
allowing them to maintain the current state of the
database.
Advantages of Replica Set vs Master/Slave
● Replica sets are basically just master-slave with
automatic failover.
● So, you have a pool of servers with one primary (the
master) and N secondaries (slaves). If the primary
crashes or disappears, the other servers will hold an
election to choose a new primary.
Demo -: How to set up replica set on Production!
Click on below link to see the demo-:

http://youtu.be/BFSGcBHcirU

Recommended for you

Evolution Of MongoDB Replicaset
Evolution Of MongoDB ReplicasetEvolution Of MongoDB Replicaset
Evolution Of MongoDB Replicaset

MongoDB replica sets allow for horizontal scaling of MongoDB deployments. The document discusses best practices for implementing and managing MongoDB replica sets, including: - Maintaining an odd number of voting members to prevent election ties - Using read preferences like nearest, secondary preferred for improved performance - Configuring a minimum oplog retention period of 24 hours for recovery from outages - Enabling authentication and authorization to secure replica sets - Several features introduced in MongoDB versions 4.4 and 5.0 like resumable initial sync and simultaneous indexing improve replication performance.

mongodbmydbopsreplica set
Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia Databases

Slides presented at Percona Live Europe Open Source Database Conference 2019, Amsterdam, 2019-10-01. Imagine a world where all Wikipedia articles disappear due to a human error or software bug. Sounds unreal? According to some estimations, it would take an excess of hundreds of million person-hours to be written again. To prevent that scenario from ever happening, our SRE team at Wikimedia recently refactored the relational database recovery system. In this session, we will discuss how we backup 550TB of MariaDB data without impacting the 15 billion page views per month we get. We will cover what were our initial plans to replace the old infrastructure, how we achieved recovering 2TB databases in less than 30 minutes while maintaining per-table granularity, as well as the different types of backups we implemented. Lastly, we will talk about lessons learned, what went well, how our original plans changed and future work.

backupswikipediaperconalive
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High load

This document summarizes a presentation about designing systems to handle high loads when Chuck Norris is your customer. It discusses scaling architectures vertically and horizontally, RESTful principles, using NoSQL databases like MongoDB, caching with Memcached, search engines like Sphinx, video/image storage, and bandwidth management. It emphasizes that the right technology depends on business needs, and high-load systems require robust architectures, qualified developers, and avoiding single points of failure.

high load
Thanks
Would Love to answer your queries...
Vivek Parihar
@vparihar

More Related Content

What's hot

MongoDB vs Scylla: Production Experience from Both Dev & Ops Standpoint at Nu...
MongoDB vs Scylla: Production Experience from Both Dev & Ops Standpoint at Nu...MongoDB vs Scylla: Production Experience from Both Dev & Ops Standpoint at Nu...
MongoDB vs Scylla: Production Experience from Both Dev & Ops Standpoint at Nu...
ScyllaDB
 
Mongo DB
Mongo DB Mongo DB
Inside MongoDB: the Internals of an Open-Source Database
Inside MongoDB: the Internals of an Open-Source DatabaseInside MongoDB: the Internals of an Open-Source Database
Inside MongoDB: the Internals of an Open-Source Database
Mike Dirolf
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
NodeXperts
 
MongoDB Fundamentals
MongoDB FundamentalsMongoDB Fundamentals
MongoDB Fundamentals
MongoDB
 
Mongodb - NoSql Database
Mongodb - NoSql DatabaseMongodb - NoSql Database
Mongodb - NoSql Database
Prashant Gupta
 
MySQL Cluster Basics
MySQL Cluster BasicsMySQL Cluster Basics
MySQL Cluster Basics
Wagner Bianchi
 
MongoDB presentation
MongoDB presentationMongoDB presentation
MongoDB presentation
Hyphen Call
 
Indexing with MongoDB
Indexing with MongoDBIndexing with MongoDB
Indexing with MongoDB
MongoDB
 
MongoDB World 2019: Becoming an Ops Manager Backup Superhero!
MongoDB World 2019: Becoming an Ops Manager Backup Superhero!MongoDB World 2019: Becoming an Ops Manager Backup Superhero!
MongoDB World 2019: Becoming an Ops Manager Backup Superhero!
MongoDB
 
The Basics of MongoDB
The Basics of MongoDBThe Basics of MongoDB
The Basics of MongoDB
valuebound
 
MongoDB
MongoDBMongoDB
MongoDB
nikhil2807
 
Streaming replication in practice
Streaming replication in practiceStreaming replication in practice
Streaming replication in practice
Alexey Lesovsky
 
Introduction to MongoDB.pptx
Introduction to MongoDB.pptxIntroduction to MongoDB.pptx
Introduction to MongoDB.pptx
Surya937648
 
MySQL Performance Schema in MySQL 8.0
MySQL Performance Schema in MySQL 8.0MySQL Performance Schema in MySQL 8.0
MySQL Performance Schema in MySQL 8.0
Mayank Prasad
 
Amazon Aurora Storage Demystified: How It All Works (DAT363) - AWS re:Invent ...
Amazon Aurora Storage Demystified: How It All Works (DAT363) - AWS re:Invent ...Amazon Aurora Storage Demystified: How It All Works (DAT363) - AWS re:Invent ...
Amazon Aurora Storage Demystified: How It All Works (DAT363) - AWS re:Invent ...
Amazon Web Services
 
An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDB
Lee Theobald
 
MongoDB WiredTiger Internals: Journey To Transactions
MongoDB WiredTiger Internals: Journey To TransactionsMongoDB WiredTiger Internals: Journey To Transactions
MongoDB WiredTiger Internals: Journey To Transactions
Mydbops
 
Optimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performanceOptimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performance
MariaDB plc
 
PostgreSQL Replication Tutorial
PostgreSQL Replication TutorialPostgreSQL Replication Tutorial
PostgreSQL Replication Tutorial
Hans-Jürgen Schönig
 

What's hot (20)

MongoDB vs Scylla: Production Experience from Both Dev & Ops Standpoint at Nu...
MongoDB vs Scylla: Production Experience from Both Dev & Ops Standpoint at Nu...MongoDB vs Scylla: Production Experience from Both Dev & Ops Standpoint at Nu...
MongoDB vs Scylla: Production Experience from Both Dev & Ops Standpoint at Nu...
 
Mongo DB
Mongo DB Mongo DB
Mongo DB
 
Inside MongoDB: the Internals of an Open-Source Database
Inside MongoDB: the Internals of an Open-Source DatabaseInside MongoDB: the Internals of an Open-Source Database
Inside MongoDB: the Internals of an Open-Source Database
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
MongoDB Fundamentals
MongoDB FundamentalsMongoDB Fundamentals
MongoDB Fundamentals
 
Mongodb - NoSql Database
Mongodb - NoSql DatabaseMongodb - NoSql Database
Mongodb - NoSql Database
 
MySQL Cluster Basics
MySQL Cluster BasicsMySQL Cluster Basics
MySQL Cluster Basics
 
MongoDB presentation
MongoDB presentationMongoDB presentation
MongoDB presentation
 
Indexing with MongoDB
Indexing with MongoDBIndexing with MongoDB
Indexing with MongoDB
 
MongoDB World 2019: Becoming an Ops Manager Backup Superhero!
MongoDB World 2019: Becoming an Ops Manager Backup Superhero!MongoDB World 2019: Becoming an Ops Manager Backup Superhero!
MongoDB World 2019: Becoming an Ops Manager Backup Superhero!
 
The Basics of MongoDB
The Basics of MongoDBThe Basics of MongoDB
The Basics of MongoDB
 
MongoDB
MongoDBMongoDB
MongoDB
 
Streaming replication in practice
Streaming replication in practiceStreaming replication in practice
Streaming replication in practice
 
Introduction to MongoDB.pptx
Introduction to MongoDB.pptxIntroduction to MongoDB.pptx
Introduction to MongoDB.pptx
 
MySQL Performance Schema in MySQL 8.0
MySQL Performance Schema in MySQL 8.0MySQL Performance Schema in MySQL 8.0
MySQL Performance Schema in MySQL 8.0
 
Amazon Aurora Storage Demystified: How It All Works (DAT363) - AWS re:Invent ...
Amazon Aurora Storage Demystified: How It All Works (DAT363) - AWS re:Invent ...Amazon Aurora Storage Demystified: How It All Works (DAT363) - AWS re:Invent ...
Amazon Aurora Storage Demystified: How It All Works (DAT363) - AWS re:Invent ...
 
An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDB
 
MongoDB WiredTiger Internals: Journey To Transactions
MongoDB WiredTiger Internals: Journey To TransactionsMongoDB WiredTiger Internals: Journey To Transactions
MongoDB WiredTiger Internals: Journey To Transactions
 
Optimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performanceOptimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performance
 
PostgreSQL Replication Tutorial
PostgreSQL Replication TutorialPostgreSQL Replication Tutorial
PostgreSQL Replication Tutorial
 

Similar to MongoDb scalability and high availability with Replica-Set

Evolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best PracticesEvolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best Practices
Mydbops
 
Evolution Of MongoDB Replicaset
Evolution Of MongoDB ReplicasetEvolution Of MongoDB Replicaset
Evolution Of MongoDB Replicaset
M Malai
 
Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia Databases
Jaime Crespo
 
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High load
Krivoy Rog IT Community
 
MongoDB: Advantages of an Open Source NoSQL Database
MongoDB: Advantages of an Open Source NoSQL DatabaseMongoDB: Advantages of an Open Source NoSQL Database
MongoDB: Advantages of an Open Source NoSQL Database
FITC
 
Scaling Up with PHP and AWS
Scaling Up with PHP and AWSScaling Up with PHP and AWS
Scaling Up with PHP and AWS
Heath Dutton ☕
 
Scaling symfony apps
Scaling symfony appsScaling symfony apps
Scaling symfony apps
Matteo Moretti
 
Screaming Fast Wpmu
Screaming Fast WpmuScreaming Fast Wpmu
Screaming Fast Wpmu
djcp
 
High performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodbHigh performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodb
Wei Shan Ang
 
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
Aleksander Alekseev
 
Running MySQL in AWS
Running MySQL in AWSRunning MySQL in AWS
Running MySQL in AWS
Laine Campbell
 
Benchmarking, Load Testing, and Preventing Terrible Disasters
Benchmarking, Load Testing, and Preventing Terrible DisastersBenchmarking, Load Testing, and Preventing Terrible Disasters
Benchmarking, Load Testing, and Preventing Terrible Disasters
MongoDB
 
Pg chameleon, mysql to postgresql replica made easy
Pg chameleon, mysql to postgresql replica made easyPg chameleon, mysql to postgresql replica made easy
Pg chameleon, mysql to postgresql replica made easy
Federico Campoli
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & Optimization
MariaDB plc
 
High-level architecture of a complete MariaDB deployment
High-level architecture of a complete MariaDB deploymentHigh-level architecture of a complete MariaDB deployment
High-level architecture of a complete MariaDB deployment
Federico Razzoli
 
Zero Downtime JEE Architectures
Zero Downtime JEE ArchitecturesZero Downtime JEE Architectures
Zero Downtime JEE Architectures
Alexander Penev
 
MySQL's NoSQL -- SCaLE 13x Feb. 20, 2015
MySQL's NoSQL -- SCaLE 13x Feb. 20, 2015MySQL's NoSQL -- SCaLE 13x Feb. 20, 2015
MySQL's NoSQL -- SCaLE 13x Feb. 20, 2015
Dave Stokes
 
Optimizing Linux Servers
Optimizing Linux ServersOptimizing Linux Servers
Optimizing Linux Servers
Davor Guttierrez
 
MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014) MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014)
Frazer Clement
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialThe Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
Jean-François Gagné
 

Similar to MongoDb scalability and high availability with Replica-Set (20)

Evolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best PracticesEvolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best Practices
 
Evolution Of MongoDB Replicaset
Evolution Of MongoDB ReplicasetEvolution Of MongoDB Replicaset
Evolution Of MongoDB Replicaset
 
Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia Databases
 
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High load
 
MongoDB: Advantages of an Open Source NoSQL Database
MongoDB: Advantages of an Open Source NoSQL DatabaseMongoDB: Advantages of an Open Source NoSQL Database
MongoDB: Advantages of an Open Source NoSQL Database
 
Scaling Up with PHP and AWS
Scaling Up with PHP and AWSScaling Up with PHP and AWS
Scaling Up with PHP and AWS
 
Scaling symfony apps
Scaling symfony appsScaling symfony apps
Scaling symfony apps
 
Screaming Fast Wpmu
Screaming Fast WpmuScreaming Fast Wpmu
Screaming Fast Wpmu
 
High performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodbHigh performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodb
 
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
 
Running MySQL in AWS
Running MySQL in AWSRunning MySQL in AWS
Running MySQL in AWS
 
Benchmarking, Load Testing, and Preventing Terrible Disasters
Benchmarking, Load Testing, and Preventing Terrible DisastersBenchmarking, Load Testing, and Preventing Terrible Disasters
Benchmarking, Load Testing, and Preventing Terrible Disasters
 
Pg chameleon, mysql to postgresql replica made easy
Pg chameleon, mysql to postgresql replica made easyPg chameleon, mysql to postgresql replica made easy
Pg chameleon, mysql to postgresql replica made easy
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & Optimization
 
High-level architecture of a complete MariaDB deployment
High-level architecture of a complete MariaDB deploymentHigh-level architecture of a complete MariaDB deployment
High-level architecture of a complete MariaDB deployment
 
Zero Downtime JEE Architectures
Zero Downtime JEE ArchitecturesZero Downtime JEE Architectures
Zero Downtime JEE Architectures
 
MySQL's NoSQL -- SCaLE 13x Feb. 20, 2015
MySQL's NoSQL -- SCaLE 13x Feb. 20, 2015MySQL's NoSQL -- SCaLE 13x Feb. 20, 2015
MySQL's NoSQL -- SCaLE 13x Feb. 20, 2015
 
Optimizing Linux Servers
Optimizing Linux ServersOptimizing Linux Servers
Optimizing Linux Servers
 
MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014) MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014)
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialThe Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
 

More from Vivek Parihar

A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyA Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
Vivek Parihar
 
Programming languages and concepts by vivek parihar
Programming languages and concepts by vivek pariharProgramming languages and concepts by vivek parihar
Programming languages and concepts by vivek parihar
Vivek Parihar
 
Case Study to build a tablet based app that is a shopping assistant.
Case Study to build a tablet based app that is a shopping assistant.Case Study to build a tablet based app that is a shopping assistant.
Case Study to build a tablet based app that is a shopping assistant.
Vivek Parihar
 
Too much into acquisition without fixing retention problem: Let's Re-prioriti...
Too much into acquisition without fixing retention problem: Let's Re-prioriti...Too much into acquisition without fixing retention problem: Let's Re-prioriti...
Too much into acquisition without fixing retention problem: Let's Re-prioriti...
Vivek Parihar
 
Devops for beginners
Devops for beginnersDevops for beginners
Devops for beginners
Vivek Parihar
 
How fast can you onboard a new team member with VAGRANT ?
How fast can you onboard a new team member with VAGRANT ?How fast can you onboard a new team member with VAGRANT ?
How fast can you onboard a new team member with VAGRANT ?
Vivek Parihar
 
Centralized logging system using mongoDB
Centralized logging system using mongoDBCentralized logging system using mongoDB
Centralized logging system using mongoDB
Vivek Parihar
 
Mobile First Approach - The key to cross platform interface design
Mobile First Approach - The key to cross platform interface designMobile First Approach - The key to cross platform interface design
Mobile First Approach - The key to cross platform interface design
Vivek Parihar
 
10 Deployments a day - A brief on extreme release protocols
10 Deployments a day - A brief on extreme release protocols10 Deployments a day - A brief on extreme release protocols
10 Deployments a day - A brief on extreme release protocols
Vivek Parihar
 
Cloud foundry presentation
Cloud foundry presentation Cloud foundry presentation
Cloud foundry presentation
Vivek Parihar
 
Hu mongous db v2
Hu mongous db v2Hu mongous db v2
Hu mongous db v2
Vivek Parihar
 

More from Vivek Parihar (11)

A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching StrategyA Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
 
Programming languages and concepts by vivek parihar
Programming languages and concepts by vivek pariharProgramming languages and concepts by vivek parihar
Programming languages and concepts by vivek parihar
 
Case Study to build a tablet based app that is a shopping assistant.
Case Study to build a tablet based app that is a shopping assistant.Case Study to build a tablet based app that is a shopping assistant.
Case Study to build a tablet based app that is a shopping assistant.
 
Too much into acquisition without fixing retention problem: Let's Re-prioriti...
Too much into acquisition without fixing retention problem: Let's Re-prioriti...Too much into acquisition without fixing retention problem: Let's Re-prioriti...
Too much into acquisition without fixing retention problem: Let's Re-prioriti...
 
Devops for beginners
Devops for beginnersDevops for beginners
Devops for beginners
 
How fast can you onboard a new team member with VAGRANT ?
How fast can you onboard a new team member with VAGRANT ?How fast can you onboard a new team member with VAGRANT ?
How fast can you onboard a new team member with VAGRANT ?
 
Centralized logging system using mongoDB
Centralized logging system using mongoDBCentralized logging system using mongoDB
Centralized logging system using mongoDB
 
Mobile First Approach - The key to cross platform interface design
Mobile First Approach - The key to cross platform interface designMobile First Approach - The key to cross platform interface design
Mobile First Approach - The key to cross platform interface design
 
10 Deployments a day - A brief on extreme release protocols
10 Deployments a day - A brief on extreme release protocols10 Deployments a day - A brief on extreme release protocols
10 Deployments a day - A brief on extreme release protocols
 
Cloud foundry presentation
Cloud foundry presentation Cloud foundry presentation
Cloud foundry presentation
 
Hu mongous db v2
Hu mongous db v2Hu mongous db v2
Hu mongous db v2
 

Recently uploaded

20240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 202420240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 2024
Matthew Sinclair
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
Mark Billinghurst
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
ishalveerrandhawa1
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
Enterprise Wired
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Bert Blevins
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
Awais Yaseen
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
BookNet Canada
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
Emerging Tech
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
Bert Blevins
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
ScyllaDB
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
Matthew Sinclair
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
Toru Tamaki
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
UiPathCommunity
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
Aurora Consulting
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
Stephanie Beckett
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Erasmo Purificato
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
Andrey Yasko
 
Manual | Product | Research Presentation
Manual | Product | Research PresentationManual | Product | Research Presentation
Manual | Product | Research Presentation
welrejdoall
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
BookNet Canada
 

Recently uploaded (20)

20240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 202420240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 2024
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
 
Manual | Product | Research Presentation
Manual | Product | Research PresentationManual | Product | Research Presentation
Manual | Product | Research Presentation
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
 

MongoDb scalability and high availability with Replica-Set

  • 1. @vparihar Scalability and High Availability with ReplicaSet Vivek Parihar AVP Engineering,Weboinse Lab
  • 2. Who Am I? ● ● ● ● ● ● A Weboniser and Rubyist Blogger(vparihar01.github.com) MongoDb user Geek DevOps Mainly write Ruby, but have great passion for Javascript and Cloud Platforms ● ...
  • 3. Agenda ● ● ● ● ● ● ● {10: Reasons, To: Love } Scalability with What is Sharding? What is Replica Set? Replication Process Advantaged of Replica Set vs Master/Slave How to set up replica set on production
  • 4. {10: Reasons , To: Love I.RELATIVELY EASY TO SETUP In simple 3 steps MongoDb is start running on your machine Step-1. sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 Step-2. sudo apt-get install mongodb-10gen Step-3. sudo /etc/init.d/mongodb start }
  • 5. {10: Reasons , To: Love } II.It’s fast On average 7 times faster
  • 6. {10: Reasons , To: Love III. Easy Scalability { Does Anyone know about scaling MySql? } }
  • 7. {10: Reasons , To: Love IV. High Availability }
  • 8. {10: Reasons , To: Love V. High Performance }
  • 9. {10: Reasons , To: Love VI. Flexible Schema {no schema: no problem} }
  • 10. {10: Reasons , To: Love MongoDb} VII. Built in Sharding and Replication
  • 11. {10: Reasons , To: Love } VIII. Courses are excellent to start working as a developer/DBA with.
  • 12. {10: Reasons , To: Love } IX. Deploy New Instances on Demand
  • 13. {10: Reasons , To: Love } X. BASE Rather Than ACID ACID BASE Atomicity Basically Available Consistency Soft State Isolation Eventual Consistency Durable
  • 14. Horizontal Scaling Vs Vertical Scaling
  • 15. Scalability with ● ● ● ● ● ● Horizontal Scaling Auto-Sharding Vertical Scaling Replica Set Performance {For: Read, For: Write} Storage
  • 16. Horizontal Scaling ● By adding more machines into the existing pool. ● In a database world horizontal-scaling is often based on partitioning of the data i.e. each node contains only part of the data. ● MongoDB achieves this through auto-sharding.
  • 17. Vertical Scaling ● Typically refers to adding more processors ,ram and storage to a Symmetric Multiple Processing to extend processing capability. ● In a database world vertical-scaling is done through multi-core i.e. spreading the load between the CPU and RAM resources of that machine.
  • 19. What is Sharding? ● Sharding is a method for storing data across multiple machines. ● Also known as Horizontal Scaling ● Divides the data set and distributes the data over multiple servers, or shards.
  • 20. What is Sharding? Each shard is an independent database, and collectively, the shards make up a single logical database.
  • 21. Sharding offerings: ● Automatic balancing for changes in load and data distribution ● Easy addition of new machines ● Scaling out to one thousand nodes ● No single points of failure ● Automatic failover
  • 22. What is Replication? ● Replication is the process of synchronizing data across multiple servers. ● Mongo achieves Replication through Replica Sets ● Replica sets are a form of asynchronous master/slave replication ● A replica set consists of two or more nodes that are copies of each other. (i.e.: replicas)
  • 23. Purpose of Replication Data Redundancy ● Replica sets provide an automated method for storing multiple copies of your data.
  • 24. Purpose of Replication Automated Failover / High Avalability ● If primary fails then replica set will attempt to select another member to become the new primary. ● This means that the failure of a primary can be handled by the client without any configuration changes ● Use heartbeat signal to detect failure
  • 25. Purpose of Replication ● Distributed Read Load/Read Scaling By default, the primary node of a replica set is accessed for all reads and writes. ● Disaster Recovery Replica sets allows for a “delayed secondary” node. This node can provide a window for recovering from disastrous events such as: ○ bad deployments ○ dropped tables and collections
  • 26. Replication Process ● Members of a replica set replicate data continuously ● MongoDB applies database operations on the primary and then records the operations on the primary’s oplog. ● All replica set members contain a copy of the oplog, allowing them to maintain the current state of the database.
  • 27. Advantages of Replica Set vs Master/Slave ● Replica sets are basically just master-slave with automatic failover. ● So, you have a pool of servers with one primary (the master) and N secondaries (slaves). If the primary crashes or disappears, the other servers will hold an election to choose a new primary.
  • 28. Demo -: How to set up replica set on Production! Click on below link to see the demo-: http://youtu.be/BFSGcBHcirU
  • 29. Thanks Would Love to answer your queries... Vivek Parihar @vparihar