Question: Mongo connection Blacklisting #519

Closed
gawpertron opened this Issue Jan 25, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@gawpertron

gawpertron commented Jan 25, 2017

In the legacy PHP MongoDB Driver a connection can be blacklisted as mentioned in stack overflow question: MongoDB Blacklisted Fatal Error.

Does anyone know if this behavior also applies in PHP's supported MongoDB Driver ?

@jmikola jmikola added the question label Jan 25, 2017

@jmikola

This comment has been minimized.

Show comment
Hide comment
@jmikola

jmikola Jan 25, 2017

Member

The current driver uses libmongoc internally, which implements the Server Discovery and Monitoring specification. The PHP and HHVM drivers both use a single-threaded monitoring implementation, in which sockets are shared for monitoring and application usage (multi-threaded implementations have a separate pool of connection used exclusively for monitoring). This single-thread approach uses a five-second timeout for ignoring a server after encountering a network error, which is analogous to the blacklisting behavior of the legacy driver.

Member

jmikola commented Jan 25, 2017

The current driver uses libmongoc internally, which implements the Server Discovery and Monitoring specification. The PHP and HHVM drivers both use a single-threaded monitoring implementation, in which sockets are shared for monitoring and application usage (multi-threaded implementations have a separate pool of connection used exclusively for monitoring). This single-thread approach uses a five-second timeout for ignoring a server after encountering a network error, which is analogous to the blacklisting behavior of the legacy driver.

@jmikola jmikola closed this Feb 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment