Skip to content

Commit 9516b83

Browse files
committed
Fixing formatting issues
1 parent a8628e8 commit 9516b83

18 files changed

+148
-126
lines changed

articles/cosmos-db/TOC.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,20 @@
114114
- name: Indexing
115115
items:
116116
- name: Overview
117+
href: indexing-overview.md
118+
- name: Indexing policy
117119
href: indexing-policies.md
118-
- name: index types
120+
- name: Index types
119121
href: index-types.md
120-
- name: index paths
122+
- name: Index paths
121123
href: index-paths.md
122124
- name: Change feed
123125
items:
124126
- name: Overview
125127
href: change-feed.md
126-
- name: Access change feed
128+
- name: Reading change feed
127129
href: change-feed-reading.md
128-
- name: change feed processor
130+
- name: Change feed processor
129131
href: change-feed-processor.md
130132
- name: Change feed with Azure Functions
131133
href: change-feed-functions.md
@@ -434,6 +436,10 @@
434436
href: how-to-create-container.md
435437
- name: Query a container
436438
href: how-to-query-container.md
439+
- name: Indexing
440+
items:
441+
- name: Configure indexing
442+
href: how-to-manage-indexing-policy.md
437443
- name : Manage
438444
items:
439445
- name: Manage using PowerShell

articles/cosmos-db/account-overview.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,28 @@ ms.reviewer: sngun
1515

1616
Azure Cosmos DB is a fully managed platform-as-a-service (PaaS). To begin using Azure Cosmos DB, you should initially create an Azure Cosmos DB account in your Azure subscription. Your Azure Cosmos DB account contains a unique DNS name and you can manage an account by using Azure portal, Azure CLI or by using different language-specific SDKs. For more information, see [how to manage your account](how-to-manage-database-account.md).
1717

