azure db 设置时区

介绍 (Introduction)

Azure Cosmos DB is a low-latency, high throughput, globally distributed, a multi-model database which can scale within minutes and offers 5 consistency options to let you decide how to deal with the CAP theorem.

Azure Cosmos DB是一个低延迟,高吞吐量,全局分布的多模型数据库,可以在数分钟内进行扩展,并提供5种一致性选项,让您决定如何处理CAP定理。

Azure Cosmos DB used to be known as Document DB, but since additional features were added it has now morphed into Azure Cosmos DB. The name was chosen to spark the innovation and imagination of developers around the globe.

Azure Cosmos DB过去被称为Document DB,但是由于添加了其他功能,现在它已演变为Azure Cosmos DB。 选择该名称是为了激发全球开发人员的创新和想象力。

1. Azure Cosmos DB已在全球范围内分发 (1. Azure Cosmos DB is globally Distributed)

Azure Cosmos DB is classified as a foundational service, which means that it is available in every Azure region. This allows you to have your data replicated to as many data centres in as many regions as you wish.

Azure Cosmos DB被归类为基础服务,这意味着它在每个Azure区域中都可用。 这样,您就可以将数据复制到任意数量的区域中的任意数量的数据中心。

An acdditional region can be added by selecting the Replicate data globally option, and then simply clicking on the regions you want to replicate to on the map.

可以通过选择“全局复制数据”选项,然后在地图上单击要复制到的区域来添加附加区域。

It also allows you to specify priorities for your data regions, so you can decide to where it should failover in case of a disaster. You can specify either manual or automatic failover.

它还允许您为数据区域指定优先级,因此您可以决定在发生灾难时应该在哪里进行故障转移。 您可以指定手动或自动故障转移。

Because your application connects to logical endpoints, nothing has to be changed when there is a regional failover.

因为您的应用程序连接到逻辑端点,所以在进行区域故障转移时无需更改任何内容。

2. Azure Cosmos DB有5种一致性可供选择 (2. Azure Cosmos DB has 5 consistencies to choose from)

If you are familiar with the CAP theorem, you will know that there is no such thing as perfect consistency. There are always trade-offs. Azure Cosmos DB offers 5 consistency models at the moment so that you can decide for yourself what you deem more important and what you are willing to sacrifice. Consistency is a topic on its own so I will only touch on it briefly here.

如果您熟悉CAP定理,您将知道不存在完美一致性。 总是要权衡取舍。 目前,Azure Cosmos DB提供了5种一致性模型,因此您可以自己决定您认为更重要的内容和愿意牺牲的内容。 一致性本身就是一个主题,因此在这里我仅简要介绍一下。

The current available consistencies are:

当前可用的一致性为:

  • With strong consistency, you are guaranteed to always read the latest version of an item similar to read committed isolation in SQL Server. You can only ever see data which is durably committed. Strong consistency is scoped to a single region.
    凭借强大的一致性,可以确保您始终读取与SQL Server中读取已提交隔离类似的项目的最新版本。 您只能看到持久提交的数据。 强一致性仅限于单个区域。
  • In bounded-staleness consistency read will lag behind writes, and guarantees global order and not scoped to a single region.
    在有局限性的一致性中,读取将滞后于写入,并保证全局顺序,并且不限于单个区域。
    When configuring bounded-staleness consistency you need to specify the maximum lag by:
    配置有界陈旧性一致性时,您需要通过以下方式指定最大滞后时间:

    • For a single region the maximum operations lag must be between 10 and 1 000 000, and for the multi region, it will be between 100 000 and 1 000 000.
      对于单个区域,最大操作滞后必须在10到1000000之间,而对于多个区域,最大操作滞后将在10万到1000000之间。
    • The maximum lag must be between 5 seconds and 1 day for either single or multi-regions.
      对于单个或多个区域,最大延迟必须在5秒到1天之间。
  • This is the most popular consistency level, since it provides consistency guarantees but also has better throughput.
    这是最流行的一致性级别,因为它提供了一致性保证,但也具有更好的吞吐量。
  • A global order is preserved, and prefix order is guaranteed. A user will never see writes in a different order than that is which it was written.
    保留全局顺序,并保证前缀顺序。 用户将永远不会看到与写入顺序不同的写入。
  • Basically, this is like asynchronous synchronization. It guarantees that all changes will be replicated eventually, and as such, it also has the lowest latency because it does not need to wait on any commits.
    基本上,这就像异步同步。 它保证所有更改最终都将被复制,因此,它也具有最低的延迟,因为它不需要等待任何提交。

When you create your Azure Cosmos DB, you can choose which consistency level to use as the default, but a different consistency level can be specified every time you read from the database.

创建Azure Cosmos DB时,可以选择将哪个一致性级别用作默认值,但是每次从数据库读取时都可以指定不同的一致性级别。

