SlideShare a Scribd company logo
1 of 35
Download to read offline
Evolution of MongoDB Replica Set
and Its Best Practices
Manosh Malai
CTO, Mydbops
28Th August 2021
Mydbops 8th Webinar
Interested in Open Source technologies
Interested in MongoDB, DevOps & DevOpSec Practices
Tech Speaker/Blogger 
CTO, Mydbops IT Solution
Manosh Malai 
About Me
Consulting
Services
Managed
Services
Focuses on MySQL, MongoDB and PostgreSQL
Mydbops Services
500 + Clients In 5 Yrs. of Operations
Our Clients
MongoDB Evolution and Its Exciting Features 4.0 to 5.0
MongoDB Replica Set Implementation Best Practices
Introduction
Agenda
INTRODUCTION
Scaling MongoDB
MongoDB is designed to effectienly handle large dataset through vertical and horizontal scaling 
Additional node to share the load, MongoDB achieved  primarily through Sharding
Vertical scaling refers to the use of CPU, RAM, and I/O to increase the processing capability of a single
server or cluster(Replica Set).
Is MongoDB fit for large data
Horizontal Scaling
Vertical Scaling
Vertical and Horizontal Scaling
Vertical Scaling
Horizontal  Scaling
MONGODB REPLICATION AND IT'S BEST PRACTICES
Asynchronous Replication
WRITE
PRIMARY
REPL-WRITE
REPL-WRITE
SECONDARY
SECONDARY
Automatic Failover
PRIMARY
SECONDARY
SECONDARY
Heartbeat
SECONDARY
Heartbeat
PRIMARY
REPL
electionTimeoutMillis 10 Sec(Default) + 2 sec to select New Primary = 12 Sec Median to elect New Primary
Odd Number Of Replica Member
50 Members Max 7 Members Only can Vote Members count always Odd
Cont...
Number of Voting Member Majority  Numberof Tolerable Failure
1 1 0
2 2 0
3 2 1
 4 3  1
 5  3  2
 6  4 2
7 4 3
Even Node:
(N/2)+1 = Majority Node
Odd Node:
(N+1)/2 = Majority Node
6/2+1 = 4
7+1/2 = 4
Number Of Members Alive Majority = Cannot Elect Primary And Write Fail
READ And WRITE Replica Settings
Read Preference
• Primary
• Primary Preferred
• Secondary
• Secondary Preferred
• Nearest
Write Preference
• w: majority
• w: <N>
• j: true
Secondary Member Type
Type Read Accept Vote Become Primary
Priority 0 Yes Yes No
Hidden No Yes No
Delay No Yes No
Arbiter No Yes No
Replica Set Best Practices
db.collection.find().readPref('nearest', [ { 'dc': 'east' } ])
▪ Use hostnames when configuring replica set members rather than IP-addresses
▪ Ensure that the replica set has an odd number of voting members
▪ Oplog Recovery Window need to maintain minimum 24 hours
▪ 3 type of connection URI
▪ Consistency Read: primary
▪ Eventually Consistent: SecondaryPreferred, maxStalnessSeconds
▪ write Concern w: 1
▪ Nearest read preference , tag set and maxStalnessSeconds read setting need use in Geographically
Distributed Members
Replica Set Best Practices - 2
▪ Use x.509 Certificate for Membership Authentication
security:
clusterAuthMode: x509
net:
tls:
mode: requireTLS
certificateKeyFile: <path to its TLS/SSL certificate and key file>
CAFile: <path to root CA PEM file to verify received certificate>
clusterFile: <path to its certificate key file for membership authentication>
bindIp: localhost,<hostname(s)|ip address(es)>
Replica Set Best Practices - 3
• Enable Authorization
• Create different role for Database Administration, Operation and Admin
OPS User DBA User Super User
List Database (show dbs) List Database (show dbs) ALL ACCESS(root)
List collections (show collections) except
admin,local,config database.
List collections (show collections) except
admin,local,config database.


Read collection data (db.coll.find()) Read collection data (db.coll.find()) 

Able to check collection stats (db.coll.stats()) Able to check collection stats (db.coll.stats()) 

Able to check db stats (db.stats()) Able to check db stats (db.stats()) 

Able to create Index Able to create Index 

Able to see the current running queries (db.currentOp()) Able to see the current running queries (db.currentOp()) 

Able to kill the queries Able to kill the queries 

Able to see the replication status  Able to see the replication status  

Able to see the list of users Able to see the list of users 

Able to see the inherited privileges of each role Able to see the inherited privileges of each role 

Able to rotate the log file Able to rotate the log file 

Able to drop Index 

Able to shutdown mongo 

Able to Lock writes 

Able to configure the replica set 

Able to change the replica set IP 