18-
The Azure Cosmos DB account is the fundamental unit of global distribution and high availability. For globally distributing your data and throughput across multiple Azure regions, you can add and remove Azure regions to your account at any time. You can configure your account to have either a single or multiple write regions. For more information, see [how to add and remove Azure regions to your Cosmos account](how-to-manage-database-account.md). You can configure the [default consistency](consistency-levels.md) level on Cosmos account. Cosmos DB provides comprehensive SLAs encompassing throughput, latency at the 99th percentile, consistency, and high availability. For more information, see [Azure Cosmos DB SLAs](https://azure.microsoft.com/en-us/support/legal/sla/cosmos-db/v1_2/).
18+
The Azure Cosmos DB account is the fundamental unit of global distribution and high availability. For globally distributing your data and throughput across multiple Azure regions, you can add and remove Azure regions to your account at any time. You can configure your account to have either a single or multiple write regions. For more information, see [how to add and remove Azure regions to your Azure Cosmos account](how-to-manage-database-account.md). You can configure the [default consistency](consistency-levels.md) level on Azure Cosmos account. Azure Cosmos DB provides comprehensive SLAs encompassing throughput, latency at the 99th percentile, consistency, and high availability. For more information, see [Azure Cosmos DB SLAs](https://azure.microsoft.com/en-us/support/legal/sla/cosmos-db/v1_2/).
1919

20-
To securely manage access to all the data within your Azure Cosmos DB account, you can use the master keys associated with your account. To further secure access to your data, you can configure a VNET service endpoint and IP-firewall on your Azure Cosmos account. For more information, see [VNET and subnet access control for your Cosmos account](how-to-configure-vnet-service-endpoint.md) and [IP-firewall for your Cosmos account](how-to-configure-firewall.md).
20+
To securely manage access to all the data within your Azure Cosmos DB account, you can use the master keys associated with your account. To further secure access to your data, you can configure a VNET service endpoint and IP-firewall on your Azure Cosmos account. For more information, see [VNET and subnet access control for your Azure Cosmos account](how-to-configure-vnet-service-endpoint.md) and [IP-firewall for your Azure Cosmos account](how-to-configure-firewall.md).
21+
22+
## Elements in an Azure Cosmos account
23+
24+
Azure Cosmos DB container is the fundamental unit of scalability. You can virtually have an unlimited provisioned throughput (RU/s) and storage on a container. Azure Cosmos DB transparently partitions your container using the logical partition key that you specify in order to elastically scale your provisioned throughput and storage. For more information, see [working with Azure Cosmos containers and items](databases-containers-items.md).
2125

2226
Currently, you can create a maximum of 100 Azure Cosmos DB accounts under an Azure subscription. A single account can virtually manage unlimited amount of data and provisioned throughput. To manage your data and provisioned throughput, you can create one or more Azure Cosmos databases under your account and within that database, you can create one or more containers.
2327

24-
![Hierarchy of a Cosmos DB account](./media/account-overview/hierarchy.png)
28+
![Hierarchy of a Azure Cosmos DB account](./media/account-overview/hierarchy.png)
2529

26-
Azure Cosmos DB container is the fundamental unit of scalability. You can virtually have an unlimited provisioned throughput (RU/s) and storage on a container. Azure Cosmos DB transparently partitions your container using the logical partition key that you specify in order to elastically scale your provisioned throughput and storage. For more information, see [working with Azure Cosmos containers and items](databases-containers-items.md).
2730

2831
## Next steps
2932

30-
* [How-to manage your Cosmos account](how-to-manage-database-account.md)
33+
You can now proceed to learn how to manage your Azure Cosmos account or see other concepts associated with Azure Cosmos DB:
34+
35+
* [How-to manage your Azure Cosmos account](how-to-manage-database-account.md)
3136
* [Global distribution](distribute-data-globally.md)
3237
* [Consistency levels](consistency-levels.md)
33-
* [Working with Cosmos containers and items](databases-containers-items.md)
34-
* [VNET service endpoint for your Cosmos account](firewall-support.md)
35-
* [IP-firewall for your Cosmos account](vnet-service-endpoint.md)
36-
* [How-to add and remove Azure regions to your Cosmos account](how-to-manage-database-account.md)
37-
* [Cosmos DB SLAs](https://azure.microsoft.com/en-us/support/legal/sla/cosmos-db/v1_2/)
38+
* [Working with Azure Cosmos containers and items](databases-containers-items.md)
39+
* [VNET service endpoint for your Azure Cosmos account](firewall-support.md)
40+
* [IP-firewall for your Azure Cosmos account](vnet-service-endpoint.md)
41+
* [How-to add and remove Azure regions to your Azure Cosmos account](how-to-manage-database-account.md)
42+
* [Azure Cosmos DB SLAs](https://azure.microsoft.com/en-us/support/legal/sla/cosmos-db/v1_2/)

articles/cosmos-db/change-feed-functions.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,46 +15,50 @@ If you're using Azure Functions, the simplest way to connect to change feed is t
1515

1616
Triggers can be created in the Azure Functions portal or in the Azure Cosmos DB portal or programmatically. For more information, see [serverless database computing using Azure Cosmos DB and Azure Functions](serverless-computing-database.md).
1717

18-
## How can I configure Azure functions to read from a particular region?
18+
## Frequently asked questions
19+
20+
### How can I configure Azure functions to read from a particular region?
1921

2022
It is possible to define the [PreferredLocations](https://docs.microsoft.com/dotnet/api/microsoft.azure.documents.client.connectionpolicy.preferredlocations?view=azure-dotnet#Microsoft_Azure_Documents_Client_ConnectionPolicy_PreferredLocations) when using the Azure Cosmos DB trigger to specify a list of regions. It's same as you customize the ConnectionPolicy, to make the trigger read from your preferred regions. Ideally, you want to read from the closest region where your Azure Functions is deployed.
2123

22-
## What is the default size of batches in Azure Functions?
24+
### What is the default size of batches in Azure Functions?
2325

2426
The default size is 100 items for every invocation of Azure Functions. However, this number is configurable within the function.json file. Here is complete [list of configuration options](../azure-functions/functions-bindings-cosmosdb-v2.md#trigger---configuration). If you are developing locally, update the application settings within the local.settings.json file.
2527

26-
## I am monitoring a container and reading its change feed, however I don't get all the inserted documents, some items are missing?
28+
### I am monitoring a container and reading its change feed, however I don't get all the inserted documents, some items are missing?
2729

2830
Make sure that there is no other Azure Function reading the same container with the same lease container. The missing documents are processed by the other Azure Functions that are also using the same lease.
2931

3032
Therefore, if you are creating multiple Azure Functions to read the same change feed, they must use different lease containers or use the "leasePrefix" configuration to share the same container. However, when you use change feed processor library you can start multiple instances of your Azure Function and the SDK will divide the documents between different instances automatically for you.
3133

32-
## Azure Cosmos item is updated every second, and I don't get all the changes in Azure Functions listening to change feed?
34+
### Azure Cosmos item is updated every second, and I don't get all the changes in Azure Functions listening to change feed?
3335

3436
Azure Functions polls the change feed for changes continuously, with a maximum default delay of 5 seconds. If there are no pending changes to be read, or if there are changes pending after the trigger is applied, the function will read them right away. However, if there are no pending changes, the function will wait 5 seconds and poll for more changes.
3537

3638
If your document receives multiple changes in the same interval that took the Trigger to poll for new changes, you might receive the latest version of the document and not the intermediate one.
3739

3840
If you want to to poll change feed for less than 5 seconds, for example, for every second, you can configure the polling time "feedPollDelay", see [the complete configuration](https://docs.microsoft.com/dotnet/api/microsoft.azure.documents.client.connectionpolicy.preferredlocations?view=azure-dotnet#Microsoft_Azure_Documents_Client_ConnectionPolicy_PreferredLocations). It is defined in milliseconds with a default of 5000. Polling for less than 1 second is possible but it's not advised because you will start using more CPU memory.
3941

40-
## Can multiple Azure Functions read one container’s change feed?
42+
### Can multiple Azure Functions read one container’s change feed?
4143

4244
Yes. Multiple Azure Functions can read the same container’s change feed. However, the Azure Functions needs to have a separate “leaseCollectionPrefix” defined.
4345

44-
## If I am processing change feed by using Azure Functions, in a batch of 10 documents, and I get an error at seventh Document. In that case the last three documents are not processed how can I start processing from the failed document (i.e, seventh document) in my next feed?
46+
### If I am processing change feed by using Azure Functions, in a batch of 10 documents, and I get an error at seventh Document. In that case the last three documents are not processed how can I start processing from the failed document (i.e, seventh document) in my next feed?
4547

4648
To handle the error, the recommended pattern is to wrap your code with try-catch block and, if you are iterating over the list of documents, wrap each iteration in its own try-catch block. Catch the error and put that document on a queue (dead-letter) and then define logic to deal with the documents that produced the error. With this method if you have a 200-document batch, and just one document failed, you do not have to throw away the whole batch.
4749

4850
In case of error, you should not rewind the check point back to beginning else you will can keep getting those documents from change feed. Remember, change feed keeps the last final snap shot of the documents, because of this you may lose the previous snapshot on the document. change feed keeps only one last version of the document, and in between other processes can come and change the document.
4951

5052
As you keep fixing your code, you will soon find no documents on dead-letter queue. Azure Functions is automatically called by change feed system and check point is maintained internally by Azure Function. If you want to roll back the check point and control every aspect of it, you should consider using change feed Processor SDK.
5153

52-
## Are there any extra costs for using the Azure Cosmos DB Trigger?
54+
### Are there any extra costs for using the Azure Cosmos DB Trigger?
5355

5456
The Azure Cosmos DB Trigger leverages the Change Feed Processor library internally. As such, it requires an extra collection, called Leases collection, to maintain state and partial checkpoints. This state management is needed to be able to dynamically scale and continue in case you want to stop your Azure Functions and continue processing at a later time. To learn more, see [how to work with change feed processor library](change-feed-processor.md).
5557

5658
## Next steps
5759

60+
You can now proceed to learn more about change feed in the following articles:
61+
5862
* [Overview of change feed](change-feed.md)
5963
* [Ways to read change feed](change-feed-reading.md)
6064
* [Using change feed processor library](change-feed-processor.md)

articles/cosmos-db/change-feed-processor.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ There are four main components of implementing the change feed processor library
5454

5555
To further understand how these four elements of change feed processor work together, let's look at an example in the following diagram. The monitored collection stores documents and uses 'City' as the partition key. We see that the blue partition contains documents with the 'City' field from "A-E" and so on. There are two hosts, each with two consumers reading from the four partitions in parallel. The arrows show the consumers reading from a specific spot in the change feed. In the first partition, the darker blue represents unread changes while the light blue represents the already-read changes on the change feed. The hosts use the lease collection to store a "continuation" value to keep track of the current reading position for each consumer.
5656

57-
![Change feed processor example](./media/change-feed/change-feed-processor.png)
57+
![Change feed processor example](./media/change-feed-processor/change-feed-processor.png)
5858

5959
### Change feed and provisioned throughput
6060

@@ -68,6 +68,8 @@ You are charged for RUs consumed, since data movement in and out of Cosmos conta
6868

6969
## Next steps
7070

71+
You can now proceed to learn more about change feed in the following articles:
72+
7173
* [Overview of change feed](change-feed.md)
7274
* [Ways to read change feed](change-feed-reading.md)
7375
* [Using change feed with Azure Functions](change-feed-functions.md)

articles/cosmos-db/change-feed-reading.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.date: 11/06/2018
99
ms.author: rafats
1010

1111
---
12-
# Accessing change feed in Azure Cosmos DB
12+
# Reading Azure Cosmos DB change feed
1313

1414
You can work with the Azure Cosmos DB change feed using any of the following options:
1515

@@ -31,6 +31,8 @@ With the SDK, you get a low-level control of the change feed. You can manage the
3131

3232
## Next steps
3333

34+
You can now proceed to learn more about change feed in the following articles:
35+
3436
* [Overview of change feed](change-feed.md)
3537
* [Using change feed with Azure Functions](change-feed-functions.md)
3638
* [Using change feed processor library](change-feed-processor.md)

0 commit comments

Comments
 (0)