SlideShare une entreprise Scribd logo
1  sur  45
Server Discovery and Monitoring
Joe Drumgoole
Director of Developer Advocacy, EMEA
21-July-2016
V1.0
2
MongoDB
MongoDB Query Language (MQL) + Native Drivers
MongoDB Document/JSON Data Model
Wired
Tiger
MMAP
Management
Security
In-memory Encrypted 3rd party
Shared Clusters
Replica Sets
3
Drivers and Frameworks
Morphia
MEAN Stack
4
Single Server
Driver
Mongod
5
Replica Set
Driver
Secondary Secondary
Primary
6
Replica Set Primary Failure
Driver
Secondary Secondary
7
Replica Set Election
Driver
Secondary Secondary
8
Replica Set New Primary
Driver
Primary Secondary
9
Replica Set Recovery
Driver
Primary Secondary
Secondary
10
Sharded Cluster
Driver
Mongod Mongod
Mongod
Mongod Mongod
Mongod
Mongod Mongod
Mongod
mongos mongos
11
Driver Responsibilities
https://github.com/mongodb/mongo-python-driver
Driver
Authentication
& Security
Python<->BSON
Error handling &
Recovery
Wire
Protocol
Topology
Management
Connection Pool
12
Driver Responsibilities
https://github.com/mongodb/mongo-python-driver
Driver
Authentication
& Security
Python<->BSON
Error handling &
Recovery
Wire
Protocol
Topology
Management
Connection Pool
13
Example API Calls
import pymongo
client = pymongo.MongoClient( host=“localhost”, port=27017)
database = client[ ‘test_database’ ]
collection = database[ ‘test_collection’ ]
collection.insert_one({ "hello" : "world" ,
"goodbye" : "world" } )
collection.find_one( { "hello" : "world" } )
collection.update({ "hello" : "world" },
{ "$set" : { "buenos dias" : "world" }} )
collection.delete_one({ "hello" : "world" } )
14
Start MongoClient
c = MongoClient( "host1, host2",
replicaSet="replset" )
15
Client Side View
Secondary
host2
Secondary
host3
Primary
host1
Mongo
Client
MongoClient( "host1, host2",
replicaSet="replset" )
16
Client Side View
Secondary
host2
Secondary
host3
Primary
host1
Mongo
Client
Monitor
Thread 1
Monitor
Thread 2
{ ismaster : False,
secondary: True,
hosts : [ host1, host2, host3 ] }
17
What Does ismaster show?
>>> pprint.pprint( db.command( "ismaster" ))
{u'hosts': [u'JD10Gen-old.local:27017',
u'JD10Gen-old.local:27018',
u'JD10Gen-old.local:27019'],
u'ismaster' : False,
u'secondary': True,
u'setName' : u'replset',
…}
>>>
18
Topology
Current
Topology
ismaster
New
Topology
19
Client Side View
Secondary
host2
Secondary
host3
Primary
host1
Mongo
Client
Monitor
Thread 1
Monitor
Thread 2
20
Client Side View
Secondary
host2
Secondary
host3
Primary
host1
Mongo
Client
Monitor
Thread 1
Monitor
Thread 2
Monitor
Thread 3
21
Client Side View
Secondary
host2
Secondary
host3
Primary
host1
Mongo
Client
Monitor
Thread 1
Monitor
Thread 2
Monitor
Thread 3
Your
Code
22
Next Is Insert
c = MongoClient( "host1, host2",
replicaSet="replset" )
client.db.col.insert_one( { "a" : "b" } )
23
Insert Will Block
Secondary
host2
Secondary
host3
Primary
host1
Mongo
Client
Monitor
Thread 1
Monitor
Thread 2
Monitor
Thread 3
Your
Code
Insert
24
ismaster response from Host 1
Secondary
host2
Secondary
host3
Primary
host1
Mongo
Client
Monitor
Thread 1
Monitor
Thread 2
Monitor
Thread 3
Your
Code
Insert
ismaster
25
Now Write Can Proceed
Secondary
host2
Secondary
host3
Primary
host1
Mongo
Client
Monitor
Thread 1
Monitor
Thread 2
Monitor
Thread 3
Your
Code
Insert Insert
26
Later Host 3 Responds
Secondary
host2
Secondary
host3
Primary
host1
Mongo
Client
Monitor
Thread 1
Monitor
Thread 2
Monitor
Thread 3
Your
Code
27
Steady State
Secondary
host2
Secondary
host3
Primary
host1
Mongo
Client
Monitor
Thread 1
Monitor
Thread 2
Monitor
Thread 3
Your
Code
28
Life Intervenes
Secondary
host2
Secondary
host3
Primary
host1
Mongo
Client
Monitor
Thread 1
Monitor
Thread 2
Monitor
Thread 3
Your
Code
✖
29
Monitor may not detect
Secondary
host2
Secondary
host3
Primary
host1
Mongo
Client
Monitor
Thread 1
Monitor
Thread 2
Monitor
Thread 3
Your
Code
✖
Insert
ConnectionFailure
30
So Retry
Secondary
host2
Secondary
host3
Mongo
Client
Monitor
Thread 1
Monitor
Thread 2
Monitor
Thread 3
Your
Code
✖
Insert
31
Check for Primary
Secondary
host2
Secondary
host3
Mongo
Client
Monitor
Thread 1
Monitor
Thread 2
Monitor
Thread 3
Your
Code
✖
Insert
32
Host 2 Is Primary
Primary
host2
Secondary
host3
Mongo
Client
Monitor
Thread 1
Monitor
Thread 2
Monitor
Thread 3
Your
Code
✖
Insert
33
Steady State
Secondary
host2
Secondary
host3
Primary
host1
Mongo
Client
Monitor
Thread 1
Monitor
Thread 2
Monitor
Thread 3
Your
Code
34
What Does This Mean? - Connect
import pymongo
client = pymongo.MongoClient()
try:
client.admin.command( "ismaster" )
except pymongo.errors.ConnectionFailure, e :
print( "Cannot connect: %s" % e )
35
What Does This Mean? - Queries
import pymongo
def find_with_recovery( collection, query ) :
try:
return collection.find_one( query )
except pymongo.errors.ConnectionFailure, e :
logging.info( "Connection failure : %s" e )
return collection.find_one( query )
36
What Does This Mean? - Inserts
def insert_with_recovery( collection, doc ) :
doc[ "_id" ] = ObjectId()
try:
collection.insert_one( doc )
except pymongo.errors.ConnectionFailure, e:
logging.info( "Connection error: %s" % e )
try:
collection.insert_one( doc )
except DuplicateKeyError:
pass
37
What Does This Mean? - Updates
collection.update( { "_id" : 1 },
{ "$inc" : { "counter" : 1 }})
38
Configuration
connectTimeoutMS : 30s
serverTimeoutMS : 30s
39
connectTimeoutMS
Secondary
host2
Secondary
host3
Mongo
Client
Monitor
Thread 1
Monitor
Thread 2
Monitor
Thread 3
Your
Code
✖
Insert
connectTimeoutMS
40
serverTimeoutMS
Secondary
host2
Secondary
host3
Mongo
Client
Monitor
Thread 1
Monitor
Thread 2
Monitor
Thread 3
Your
Code
✖
Insert
serverTimeoutMS
41
More Reading
• The spec author Jess Jiryu Davis has a collection of links and his better
version of this talk
https://emptysqua.re/blog/server-discovery-and-monitoring-in-mongodb-
drivers/
• The full server discovery and monitoring spec is on GitHub
https://github.com/mongodb/specifications/blob/master/source/server-
discovery-and-monitoring/server-discovery-and-monitoring.rst
43
insert_one
• Stages
– Parse the parameters
– Get a socket to write data on
– Add the object Id
– Convert the whole insert command and parameters to a SON object
– Apply the writeConcern to the command
– Encode the message into a BSON object
– Send the message to the server via the socket (TCP/IP)
– Check for writeErrors (e.g. DuplicateKeyError)
– Check for writeConcernErrors (e.g.writeTimeout)
– Return Result object
44
Bulk Insert
bulker = collection.initialize_ordered_bulk_op()
bulker.insert( { "a" : "b" } )
bulker.insert( { "c" : "d" } )
bulker.insert( { "e" : "f" } )
try:
bulker.execute()
except pymongo.errors.BulkWriteError as e :
print( "Bulk write error : %s" % e.detail )
45
Bulk Write
• Create Bulker object
• Accumulate operations
• Each operation is created as a SON object
• The operations are accumulated in a list
• Once execute is called
– For ordered execute in order added
– For unordered execute INSERT, UPDATEs then DELETE
• Errors will abort the whole batch unless no write concern specified

