Azure Cosmos DB 的用于 MongoDB 的 APIAzure Cosmos DB's API for MongoDB

Azure Cosmos DB 是 21Vianet 针对任务关键型应用程序提供的多区域分布式多模型数据库服务。Azure Cosmos DB is 21Vianet's multiple-region distributed, multi-model database service for mission-critical applications. Azure Cosmos DB 在中国各地提供统包式多区域分发吞吐量和存储的弹性扩展、99% 的情况下低至个位数的毫秒级延迟以及得到保证的高可用性,所有这些均由行业领先的 SLA 提供支持。Azure Cosmos DB provides turn-key multiple-region distribution, elastic scaling of throughput and storage around China, single-digit millisecond latencies at the 99th percentile, and guaranteed high availability, all backed by industry-leading SLAs. Azure Cosmos DB 自动为数据编制索引,不需要你管理架构和索引。Azure Cosmos DB automatically indexes data without requiring you to deal with schema and index management. 它采用多种模型,支持文档数据模型。It is multi-model and supports document data models. 默认情况下,可以使用 SQL API 与 Cosmos DB 交互。By default, you can interact with Cosmos DB using SQL API. 另外,Cosmos DB 服务还会为常用 NoSQL API(包括 MongoDB)实现线路协议。Additionally, the Cosmos DB service implements wire protocols for common NoSQL APIs including MongoDB. 这样你就可以使用熟悉的 NoSQL 客户端驱动程序和工具与 Cosmos 数据库交互。This allows you to use your familiar NoSQL client drivers and tools to interact with your Cosmos database.

线路协议兼容性Wire protocol compatibility

Azure Cosmos DB 可实现常用 NoSQL 数据库(包括 MongoDB)的线路协议。Azure Cosmos DB implements wire protocols of common NoSQL databases including MongoDB. 由于可以在 Cosmos DB 中以本机方式直接且高效地实现线路协议,因此 NoSQL 数据库的现有客户端 SDK、驱动程序和工具可以透明地与 Cosmos DB 交互。By providing a native implementation of the wire protocols directly and efficiently inside Cosmos DB, it allows existing client SDKs, drivers, and tools of the NoSQL databases to interact with Cosmos DB transparently. Cosmos DB 不使用数据库的任何源代码为任何 NoSQL 数据库提供与线路兼容的 API。Cosmos DB does not use any source code of the databases for providing wire-compatible APIs for any of the NoSQL databases.

默认情况下,Azure Cosmos DB 的用于 MongoDB 的 API 兼容 MongoDB 的 3.2 版线路协议。 By default, Azure Cosmos DB's API for MongoDB is compatible with version 3.2 of the MongoDB's wire protocol. 在 3.4 版线路协议中添加的功能或查询运算符目前作为预览版功能提供。Features or query operators added in version 3.4 of the wire protocol are currently available as a preview feature. 任何理解这些协议版本的 MongoDB 客户端驱动程序都应该可以通过本机方式连接到 Cosmos DB。Any MongoDB client driver that understands these protocol versions should be able to natively connect to Cosmos DB.

Azure Cosmos DB 的用于 MongoDB 的 API

主要优点Key benefits

作为一种完全托管的多区域分布式数据库即服务,Cosmos DB 的主要优势详见此处The key benefits of Cosmos DB as a fully managed, multiple-region distributed, database as a service are described here. 另外,Cosmos DB 可以通过本机方式实现常用 NoSQL API 的线路协议,因此具备以下优势:Additionally, by natively implementing wire protocols of popular NoSQL APIs, Cosmos DB provides the following benefits:

  • 在保留大部分应用程序逻辑的情况下,轻松地将应用程序迁移到 Cosmos DB。Easily migrate your application to Cosmos DB while preserving significant portions of your application logic.
  • 使应用程序可以移植并且始终与云供应商无关。Keep your application portable and continue to remain cloud vendor-agnostic.
  • 针对 Cosmos DB 支持的常用 NoSQL API,获取行业领先且享有财务支持的 SLA。Get industry leading, financially backed SLAs for the common NoSQL APIs powered by Cosmos DB.
  • 根据需求弹性缩放为 Cosmos 数据库预配的吞吐量和存储,只为所需的吞吐量和存储付费。Elastically scale the provisioned throughput and storage for your Cosmos databases based on your need and pay only for the throughput and storage you need. 这样可以显著节省成本。This leads to significant cost savings.
  • 通过多主数据库复制功能实现统包式多区域分布。Turnkey, multiple-region distribution with multi-master replication.

Cosmos DB 的用于 MongoDB 的 APICosmos DB's API for MongoDB

遵循快速入门创建 Cosmos 帐户,并迁移现有 MongoDB 应用程序以使用 Azure Cosmos DB,或者生成一个新的应用程序:Follow the quickstarts to create an Cosmos account and migrate your existing MongoDB application to use Azure Cosmos DB, or build a new one:

后续步骤Next steps

下面是一些可帮助入门的指南:Here are a few pointers to get you started:

注意:本文介绍了可与 MongoDB 数据库实现线路协议兼容的 Azure Cosmos DB 功能。Azure 不会运行 MongoDB 数据库来提供此服务。Azure Cosmos DB 并不隶属于 MongoDB, inc.Note: This article describes a feature of Azure Cosmos DB that provides wire protocol compatibility with MongoDB databases. Azure does not run MongoDB databases to provide this service. Azure Cosmos DB is not affiliated with MongoDB, Inc.