Able to run compaction against collection
Replica Set Best Practices - 4
▪ Mongod services should run in a non-privileged account with nologin/false shell.
▪ DO NOT Allow MongoDB to talk to the internet at all costs
▪ Configure security groups to block outbound connections to internet(Network Level)
▪ Configure IPTABLES/UFW to block/control outbound traffic(Instance Level)
▪ use the XFS filesystem
▪ Turn off atime for the storage volume with the database files
▪ <MongoDB Data Partition> xfs rw,noatime,attr2,inode64,noquota 0 0
▪ Do not use huge pages virtual memory pages, MongoDB performs better with normal virtual memory pages.
▪ $ echo "never" > /sys/kernel/mm/transparent_hugepage/enabled
▪ $ echo "never" > /sys/kernel/mm/transparent_hugepage/defrag
Replica Set Best Practices - 5
	 	 	
▪ Disable NUMA in your BIOS or invoke mongod with NUMA disabled.
▪ Edit /etc/systemd/system/multi-user.target.wants/mongod.service
▪ ExecStart=/usr/bin/numactl --interleave=all /usr/bin/mongod --config /etc/mongod.conf
▪ Ensure that readahead settings for the block devices that store the database files are relatively small as
most access is non-sequential. For example, setting readahead to 32 (16KB) is a good starting point.
▪ ulimit to apply these settings:
	 	 	 -f(filesize):unlimited
	 	 	 -t(cputime):unlimited
	 	 	 -v(virtualmemory):unlimited • -n(openfiles):64000
	 	 	 -m(memorysize):unlimited
	 	 	 -u(processes/threads):32000
Replica Set Best Practices - 6
net.core.somaxconn = 4096
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_keepalive_time = 120
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.tcp_keepalive_probes = 6
• Network Stack Tuning
• Dirty Ratio
vm.dirty_ratio = 15
vm.dirty_background_ratio = 5
MONGODB EVOLUTION AND ITS RECENT EXCITING
FEATURES
Evolution of MongoDB Replica Set
Resumable Initial Sync - From MongoDB 4.4
PRIMARY SECONDARY
▪ Initial Sync can attempt to resume the sync process if interrupted by a
• network error
• collection drop
• collection rename
• The Secondary tries to resume initial sync for 24 hours (Default)
• db.adminCommand( { setParameter: 1, initialSyncTransientErrorRetryPeriodSeconds: <value> } )
Resumable Initial Sync Monitoring - From MongoDB 4.4
Streaming Replication - From MongoDB 4.4
Streaming Replication - From MongoDB 4.4
Before 4.4:
• Single OplogFetcher thread actively send getMore command to the Primary Oplog Collection
• If there is data, a batch of upto 16MB is returned
• Each batch acquisition needs to go through a complete network RTT
• In the case of a bad replica set network, the performance of replica is severely limited by network
latency
From 4.4:
• Incremental Oplog is constantly flowing into the secondary node,
instead of relying on the active poll by the Secondary node
• Compared with the previous method, at least half of the RTT is saved
in the Oplog sync process.
• The majority write performance increases by 50% on average
db.adminCommand( { setParameter: 1, initialSyncTransientErrorRetryPeriodSeconds: <value> } ) True/False
Minimum Oplog Retention Period - From MongoDB 4.4
• { replSetResizeOplog: <boolean>, size: <num MB> }
• db.adminCommand({replSetResizeOplog:1, size: 16384})
• db.getSiblingDB("local").oplog.rs.stats(1024*1024).maxSize
3.6
• db.adminCommand({replSetResizeOplog: <int>, size: <double>,
minRetentionHours: <double>})
• db.adminCommand({replSetResizeOplog: 1, size: 20000, minRetentionHours: 1.5})
• db.getSiblingDB("local").oplog.rs.stats(1024*1024).maxSize
• db.getSiblingDB("admin").serverStatus().oplogTruncation.minRetentionHours
4.4
Minimum Oplog Retention Period - From MongoDB 4.4
• In a longer retention time configured scenario, Because of a combination of high write volume,
The oplog may grow beyond its maximum size to keep the Oplog entires.
• From MongoDB 4.0 onward, MongoDB forbids you from dropping the local.oplog.rs collection
• We can specify a size of 990 megabytes to 1 petabyte.
• Reducing the oplog size does not automatically reclaim disk space. Compact must be performed
on the local database's oplog.rs collection.
Mirrored Reads - From MongoDB 4.4
• The Primary node will copy the read traffic to the one secondary node at a certain ratio
• This helps to warm up the secondary node cache that is very similar to the Primary server cache
• When primary server node went down, the mirrored Secondary node take responsibility and
serve the traffic
• This feature helps reduce the "Cache Miss" and disk load. And it keeps the same query
performance all along as the previous primary.
• The mirrored reads are "fire-and-forget" operations by the primary; i.e., the primary does not
await the response for the mirrored reads.
• Electable <members[n].priority> secondary replica set member receive mirrored read
• A sampling rate of "0.0" disables mirrored reads.
• A sampling rate of a number between "0.0" and "1.0"
• sampling rate of "1.0" results in the primary forwarding all
Mirrored Reads - From MongoDB 4.4
• db.adminCommand( { setParameter: 1, mirrorReads: { samplingRate: 0.10 } } )
• db.runCommand( { serverStatus: 1, mirroredReads: 1 } )
• Mirrored reads support the following operations:
• Count
• Distinct
• Find
• findAndModify (Specifically, the filter is sent as a mirrored read)
• update (Specifically, the filter is sent as a mirrored read)
Simultaneous Indexing - From MongoDB 4.4
• Before version 4.4, the index creation must be copied to the Secondary node to run once the primary node is
complete
• From 4.4, Indexes Build Simultaneously on Data-Bearing Replica Set Members
• Index build process
"startIndexBuild" oplog
entry
commitIndexBuild
abortIndexBuild
Primary check for Quorum Vote and any
key constraint violations
CreateIndex Command
Each Member Vote
commit for its
finished index
Secondary
"startIndexBuild"
Simultaneous Indexing - From MongoDB 4.4
Index Creation Command:
db.getSiblingDB("examples").invoices.createIndexes(
[
{ "invoices" : 1 },
{ "fulfillmentStatus" : 1 }
]
)
Setting Index Commit Quorum:
db.getSiblingDB("examples").runCommand(
{
"setIndexCommitQuorum" : "invoices",
"indexNames" : ["invoices_1", "fullfillmentStatus_1"],
"commitQuorum" : "majority"
}
)
• By default, index builds use "votingMembers" commit quorum, or all data-bearing voting replica set
members
• Do not use killOp to terminate an in-progress index builds in replica sets or sharded clusters
• Starting from 4.2 db.pets.dropIndex( "catIdx" ) to drop Index
• Run dropIndexes on the primary, it creates an associated "abortIndexBuild" oplog entry
Reach Us : Info@mydbops.com
Thank You
Reference
https://mydbops.wordpress.com/2020/05/02/securing-mongodb-cluster-with-tls-ssl/
https://mydbops.wordpress.com/2019/11/20/closer-view-of-mongodb-replica-sets/
https://www.alexbevi.com/blog/2020/11/20/mongodb-5-dot-0-startup2-progress-monitoring-improvements/
https://alibaba-cloud.medium.com/how-to-create-highly-available-mongodb-databases-with-replica-sets-
d4c4dde9bf2
https://stackoverflow.com/questions/59471864/why-an-odd-number-of-members-in-a-replica-set
https://github.com/mongodb/docs/blob/master/source/replication.txt

More Related Content

What's hot

MySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software TestMySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software TestI Goo Lee
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performancePostgreSQL-Consulting
 
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group ReplicationPercona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group ReplicationKenny Gryp
 
MyRocks introduction and production deployment
MyRocks introduction and production deploymentMyRocks introduction and production deployment
MyRocks introduction and production deploymentYoshinori Matsunobu
 
State transfer With Galera
State transfer With GaleraState transfer With Galera
State transfer With GaleraMydbops
 
Parallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDBParallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDBMydbops
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB plc
 
Percona XtraDB Cluster ( Ensure high Availability )
Percona XtraDB Cluster ( Ensure high Availability )Percona XtraDB Cluster ( Ensure high Availability )
Percona XtraDB Cluster ( Ensure high Availability )Mydbops
 
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison Severalnines
 
M|18 Deep Dive: InnoDB Transactions and Write Paths
M|18 Deep Dive: InnoDB Transactions and Write PathsM|18 Deep Dive: InnoDB Transactions and Write Paths
M|18 Deep Dive: InnoDB Transactions and Write PathsMariaDB plc
 
Transparent Hugepages in RHEL 6
Transparent Hugepages in RHEL 6 Transparent Hugepages in RHEL 6
Transparent Hugepages in RHEL 6 Raghu Udiyar
 
Replication Troubleshooting in Classic VS GTID
Replication Troubleshooting in Classic VS GTIDReplication Troubleshooting in Classic VS GTID
Replication Troubleshooting in Classic VS GTIDMydbops
 
Mvcc in postgreSQL 권건우
Mvcc in postgreSQL 권건우Mvcc in postgreSQL 권건우
Mvcc in postgreSQL 권건우PgDay.Seoul
 
mysql 8.0 architecture and enhancement
mysql 8.0 architecture and enhancementmysql 8.0 architecture and enhancement
mysql 8.0 architecture and enhancementlalit choudhary
 
MySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxMySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxNeoClova
 
MySQL GTID 시작하기
MySQL GTID 시작하기MySQL GTID 시작하기
MySQL GTID 시작하기I Goo Lee
 
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)Aurimas Mikalauskas
 
Using ZFS file system with MySQL
Using ZFS file system with MySQLUsing ZFS file system with MySQL
Using ZFS file system with MySQLMydbops
 
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Mydbops
 

What's hot (20)

MySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software TestMySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software Test
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performance
 