Contenu connexe

Tendances

Tendances (12)

Python and sysadmin I
Python and sysadmin IPython and sysadmin I
Python and sysadmin I
 
The Ruby Guide to *nix Plumbing: on the quest for efficiency with Ruby [M|K]RI
The Ruby Guide to *nix Plumbing: on the quest for efficiency with Ruby [M|K]RIThe Ruby Guide to *nix Plumbing: on the quest for efficiency with Ruby [M|K]RI
The Ruby Guide to *nix Plumbing: on the quest for efficiency with Ruby [M|K]RI
 
Go for the paranoid network programmer, 2nd edition
Go for the paranoid network programmer, 2nd editionGo for the paranoid network programmer, 2nd edition
Go for the paranoid network programmer, 2nd edition
 
Go ahead, make my day
Go ahead, make my dayGo ahead, make my day
Go ahead, make my day
 
Malcon2017
Malcon2017Malcon2017
Malcon2017
 
Going Loopy: Adventures in Iteration with Go
Going Loopy: Adventures in Iteration with GoGoing Loopy: Adventures in Iteration with Go
Going Loopy: Adventures in Iteration with Go
 
The Ring programming language version 1.5.3 book - Part 9 of 184
The Ring programming language version 1.5.3 book - Part 9 of 184The Ring programming language version 1.5.3 book - Part 9 of 184
The Ring programming language version 1.5.3 book - Part 9 of 184
 
The Ring programming language version 1.5.4 book - Part 9 of 185
The Ring programming language version 1.5.4 book - Part 9 of 185The Ring programming language version 1.5.4 book - Part 9 of 185
The Ring programming language version 1.5.4 book - Part 9 of 185
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
The Ring programming language version 1.5.1 book - Part 8 of 180
The Ring programming language version 1.5.1 book - Part 8 of 180The Ring programming language version 1.5.1 book - Part 8 of 180
The Ring programming language version 1.5.1 book - Part 8 of 180
 
Alexander Mostovenko "Modern approach to localization in javascript with the ...
Alexander Mostovenko "Modern approach to localization in javascript with the ...Alexander Mostovenko "Modern approach to localization in javascript with the ...
Alexander Mostovenko "Modern approach to localization in javascript with the ...
 
The Curious Clojurist - Neal Ford (Thoughtworks)
The Curious Clojurist - Neal Ford (Thoughtworks)The Curious Clojurist - Neal Ford (Thoughtworks)
The Curious Clojurist - Neal Ford (Thoughtworks)
 

En vedette

Webinar slides: Become a MongoDB DBA - What to Monitor (if you’re really a My...
Webinar slides: Become a MongoDB DBA - What to Monitor (if you’re really a My...Webinar slides: Become a MongoDB DBA - What to Monitor (if you’re really a My...
Webinar slides: Become a MongoDB DBA - What to Monitor (if you’re really a My...
Severalnines
 
Mobile monday mhealth
Mobile monday mhealthMobile monday mhealth
Mobile monday mhealth
Joe Drumgoole
 
Internet Safety and Chldren
Internet Safety and ChldrenInternet Safety and Chldren
Internet Safety and Chldren
Joe Drumgoole
 

En vedette (20)

Training MongoDB - Monitoring and Operability
Training MongoDB - Monitoring and OperabilityTraining MongoDB - Monitoring and Operability
Training MongoDB - Monitoring and Operability
 
Webinar slides: Become a MongoDB DBA - What to Monitor (if you’re really a My...
Webinar slides: Become a MongoDB DBA - What to Monitor (if you’re really a My...Webinar slides: Become a MongoDB DBA - What to Monitor (if you’re really a My...
Webinar slides: Become a MongoDB DBA - What to Monitor (if you’re really a My...
 
MongoDB training for java software engineers
MongoDB training for java software engineersMongoDB training for java software engineers
MongoDB training for java software engineers
 
Enterprise mobility for fun and profit
Enterprise mobility for fun and profitEnterprise mobility for fun and profit
Enterprise mobility for fun and profit
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
Simplifying Enterprise Mobility - Powering Mobile Apps from The Cloud
Simplifying Enterprise Mobility - Powering Mobile Apps from The CloudSimplifying Enterprise Mobility - Powering Mobile Apps from The Cloud
Simplifying Enterprise Mobility - Powering Mobile Apps from The Cloud
 
Cloudsplit original
Cloudsplit originalCloudsplit original
Cloudsplit original
 
Be A Startup Not a F**kup
Be A Startup Not a F**kupBe A Startup Not a F**kup
Be A Startup Not a F**kup
 
Back to Basics Webinar 3 - Thinking in Documents
Back to Basics Webinar 3 - Thinking in DocumentsBack to Basics Webinar 3 - Thinking in Documents
Back to Basics Webinar 3 - Thinking in Documents
 
EuroPython 2016 : A Deep Dive into the Pymongo Driver
EuroPython 2016 : A Deep Dive into the Pymongo DriverEuroPython 2016 : A Deep Dive into the Pymongo Driver
EuroPython 2016 : A Deep Dive into the Pymongo Driver
 
Back to Basics Webinar 1 - Introduction to NoSQL
Back to Basics Webinar 1 - Introduction to NoSQLBack to Basics Webinar 1 - Introduction to NoSQL
Back to Basics Webinar 1 - Introduction to NoSQL
 
Back to Basics Webinar 2 - Your First MongoDB Application
Back to  Basics Webinar 2 - Your First MongoDB ApplicationBack to  Basics Webinar 2 - Your First MongoDB Application
Back to Basics Webinar 2 - Your First MongoDB Application
 
Harness the web and grow your business
Harness the web and grow your businessHarness the web and grow your business
Harness the web and grow your business
 
Event sourcing the best ubiquitous pattern you have never heard off
Event sourcing   the best ubiquitous pattern you have never heard offEvent sourcing   the best ubiquitous pattern you have never heard off
Event sourcing the best ubiquitous pattern you have never heard off
 
Cloud Computing - Halfway through the revolution
Cloud Computing - Halfway through the revolutionCloud Computing - Halfway through the revolution
Cloud Computing - Halfway through the revolution
 
Mobile monday mhealth
Mobile monday mhealthMobile monday mhealth
Mobile monday mhealth
 
Python Ireland Conference 2016 - Python and MongoDB Workshop
Python Ireland Conference 2016 - Python and MongoDB WorkshopPython Ireland Conference 2016 - Python and MongoDB Workshop
Python Ireland Conference 2016 - Python and MongoDB Workshop
 
Introduction to CQRS and Event Sourcing
Introduction to CQRS and Event SourcingIntroduction to CQRS and Event Sourcing
Introduction to CQRS and Event Sourcing
 
The Future of IT for Accountants
The Future of IT for AccountantsThe Future of IT for Accountants
The Future of IT for Accountants
 
Internet Safety and Chldren
Internet Safety and ChldrenInternet Safety and Chldren
Internet Safety and Chldren
 

Similaire à Server discovery and monitoring with MongoDB

Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01
Tony Frame
 

Similaire à Server discovery and monitoring with MongoDB (20)

MongoDB - How to model and extract your data
MongoDB - How to model and extract your dataMongoDB - How to model and extract your data
MongoDB - How to model and extract your data
 
A Brief MongoDB Intro
A Brief MongoDB IntroA Brief MongoDB Intro
A Brief MongoDB Intro
 
Testing the frontend
Testing the frontendTesting the frontend
Testing the frontend
 
Inside PyMongo - MongoNYC
Inside PyMongo - MongoNYCInside PyMongo - MongoNYC
Inside PyMongo - MongoNYC
 
Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01
 
10 reasons to adopt Python 3
10 reasons to adopt Python 310 reasons to adopt Python 3
10 reasons to adopt Python 3
 
How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...
How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...
How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...
 
Hierarchical free monads and software design in fp
Hierarchical free monads and software design in fpHierarchical free monads and software design in fp
Hierarchical free monads and software design in fp
 
Mdb dn 2016_09_34_features
Mdb dn 2016_09_34_featuresMdb dn 2016_09_34_features
Mdb dn 2016_09_34_features
 
جلسه پنجم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲- ارائه ۲
جلسه پنجم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲- ارائه ۲جلسه پنجم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲- ارائه ۲
جلسه پنجم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲- ارائه ۲
 
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
 
MongoDB installation,CRUD operation & JavaScript shell
MongoDB installation,CRUD operation & JavaScript shellMongoDB installation,CRUD operation & JavaScript shell
MongoDB installation,CRUD operation & JavaScript shell
 
Spring Data, Jongo & Co.
Spring Data, Jongo & Co.Spring Data, Jongo & Co.
Spring Data, Jongo & Co.
 
Python 3
Python 3Python 3
Python 3
 
MongoDB Days Silicon Valley: Introducing MongoDB 3.2
MongoDB Days Silicon Valley: Introducing MongoDB 3.2MongoDB Days Silicon Valley: Introducing MongoDB 3.2
MongoDB Days Silicon Valley: Introducing MongoDB 3.2
 
Debugging of (C)Python applications
Debugging of (C)Python applicationsDebugging of (C)Python applications
Debugging of (C)Python applications
 
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!
 
Mongo db basic installation
Mongo db basic installationMongo db basic installation
Mongo db basic installation
 
Code Splitting in Practice - Shanghai JS Meetup May 2016
Code Splitting in Practice - Shanghai JS Meetup May 2016Code Splitting in Practice - Shanghai JS Meetup May 2016
Code Splitting in Practice - Shanghai JS Meetup May 2016
 
Sekilas PHP + mongoDB
Sekilas PHP + mongoDBSekilas PHP + mongoDB
Sekilas PHP + mongoDB
 

Plus de Joe Drumgoole

How to run a company for 2k a year
How to run a company for 2k a yearHow to run a company for 2k a year
How to run a company for 2k a year
Joe Drumgoole
 
Software warstories mba-club
Software warstories mba-clubSoftware warstories mba-club
Software warstories mba-club
Joe Drumgoole
 

Plus de Joe Drumgoole (13)

MongoDB Schema Design
MongoDB Schema DesignMongoDB Schema Design
MongoDB Schema Design
 
The Rise of Microservices
The Rise of MicroservicesThe Rise of Microservices
The Rise of Microservices
 
Back to Basics 2017 - Your First MongoDB Application
Back to Basics 2017 - Your First MongoDB ApplicationBack to Basics 2017 - Your First MongoDB Application
Back to Basics 2017 - Your First MongoDB Application
 
Back to Basics 2017 - Introduction to NoSQL
Back to Basics 2017 - Introduction to NoSQLBack to Basics 2017 - Introduction to NoSQL
Back to Basics 2017 - Introduction to NoSQL
 
MongoDB World 2016 : Advanced Aggregation
MongoDB World 2016 : Advanced AggregationMongoDB World 2016 : Advanced Aggregation
MongoDB World 2016 : Advanced Aggregation
 
How to run a company for 2k a year
How to run a company for 2k a yearHow to run a company for 2k a year
How to run a company for 2k a year
 
How to Run a Company for $2000 a Year
How to Run a Company for $2000 a YearHow to Run a Company for $2000 a Year
How to Run a Company for $2000 a Year
 
Smart Phones - Smart Platforms
Smart Phones - Smart PlatformsSmart Phones - Smart Platforms
Smart Phones - Smart Platforms
 
Cloud Computing - A Gentle Introduction
Cloud Computing - A Gentle IntroductionCloud Computing - A Gentle Introduction
Cloud Computing - A Gentle Introduction
 
The costs of cloud computing
The costs of cloud computingThe costs of cloud computing
The costs of cloud computing
 
A cheap date with cloud computing
A cheap date with cloud computingA cheap date with cloud computing
A cheap date with cloud computing
 
Software warstories mba-club
Software warstories mba-clubSoftware warstories mba-club
Software warstories mba-club
 
Agile development using SCRUM
Agile development using SCRUMAgile development using SCRUM
Agile development using SCRUM
 

Dernier

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Dernier (20)

%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 

Server discovery and monitoring with MongoDB

Notes de l'éditeur

  1. Primary secondary, secondary
  2. Primary secondary, secondary
  3. Primary secondary, secondary
  4. Primary secondary, secondary
  5. Primary secondary, secondary
  6. Present a native language interface - converts python types to BSON objects Convert the JSON query language into commands for the database Convert JSON data into BSON data and vice-versa Handles interfacing to different MongoDB topologies Helps recover from server side outages/network errors Manages the client side connection pool The pymongo driver code is on Github (Apache License)
  7. Present a native language interface - converts python types to BSON objects Convert the JSON query language into commands for the database Convert JSON data into BSON data and vice-versa Handles interfacing to different MongoDB topologies Helps recover from server side outages/network errors Manages the client side connection pool The pymongo driver code is on Github (Apache License)
  8. Calls i
  9. Calls i
  10. State machine, full set of states defined in spec.
  11. Calls i
  12. Calls i
  13. Calls i
  14. Needs a primary to complete a write.
  15. Needs a primary to complete a write.
  16. Needs a primary to complete a write.
  17. Needs a primary to complete a write.
  18. Each thread wakes every 10 seconds. Runs ismaster, sleeps. We use ismaster to check latency. Keep topology description up to date.
  19. Each thread wakes every 10 seconds. Runs ismaster, sleeps. We use ismaster to check latency. Keep topology description up to date.
  20. Each thread wakes every 10 seconds. Runs ismaster, sleeps. We use ismaster to check latency. Keep topology description up to date.
  21. Primary is marked as unknown Wakes up all monitor threads to check for a primary.
  22. Primary is marked as unknown Wakes up all monitor threads to check for a primary every half second.
  23. Primary is marked as unknown Wakes up all monitor threads to check for a primary every half second.
  24. Each thread wakes every 10 seconds. Runs ismaster, sleeps. We use ismaster to check latency. Keep topology description up to date.
  25. Try once. This will accomdate elections. Other errore should be propagated.
  26. Try once. This will accomdate elections. Other errore should be propagated.
  27. Can you afford to over or under count. Operations need to be idempotent. Turn an update into a write of a document, cf EventSourcing. Then aggregate on the server.
  28. How long should a connection wait before timing out and sleeping for 10 seconds.
  29. How long should a connection wait before timing out and sleeping for 10 seconds.