The default of the default is Session consistency because it is the most widely used. If you want to change the default you can simply go to the Settings section on your Cosmos DB blade and click on Default consistency, which will then allow you to choose a different default.

默认值是会话一致性,因为它使用最广泛。 如果要更改默认值,则只需转到Cosmos DB刀片上的“设置”部分,然后单击“默认一致性”,这将允许您选择其他默认值。

3. Azure Cosmos DB是一个多模型数据库 (3. Azure Cosmos DB is a multi-model database)

Azure Cosmos DB uses an atom-record-sequence (ARS) system. Basically, the Cosmos DB translates all data models into atom-record-sequence based models.

Azure Cosmos DB使用原子记录序列(ARS)系统。 基本上,Cosmos DB将所有数据模型转换为基于原子记录序列的模型。

So, everything becomes either an atom, a record or a sequence.

因此,一切都变成原子,记录或序列。

  • An atom is a primitive type. 原子是原始类型。
  • A record is a struct 记录是一个结构
  • A sequence is an array of either atoms, records or structs. 序列是原子,记录或结构的数组。

At the moment Azure Cosmos DB supports

目前,Azure Cosmos DB支持

  • Key-value pairs 键值对
  • Column family 列族
  • Document and 文件和
  • Graph 图形

4. Azure Cosmos DB支持多个API (4. Azure Cosmos DB support multiple APIs)

Azure Cosmos DB supports multiple APIs which can interact with all the data regardless of what data model is being used, so developers are able to develop in their preferred technology. It currently supports 4 APIs.

Azure Cosmos DB支持多个API,无论使用哪种数据模型,这些API都可以与所有数据进行交互,因此开发人员可以使用其首选技术进行开发。 当前支持4个API。

  • SQL SQL
  • Mongo DB API Mongo DB API
  • Tables API 表格API
  • Gremlin 格林姆林

5. Azure Cosmos DB自动建立索引 (5. Azure Cosmos DB indexes automatically)

Azure Cosmos DB handles indexing automatically and does not need any schema or any secondary indexes. It uses Bw-trees instead of B-trees. Bw-trees makes use of multi-core technology, it does not use latches, and it never updates a memory page in place as to avoid cache invalidations. It also takes advantage of flash storage.

Azure Cosmos DB自动处理索引,不需要任何架构或任何辅助索引。 它使用Bw树而不是B树。 Bw树使用多核技术,不使用锁存器,并且从不更新适当的内存页以避免缓存失效。 它还利用闪存存储。

Even though Cosmos DB takes care of indexing automatically. It still allows developers to perform fine grained tuning by allowing a developer to implement a custom indexing policy.

即使Cosmos DB会自动处理索引。 通过允许开发人员实施自定义索引策略,它仍然允许开发人员执行细粒度的调整。

You can change it in the Azure Portal by going to your Cosmos DB blade. Click on Settings and then on the indexing policy option.

您可以通过转到Cosmos DB刀片在Azure门户中对其进行更改。 单击设置,然后单击索引策略选项。

6. Azure Cosmos DB具有非常低的延迟 (6. Azure Cosmos DB has very low latency)

Azure Cosmos DB guarantees less than 10 ms for reads and less than 15 ms latency for writes.

Azure Cosmos DB保证读取少于10毫秒,写入少于15毫秒。

During the 15 milliseconds, the data is actually written, committed, replicated and indexed in less than 15 milliseconds.

在15毫秒内,实际上会在不到15毫秒的时间内写入,提交,复制和索引数据。

Basically, all reads and writes are served from a local region and then replicated according to the selected consistency model.

基本上,所有读取和写入都是从本地区域进行的,然后根据所选的一致性模型进行复制。

7. Azure Cosmos DB可以独立扩展存储和吞吐量 (7. Azure Cosmos DB can scale storage and throughput independently)

If you need more storage you can add additional storage without having to pay for additional throughput. These two things can scale independently of each other.

如果您需要更多存储空间,则可以添加其他存储空间而不必支付额外的吞吐量。 这两件事可以相互独立扩展。

To scale throughput the first thing you should do is to estimate how much throughput and storage you will actually need. You can use the handy Capacity Planner site to perform the calculation. It will give you an estimate of how many RUs (Request Units) you need as well as the amount of Data Storage.

要扩展吞吐量,您应该做的第一件事就是估算实际需要的吞吐量和存储量。 您可以使用方便的Capacity Planner网站进行计算。 它将为您估算所需的RU(请求单位)数量以及数据存储量。

Once that is done, the number of RUs and storage can be increased using the Scale option on the Cosmos DB server blade in Azure.

完成此操作后,可以使用Azure中Cosmos DB服务器刀片上的“缩放”选项来增加RU和存储的数量。