Deep Dive on Amazon Aurora
Deep Dive on Amazon AuroraDeep Dive on Amazon Aurora
Deep Dive on Amazon Aurora
 
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group ReplicationPercona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
Percona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication
 
MyRocks introduction and production deployment
MyRocks introduction and production deploymentMyRocks introduction and production deployment
MyRocks introduction and production deployment
 
State transfer With Galera
State transfer With GaleraState transfer With Galera
State transfer With Galera
 
Parallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDBParallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDB
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & Optimization
 
Percona XtraDB Cluster ( Ensure high Availability )
Percona XtraDB Cluster ( Ensure high Availability )Percona XtraDB Cluster ( Ensure high Availability )
Percona XtraDB Cluster ( Ensure high Availability )
 
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
 
M|18 Deep Dive: InnoDB Transactions and Write Paths
M|18 Deep Dive: InnoDB Transactions and Write PathsM|18 Deep Dive: InnoDB Transactions and Write Paths
M|18 Deep Dive: InnoDB Transactions and Write Paths
 
Transparent Hugepages in RHEL 6
Transparent Hugepages in RHEL 6 Transparent Hugepages in RHEL 6
Transparent Hugepages in RHEL 6
 
Replication Troubleshooting in Classic VS GTID
Replication Troubleshooting in Classic VS GTIDReplication Troubleshooting in Classic VS GTID
Replication Troubleshooting in Classic VS GTID
 
Mvcc in postgreSQL 권건우
Mvcc in postgreSQL 권건우Mvcc in postgreSQL 권건우
Mvcc in postgreSQL 권건우
 
mysql 8.0 architecture and enhancement
mysql 8.0 architecture and enhancementmysql 8.0 architecture and enhancement
mysql 8.0 architecture and enhancement
 
MySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxMySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptx
 
MySQL GTID 시작하기
MySQL GTID 시작하기MySQL GTID 시작하기
MySQL GTID 시작하기
 
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
 
Using ZFS file system with MySQL
Using ZFS file system with MySQLUsing ZFS file system with MySQL
Using ZFS file system with MySQL
 
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
 

Similar to Evolution of MongoDB Replicaset and Its Best Practices

Evolution Of MongoDB Replicaset
Evolution Of MongoDB ReplicasetEvolution Of MongoDB Replicaset
Evolution Of MongoDB ReplicasetM Malai
 
Exploring the replication in MongoDB
Exploring the replication in MongoDBExploring the replication in MongoDB
Exploring the replication in MongoDBIgor Donchovski
 
Replication and replica sets
Replication and replica setsReplication and replica sets
Replication and replica setsChris Westin
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014Ryusuke Kajiyama
 
MongoDB: How We Did It – Reanimating Identity at AOL
MongoDB: How We Did It – Reanimating Identity at AOLMongoDB: How We Did It – Reanimating Identity at AOL
MongoDB: How We Did It – Reanimating Identity at AOLMongoDB
 
MongoDB at MapMyFitness
MongoDB at MapMyFitnessMongoDB at MapMyFitness
MongoDB at MapMyFitnessMapMyFitness
 
Back to Basics: Build Something Big With MongoDB
Back to Basics: Build Something Big With MongoDB Back to Basics: Build Something Big With MongoDB
Back to Basics: Build Something Big With MongoDB MongoDB
 
MongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-SetMongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-SetVivek Parihar
 
Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)MongoDB
 
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 DatabaseFITC
 
Deployment Strategy
Deployment StrategyDeployment Strategy
Deployment StrategyMongoDB
 
MySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMorgan Tocker
 
The Care + Feeding of a Mongodb Cluster
The Care + Feeding of a Mongodb ClusterThe Care + Feeding of a Mongodb Cluster
The Care + Feeding of a Mongodb ClusterChris Henry
 
Scale your Alfresco Solutions
Scale your Alfresco Solutions Scale your Alfresco Solutions
Scale your Alfresco Solutions Alfresco Software
 
MongoDB at MapMyFitness from a DevOps Perspective
MongoDB at MapMyFitness from a DevOps PerspectiveMongoDB at MapMyFitness from a DevOps Perspective
MongoDB at MapMyFitness from a DevOps PerspectiveMongoDB
 
Back to Basics Webinar 6: Production Deployment
Back to Basics Webinar 6: Production DeploymentBack to Basics Webinar 6: Production Deployment
Back to Basics Webinar 6: Production DeploymentMongoDB
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetAchieve Internet
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetAchieve Internet
 

Similar to Evolution of MongoDB Replicaset and Its Best Practices (20)

Evolution Of MongoDB Replicaset
Evolution Of MongoDB ReplicasetEvolution Of MongoDB Replicaset
Evolution Of MongoDB Replicaset
 
Exploring the replication in MongoDB
Exploring the replication in MongoDBExploring the replication in MongoDB
Exploring the replication in MongoDB
 
Replication and replica sets
Replication and replica setsReplication and replica sets
Replication and replica sets
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014
 
