Release r2013.05.19 of the mgo (http://labix.org/mgo
) MongoDB driver
for the Go language is out.
This release contains a few optimizations and improvements in the
establishment of connections and in the logic that maintains the
cluster topology up-to-date:
- The cluster synchronization mechanism used to establish new connections
periodically to obtain details about the running cluster. Now a new
connection is only established if there are no usable cached connections
in the internal pool, significantly reducing the impact of this procedure
- When performing queries against slaves, the driver used to give preference
to the servers with the least connections established by the driver itself.
Now the selection algorithm takes into account the ping time for the slaves
as well, so the selected slave is the one with least connections established
that falls within 15 milliseconds from the quickest responding slave, taking
into account the window of ping responses in the past minute.
- When servers were down, the cluster synchronization logic would quickly
retry the connection three times to ensure it wasn't a temporary hiccup. This
might translate to a significant number of connection attempts when the server
was actually down for a long period of time. A short delay was introduced at
this point to minimize the impact of these retries.
gustavo @ http://niemeyer.net