您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

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

Azure Cosmos DB 是 Microsoft 针对任务关键型应用程序提供的全球分布式多模型数据库服务。Azure Cosmos DB is Microsoft's globally distributed, multi-model database service for mission-critical applications. Azure Cosmos DB 在全球范围内提供统包全局分发吞吐量和存储的弹性扩展、99% 的情况下低至个位数的毫秒级延迟以及得到保证的高可用性,所有这些均由行业领先的 SLA 提供支持。Azure Cosmos DB provides turn-key global distribution, elastic scaling of throughput and storage worldwide, 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 的 API for MongoDB 创建的新帐户与 MongoDB 线路协议 3.6 版兼容。By default, new accounts created using Azure Cosmos DB's API for MongoDB are compatible with version 3.6 of the MongoDB wire protocol. 任何识别此协议版本的 MongoDB 客户端驱动程序应该可以本机连接到 Cosmos DB。Any MongoDB client driver that understands this protocol version 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, globally 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, global distribution with multi-master replication.

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

遵循快速入门创建 Azure Cosmos 帐户,并迁移现有 MongoDB 应用程序以使用 Azure Cosmos DB,或者生成一个新的应用程序:Follow the quickstarts to create an Azure 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 功能。Microsoft 不会运行 MongoDB 数据库来提供此服务。Azure Cosmos DB 并不隶属于 MongoDB, inc.Note: This article describes a feature of Azure Cosmos DB that provides wire protocol compatibility with MongoDB databases. Microsoft does not run MongoDB databases to provide this service. Azure Cosmos DB is not affiliated with MongoDB, Inc.