Tuning Linux for MongoDB
Tuning Linux for MongoDBTuning Linux for MongoDB
Tuning Linux for MongoDB
 
Mongo DB
Mongo DBMongo DB
Mongo DB
 
MongoDB: How We Did It – Reanimating Identity at AOL
MongoDB: How We Did It – Reanimating Identity at AOLMongoDB: How We Did It – Reanimating Identity at AOL
MongoDB: How We Did It – Reanimating Identity at AOL
 
MongoDB at MapMyFitness
MongoDB at MapMyFitnessMongoDB at MapMyFitness
MongoDB at MapMyFitness
 
Back to Basics: Build Something Big With MongoDB
Back to Basics: Build Something Big With MongoDB Back to Basics: Build Something Big With MongoDB
Back to Basics: Build Something Big With MongoDB
 
MongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-SetMongoDb scalability and high availability with Replica-Set
MongoDb scalability and high availability with Replica-Set
 
Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)
 
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
 
Deployment Strategy
Deployment StrategyDeployment Strategy
Deployment Strategy
 
MySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMySQL Performance Metrics that Matter
MySQL Performance Metrics that Matter
 
The Care + Feeding of a Mongodb Cluster
The Care + Feeding of a Mongodb ClusterThe Care + Feeding of a Mongodb Cluster
The Care + Feeding of a Mongodb Cluster
 
Scale your Alfresco Solutions
Scale your Alfresco Solutions Scale your Alfresco Solutions
Scale your Alfresco Solutions
 
MongoDB at MapMyFitness from a DevOps Perspective
MongoDB at MapMyFitness from a DevOps PerspectiveMongoDB at MapMyFitness from a DevOps Perspective
MongoDB at MapMyFitness from a DevOps Perspective
 
Back to Basics Webinar 6: Production Deployment
Back to Basics Webinar 6: Production DeploymentBack to Basics Webinar 6: Production Deployment
Back to Basics Webinar 6: Production Deployment
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve Internet
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve Internet
 

More from Mydbops

Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024Mydbops
 
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...Mydbops
 
Mastering Aurora PostgreSQL Clusters for Disaster Recovery
Mastering Aurora PostgreSQL Clusters for Disaster RecoveryMastering Aurora PostgreSQL Clusters for Disaster Recovery
Mastering Aurora PostgreSQL Clusters for Disaster RecoveryMydbops
 
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...Mydbops
 
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15Mydbops
 
Data-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE Event
Data-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE EventData-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE Event
Data-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE EventMydbops
 
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...Mydbops
 
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...Mydbops
 
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...Mydbops
 
Data Organisation: Table Partitioning in PostgreSQL
Data Organisation: Table Partitioning in PostgreSQLData Organisation: Table Partitioning in PostgreSQL
Data Organisation: Table Partitioning in PostgreSQLMydbops
 
Navigating MongoDB's Queryable Encryption for Ultimate Security - Mydbops
Navigating MongoDB's Queryable Encryption for Ultimate Security - MydbopsNavigating MongoDB's Queryable Encryption for Ultimate Security - Mydbops
Navigating MongoDB's Queryable Encryption for Ultimate Security - MydbopsMydbops
 
Data High Availability With TIDB
Data High Availability With TIDBData High Availability With TIDB
Data High Availability With TIDBMydbops
 
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...Mydbops
 
Enhancing Security of MySQL Connections using SSL certificates
Enhancing Security of MySQL Connections using SSL certificatesEnhancing Security of MySQL Connections using SSL certificates
Enhancing Security of MySQL Connections using SSL certificatesMydbops
 
Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops Mydbops
 
Time series in MongoDB - Mydbops
Time series in MongoDB - Mydbops Time series in MongoDB - Mydbops
Time series in MongoDB - Mydbops Mydbops
 
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - Mydbops
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - MydbopsTiDB in a Nutshell - Power of Open-Source Distributed SQL Database - Mydbops
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - MydbopsMydbops
 
Achieving High Availability in PostgreSQL
Achieving High Availability in PostgreSQLAchieving High Availability in PostgreSQL
Achieving High Availability in PostgreSQLMydbops
 
Scaling MongoDB with Horizontal and Vertical Sharding
Scaling MongoDB with Horizontal and Vertical Sharding Scaling MongoDB with Horizontal and Vertical Sharding
Scaling MongoDB with Horizontal and Vertical Sharding Mydbops
 

More from Mydbops (20)

Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
 
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
 
Mastering Aurora PostgreSQL Clusters for Disaster Recovery
Mastering Aurora PostgreSQL Clusters for Disaster RecoveryMastering Aurora PostgreSQL Clusters for Disaster Recovery
Mastering Aurora PostgreSQL Clusters for Disaster Recovery
 
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
 
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15
 
Data-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE Event
Data-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE EventData-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE Event
Data-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE Event
 
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...
 
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...
 
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...
 
Data Organisation: Table Partitioning in PostgreSQL
Data Organisation: Table Partitioning in PostgreSQLData Organisation: Table Partitioning in PostgreSQL
Data Organisation: Table Partitioning in PostgreSQL
 
