PHP Mongo 连接黑名单
PHP Mongo connection Blacklisting
在legacy PHP MongoDB Driver a connection can be blacklisted as mentioned in stack overflow question: MongoDB Blacklisted Fatal Error。
有谁知道这种行为是否也适用于 PHP 支持的 MongoDB Driver?
https://github.com/mongodb/mongo-php-driver/issues/519
简短的回答似乎是。
当前驱动程序使用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在遇到网络错误后忽略服务器,这类似于旧版驱动程序的黑名单行为。
在legacy PHP MongoDB Driver a connection can be blacklisted as mentioned in stack overflow question: MongoDB Blacklisted Fatal Error。
有谁知道这种行为是否也适用于 PHP 支持的 MongoDB Driver?
https://github.com/mongodb/mongo-php-driver/issues/519
简短的回答似乎是。
当前驱动程序使用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在遇到网络错误后忽略服务器,这类似于旧版驱动程序的黑名单行为。