8. Azure Cosmos DB具有免费的仿真器用于测试 (8. Azure Cosmos DB has a free emulator for testing)

When you develop an application to use Azure Cosmos DB, you don’t need to spend your money until you are ready to launch your application. You can use the Azure Cosmos DB Emulator, which will allow you to develop and test your applications before having to use your Azure Cosmos DB account.

在开发应用程序以使用Azure Cosmos DB时,无需花钱就可以准备启动应用程序。 您可以使用Azure Cosmos DB仿真器 ,使用它可以在必须使用Azure Cosmos DB帐户之前开发和测试应用程序。

翻译自: https://www.sqlshack.com/8-things-know-azure-cosmos-db-formerly-documentdb/

azure db 设置时区

azure db 设置时区_关于Azure Cosmos DB(以前称为DocumentDB)的8件事相关推荐

  1. azure db 设置时区_使用Azure Cosmos DB开始您的旅程

    azure db 设置时区 In this article, we will discuss why we need to use Azure Cosmos DB and how to configu ...

  2. azure db 设置时区_在Azure Cosmos DB中应用字段运算符和对象

    azure db 设置时区 Since we will sometimes require removing documents in Azure Cosmos DB, we'll want to b ...

  3. azure db 设置时区_将数据迁移到Azure Cosmos DB

    azure db 设置时区 In the previous article, Start your journey with Azure Cosmos DB, we provided you with ...

  4. mysql中如何设置时区_如何设置MySQL的时区?

    我认为这可能是有用的: 有三个位置可以在MySQL中设置时区: 在[mysqld]部分中的"my.cnf"文件中default-time-zone='+00:00' @global ...

  5. 原子设计_您需要了解的有关原子设计的4件事

    原子设计 重点 (Top highlight) Industries such as Architecture or Industrial Design have developed smart mo ...

  6. php 设置时区_为什么没有 Asia/Beijing 时区?

    在设置系统时间.开发PHP和Java程序(例如用JDBC访问MySQL数据库)的时候,有时需要选择本地时区.通常,时区列表中和中国有关的共有六个本地时区:Asia/Chongqing.Asia/Sha ...

  7. java calendar 设置时区_详解Java时区处理之Date,Calendar,TimeZone,SimpleDateFormat

    一.概述 1.问题描述 使用Java处理时间时,我们可能会经常发现时间不对,比如相差8个小时等等,其真实原因便是TimeZone.只有正确合理的运用TimeZone,才能保证系统时间无论何时都是准确的 ...

  8. java calendar 设置时区_设置calendar时区

    iOS - Swift NSTimeZone时区 前言 public class NSTimeZone : NSObject, NSCopying, NSSecureCoding NSTimeZone ...

  9. Mysql时区设置最佳实践,mysql设置时区_修改MySQL时区设置的方法

    摘要 腾兴网为您分享:修改MySQL时区设置的方法,一直播,一点开,小猿口算,汤圆等软件知识,以及都优乐,daysmatter,乐学高考app,随缘漂流瓶,虚拟软件,平安知鸟,智能证件照app,新概念 ...

最新文章

  1. uart协议_UART协议简介
  2. Best of Ruby Quiz 笔记之一:Mad Libs
  3. 数组中子数组运算常见写法
  4. C#之基本知识和语法3 - 数据类型
  5. SQL Server 2005 COM+ 目录要求 (警告)
  6. ios 中是否每一个对象(尤其是在使用多线程时),都要判断一下对象是否为nil,以防止程序闪退?...
  7. 关于SAP Commerce Cloud CORS policy的设置问题
  8. Android:日常学习笔记(8)———探究UI开发(5)
  9. 《MySQL——事务》
  10. 经典的十个机器学习算法
  11. 字符串的最长不重复字串
  12. rocketMq 顺序消费
  13. 【Hive】Hive的数据类型
  14. c语言程序设计辅导资料pdf,C语言程序设计辅导资料(修订版).pdf
  15. bing翻译API调用(java版本)
  16. 银行专业术语解释说明 超级详细
  17. 从京东618秒杀聊聊秒杀限流的多种实现!
  18. 美赛数模论文之假设写作
  19. 软考网工-第四章知识产权与标准化
  20. windows XP全公略

热门文章

  1. Fatal error: Allowed memory size of 524288000 bytes exhausted (tried to allocate 64 bytes) in D
  2. How many ways?? - hdu2157(矩阵快速幂-模板)
  3. 字符串参数传递与返回值(转)
  4. 反编译Silverlight项目
  5. VScode配置C语言环境 亲测 可用!!!
  6. JavaScript学习(二十二)—动态创建表格
  7. CCF CSP201903-1 小中大
  8. 怎么查询房贷批下来没?
  9. 临牌过期保险能理赔吗?
  10. 大众1.4t可以一直加92号汽油吗?有哪些需要注意的问题?