Navigating MongoDB's Queryable Encryption for Ultimate Security - Mydbops
Navigating MongoDB's Queryable Encryption for Ultimate Security - MydbopsNavigating MongoDB's Queryable Encryption for Ultimate Security - Mydbops
Navigating MongoDB's Queryable Encryption for Ultimate Security - Mydbops
 
Data High Availability With TIDB
Data High Availability With TIDBData High Availability With TIDB
Data High Availability With TIDB
 
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...
 
Enhancing Security of MySQL Connections using SSL certificates
Enhancing Security of MySQL Connections using SSL certificatesEnhancing Security of MySQL Connections using SSL certificates
Enhancing Security of MySQL Connections using SSL certificates
 
Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops
 
Time series in MongoDB - Mydbops
Time series in MongoDB - Mydbops Time series in MongoDB - Mydbops
Time series in MongoDB - Mydbops
 
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - Mydbops
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - MydbopsTiDB in a Nutshell - Power of Open-Source Distributed SQL Database - Mydbops
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - Mydbops
 
Achieving High Availability in PostgreSQL
Achieving High Availability in PostgreSQLAchieving High Availability in PostgreSQL
Achieving High Availability in PostgreSQL
 
Scaling MongoDB with Horizontal and Vertical Sharding
Scaling MongoDB with Horizontal and Vertical Sharding Scaling MongoDB with Horizontal and Vertical Sharding
Scaling MongoDB with Horizontal and Vertical Sharding
 

Recently uploaded

signals in triangulation .. ...Surveying
signals in triangulation .. ...Surveyingsignals in triangulation .. ...Surveying
signals in triangulation .. ...Surveyingsapna80328
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfChristianCDAM
 
List of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfList of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfisabel213075
 
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdfDEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdfAkritiPradhan2
 
Python Programming for basic beginners.pptx
Python Programming for basic beginners.pptxPython Programming for basic beginners.pptx
Python Programming for basic beginners.pptxmohitesoham12
 
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptJohnWilliam111370
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
OOP concepts -in-Python programming language
OOP concepts -in-Python programming languageOOP concepts -in-Python programming language
OOP concepts -in-Python programming languageSmritiSharma901052
 
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfDrew Moseley
 
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfComprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfalene1
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Coursebim.edu.pl
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithmComputer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithmDeepika Walanjkar
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Communityprachaibot
 
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...Stork
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.elesangwon
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communicationpanditadesh123
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingBootNeck1
 

Recently uploaded (20)

signals in triangulation .. ...Surveying
signals in triangulation .. ...Surveyingsignals in triangulation .. ...Surveying
signals in triangulation .. ...Surveying
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdf
 
List of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfList of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdf
 
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdfDEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
 
Designing pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptxDesigning pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptx
 
Python Programming for basic beginners.pptx
Python Programming for basic beginners.pptxPython Programming for basic beginners.pptx
Python Programming for basic beginners.pptx
 
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
OOP concepts -in-Python programming language
OOP concepts -in-Python programming languageOOP concepts -in-Python programming language
OOP concepts -in-Python programming language
 
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdf
 
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfComprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Course
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithmComputer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Community
 
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communication
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
 

