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

Azure Cosmos DB 是世纪互联针对任务关键型应用程序提供的多区域分配式多模型数据库服务。Azure Cosmos DB is 21Vianet's multiple-regionally 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, key-value, graph, and columnar data models. 默认情况下,可以使用 SQL API 来与 Cosmos DB 交互。By default, you can interact with Cosmos DB using SQL API. 此外,Cosmos DB 服务对 Cassandra、MongoDB、Gremlin 和 Azure 表存储等常见 NoSQL API 实现网络协议。Additionally, the Cosmos DB service implements wire protocols for common NoSQL APIs including Cassandra, MongoDB, Gremlin, and Azure Table Storage. 这样,你便可以使用熟悉的 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 服务对 Cassandra、MongoDB、Gremlin 和 Azure 表存储等常见的 NoSQL 数据库实现网络协议。Azure Cosmos DB implements wire protocols of common NoSQL databases including Cassandra, MongoDB, Gremlin, and Azure Tables Storage. 它在 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-regionally 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.