A high-performance, maintained fork of the mgo MongoDB driver for the Go programming language.
globalsign/mgo is a maintained fork of the popular mgo library, which is a MongoDB driver for the Go programming language. It enables Go applications to connect to, query, and manage MongoDB databases with a focus on performance, reliability, and support for modern MongoDB features. The project addresses various bugs and limitations from the original driver while adding enhancements like better connection handling and extended BSON support.
Go developers building applications that require persistent data storage with MongoDB, particularly those needing improved performance, stability, or access to newer MongoDB features not supported in the original mgo driver.
Developers choose this fork for its active maintenance, performance optimizations, and the inclusion of critical fixes and features from community pull requests that may be stalled in the upstream repository. It offers a more reliable and feature-complete driver for production Go applications using MongoDB.
The MongoDB driver for Go
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements buffer reuse and improved connection handling to reduce memory footprint and garbage collection pressure, as detailed in performance optimization changes.
Includes a standalone BSON package with streaming encoders and better type handling, improving encoding/decoding performance and supporting features like integer map keys.
Features configurable timeouts, graceful recovery from server unavailability, and maxIdleTimeout for pooled connections, enhancing stability in production environments.
Supports MongoDB versions 3.0 to 3.6 with added features like change streams, collations, and read-only views, plus community-driven fixes for bugs.
MongoDB 4.0 support is experimental, which may pose risks for applications needing cutting-edge features or production stability on newer versions.
As a fork of the original mgo, it inherits architectural constraints and might not align with MongoDB's official driver roadmap, leading to potential compatibility gaps.
Focuses on low-level improvements without built-in ORM or abstraction layers, requiring more manual work for complex data modeling compared to some alternatives.