Evolution of MongoDB Replicaset and Its Best Practices

  • 1. Evolution of MongoDB Replica Set and Its Best Practices Manosh Malai CTO, Mydbops 28Th August 2021 Mydbops 8th Webinar
  • 2. Interested in Open Source technologies Interested in MongoDB, DevOps & DevOpSec Practices Tech Speaker/Blogger  CTO, Mydbops IT Solution Manosh Malai  About Me
  • 3. Consulting Services Managed Services Focuses on MySQL, MongoDB and PostgreSQL Mydbops Services
  • 4. 500 + Clients In 5 Yrs. of Operations Our Clients
  • 5. MongoDB Evolution and Its Exciting Features 4.0 to 5.0 MongoDB Replica Set Implementation Best Practices Introduction Agenda
  • 7. Scaling MongoDB MongoDB is designed to effectienly handle large dataset through vertical and horizontal scaling  Additional node to share the load, MongoDB achieved  primarily through Sharding Vertical scaling refers to the use of CPU, RAM, and I/O to increase the processing capability of a single server or cluster(Replica Set). Is MongoDB fit for large data Horizontal Scaling Vertical Scaling
  • 8. Vertical and Horizontal Scaling Vertical Scaling Horizontal  Scaling
  • 9. MONGODB REPLICATION AND IT'S BEST PRACTICES
  • 11. Automatic Failover PRIMARY SECONDARY SECONDARY Heartbeat SECONDARY Heartbeat PRIMARY REPL electionTimeoutMillis 10 Sec(Default) + 2 sec to select New Primary = 12 Sec Median to elect New Primary
  • 12. Odd Number Of Replica Member 50 Members Max 7 Members Only can Vote Members count always Odd
  • 13. Cont... Number of Voting Member Majority  Numberof Tolerable Failure 1 1 0 2 2 0 3 2 1  4 3  1  5  3  2  6  4 2 7 4 3 Even Node: (N/2)+1 = Majority Node Odd Node: (N+1)/2 = Majority Node 6/2+1 = 4 7+1/2 = 4 Number Of Members Alive Majority = Cannot Elect Primary And Write Fail
  • 14. READ And WRITE Replica Settings Read Preference • Primary • Primary Preferred • Secondary • Secondary Preferred • Nearest Write Preference • w: majority • w: <N> • j: true
  • 15. Secondary Member Type Type Read Accept Vote Become Primary Priority 0 Yes Yes No Hidden No Yes No Delay No Yes No Arbiter No Yes No
  • 16. Replica Set Best Practices db.collection.find().readPref('nearest', [ { 'dc': 'east' } ]) ▪ Use hostnames when configuring replica set members rather than IP-addresses ▪ Ensure that the replica set has an odd number of voting members ▪ Oplog Recovery Window need to maintain minimum 24 hours ▪ 3 type of connection URI ▪ Consistency Read: primary ▪ Eventually Consistent: SecondaryPreferred, maxStalnessSeconds ▪ write Concern w: 1 ▪ Nearest read preference , tag set and maxStalnessSeconds read setting need use in Geographically Distributed Members
  • 17. Replica Set Best Practices - 2 ▪ Use x.509 Certificate for Membership Authentication security: clusterAuthMode: x509 net: tls: mode: requireTLS certificateKeyFile: <path to its TLS/SSL certificate and key file> CAFile: <path to root CA PEM file to verify received certificate> clusterFile: <path to its certificate key file for membership authentication> bindIp: localhost,<hostname(s)|ip address(es)>
  • 18. Replica Set Best Practices - 3 • Enable Authorization • Create different role for Database Administration, Operation and Admin OPS User DBA User Super User List Database (show dbs) List Database (show dbs) ALL ACCESS(root) List collections (show collections) except admin,local,config database. List collections (show collections) except admin,local,config database. Read collection data (db.coll.find()) Read collection data (db.coll.find()) Able to check collection stats (db.coll.stats()) Able to check collection stats (db.coll.stats()) Able to check db stats (db.stats()) Able to check db stats (db.stats()) Able to create Index Able to create Index Able to see the current running queries (db.currentOp()) Able to see the current running queries (db.currentOp()) Able to kill the queries Able to kill the queries Able to see the replication status  Able to see the replication status  Able to see the list of users Able to see the list of users Able to see the inherited privileges of each role Able to see the inherited privileges of each role Able to rotate the log file Able to rotate the log file Able to drop Index Able to shutdown mongo Able to Lock writes Able to configure the replica set Able to change the replica set IP Able to run compaction against collection
  • 19. Replica Set Best Practices - 4 ▪ Mongod services should run in a non-privileged account with nologin/false shell. ▪ DO NOT Allow MongoDB to talk to the internet at all costs ▪ Configure security groups to block outbound connections to internet(Network Level) ▪ Configure IPTABLES/UFW to block/control outbound traffic(Instance Level) ▪ use the XFS filesystem ▪ Turn off atime for the storage volume with the database files ▪ <MongoDB Data Partition> xfs rw,noatime,attr2,inode64,noquota 0 0 ▪ Do not use huge pages virtual memory pages, MongoDB performs better with normal virtual memory pages. ▪ $ echo "never" > /sys/kernel/mm/transparent_hugepage/enabled ▪ $ echo "never" > /sys/kernel/mm/transparent_hugepage/defrag
  • 20. Replica Set Best Practices - 5 ▪ Disable NUMA in your BIOS or invoke mongod with NUMA disabled. ▪ Edit /etc/systemd/system/multi-user.target.wants/mongod.service ▪ ExecStart=/usr/bin/numactl --interleave=all /usr/bin/mongod --config /etc/mongod.conf ▪ Ensure that readahead settings for the block devices that store the database files are relatively small as most access is non-sequential. For example, setting readahead to 32 (16KB) is a good starting point. ▪ ulimit to apply these settings: -f(filesize):unlimited -t(cputime):unlimited -v(virtualmemory):unlimited • -n(openfiles):64000 -m(memorysize):unlimited -u(processes/threads):32000
  • 21. Replica Set Best Practices - 6 net.core.somaxconn = 4096 net.ipv4.tcp_fin_timeout = 30 net.ipv4.tcp_keepalive_intvl = 30 net.ipv4.tcp_keepalive_time = 120 net.ipv4.tcp_max_syn_backlog = 4096 net.ipv4.tcp_keepalive_probes = 6 • Network Stack Tuning • Dirty Ratio vm.dirty_ratio = 15 vm.dirty_background_ratio = 5
  • 22. MONGODB EVOLUTION AND ITS RECENT EXCITING FEATURES
  • 23. Evolution of MongoDB Replica Set
  • 24. Resumable Initial Sync - From MongoDB 4.4 PRIMARY SECONDARY ▪ Initial Sync can attempt to resume the sync process if interrupted by a • network error • collection drop • collection rename • The Secondary tries to resume initial sync for 24 hours (Default) • db.adminCommand( { setParameter: 1, initialSyncTransientErrorRetryPeriodSeconds: <value> } )
  • 25. Resumable Initial Sync Monitoring - From MongoDB 4.4
  • 26. Streaming Replication - From MongoDB 4.4
  • 27. Streaming Replication - From MongoDB 4.4 Before 4.4: • Single OplogFetcher thread actively send getMore command to the Primary Oplog Collection • If there is data, a batch of upto 16MB is returned • Each batch acquisition needs to go through a complete network RTT • In the case of a bad replica set network, the performance of replica is severely limited by network latency From 4.4: • Incremental Oplog is constantly flowing into the secondary node, instead of relying on the active poll by the Secondary node • Compared with the previous method, at least half of the RTT is saved in the Oplog sync process. • The majority write performance increases by 50% on average db.adminCommand( { setParameter: 1, initialSyncTransientErrorRetryPeriodSeconds: <value> } ) True/False
  • 28. Minimum Oplog Retention Period - From MongoDB 4.4 • { replSetResizeOplog: <boolean>, size: <num MB> } • db.adminCommand({replSetResizeOplog:1, size: 16384}) • db.getSiblingDB("local").oplog.rs.stats(1024*1024).maxSize 3.6 • db.adminCommand({replSetResizeOplog: <int>, size: <double>, minRetentionHours: <double>}) • db.adminCommand({replSetResizeOplog: 1, size: 20000, minRetentionHours: 1.5}) • db.getSiblingDB("local").oplog.rs.stats(1024*1024).maxSize • db.getSiblingDB("admin").serverStatus().oplogTruncation.minRetentionHours 4.4
  • 29. Minimum Oplog Retention Period - From MongoDB 4.4 • In a longer retention time configured scenario, Because of a combination of high write volume, The oplog may grow beyond its maximum size to keep the Oplog entires. • From MongoDB 4.0 onward, MongoDB forbids you from dropping the local.oplog.rs collection • We can specify a size of 990 megabytes to 1 petabyte. • Reducing the oplog size does not automatically reclaim disk space. Compact must be performed on the local database's oplog.rs collection.
  • 30. Mirrored Reads - From MongoDB 4.4 • The Primary node will copy the read traffic to the one secondary node at a certain ratio • This helps to warm up the secondary node cache that is very similar to the Primary server cache • When primary server node went down, the mirrored Secondary node take responsibility and serve the traffic • This feature helps reduce the "Cache Miss" and disk load. And it keeps the same query performance all along as the previous primary. • The mirrored reads are "fire-and-forget" operations by the primary; i.e., the primary does not await the response for the mirrored reads. • Electable <members[n].priority> secondary replica set member receive mirrored read • A sampling rate of "0.0" disables mirrored reads. • A sampling rate of a number between "0.0" and "1.0" • sampling rate of "1.0" results in the primary forwarding all
  • 31. Mirrored Reads - From MongoDB 4.4 • db.adminCommand( { setParameter: 1, mirrorReads: { samplingRate: 0.10 } } ) • db.runCommand( { serverStatus: 1, mirroredReads: 1 } ) • Mirrored reads support the following operations: • Count • Distinct • Find • findAndModify (Specifically, the filter is sent as a mirrored read) • update (Specifically, the filter is sent as a mirrored read)
  • 32. Simultaneous Indexing - From MongoDB 4.4 • Before version 4.4, the index creation must be copied to the Secondary node to run once the primary node is complete • From 4.4, Indexes Build Simultaneously on Data-Bearing Replica Set Members • Index build process "startIndexBuild" oplog entry commitIndexBuild abortIndexBuild Primary check for Quorum Vote and any key constraint violations CreateIndex Command Each Member Vote commit for its finished index Secondary "startIndexBuild"
  • 33. Simultaneous Indexing - From MongoDB 4.4 Index Creation Command: db.getSiblingDB("examples").invoices.createIndexes( [ { "invoices" : 1 }, { "fulfillmentStatus" : 1 } ] ) Setting Index Commit Quorum: db.getSiblingDB("examples").runCommand( { "setIndexCommitQuorum" : "invoices", "indexNames" : ["invoices_1", "fullfillmentStatus_1"], "commitQuorum" : "majority" } ) • By default, index builds use "votingMembers" commit quorum, or all data-bearing voting replica set members • Do not use killOp to terminate an in-progress index builds in replica sets or sharded clusters • Starting from 4.2 db.pets.dropIndex( "catIdx" ) to drop Index • Run dropIndexes on the primary, it creates an associated "abortIndexBuild" oplog entry
  • 34. Reach Us : Info@mydbops.com Thank You