You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -36,7 +36,7 @@ For more information about the classic subscription administrator roles, see [Cl
36
36
We support all Office365 roles in the Azure AD Roles and Administrators portal experience, such as Exchange Administrator and SharePoint Administrator, but we don't support specific roles within Exchange RBAC or SharePoint RBAC. For more information about these Office 365 services, see [Office 365 admin roles](https://docs.microsoft.com/office365/admin/add-users/about-admin-roles).
37
37
38
38
> [!NOTE]
39
-
> Eligible users for SharePoint Administrator role as well as any roles trying to access the Microsoft Security and Compliance Center might experience delays of up to a few hours after activating their role. We are working with those teams to fix the issues.
39
+
> Eligible users for the SharePoint administrator role, the Device administrator role, and any roles trying to access the Microsoft Security and Compliance Center might experience delays of up to a few hours after activating their role. We are working with those teams to fix the issues.
Application Gateway and WAF can be configured to scale in two modes:
129
130
130
-
- **Autoscaling** - With autoscaling enabled, the Application Gateway and WAF v2 SKUs scale up or down based on application traffic requirements. This mode offers better elasticity to your application and eliminates the need to guess the application gateway size or instance count. This mode also allows you to save cost by not requiring the gateway to run at peak provisioned capacity for anticipated maximum traffic load. You must specify a minimum and optionally maximum instance count. Minimum capacity ensures that Application Gateway and WAF v2 don't fall below the minimum instance count specified, even in the absence of traffic. Each instance counts as 10 additional reserved Capacity Units. Zero signifies no reserved capacity and is purely autoscaling in nature. Please note that zero additional minimum instances still ensures high availability of the service which is always included with fixed price. You can also optionally specify a maximum instance count, which ensures that the Application Gateway doesn't scale beyond the specified number of instances. You'll continue to be billed for the amount of traffic served by the Gateway. The instance counts can range from 0 to 125. The default value for maximum instance count is 20 if not specified.
131
+
- **Autoscaling** - With autoscaling enabled, the Application Gateway and WAF v2 SKUs scale up or down based on application traffic requirements. This mode offers better elasticity to your application and eliminates the need to guess the application gateway size or instance count. This mode also allows you to save cost by not requiring the gateway to run at peak provisioned capacity for anticipated maximum traffic load. You must specify a minimum and optionally maximum instance count. Minimum capacity ensures that Application Gateway and WAF v2 don't fall below the minimum instance count specified, even in the absence of traffic. Each instance is roughly equivalent to 10 additional reserved Capacity Units. Zero signifies no reserved capacity and is purely autoscaling in nature. You can also optionally specify a maximum instance count, which ensures that the Application Gateway doesn't scale beyond the specified number of instances. You will only be billed for the amount of traffic served by the Gateway. The instance counts can range from 0 to 125. The default value for maximum instance count is 20 if not specified.
131
132
-**Manual** - You can alternatively choose Manual mode where the gateway won't autoscale. In this mode, if there is more traffic than what Application Gateway or WAF can handle, it could result in traffic loss. With manual mode, specifying instance count is mandatory. Instance count can vary from 1 to 125 instances.
132
133
134
+
## Autoscaling and High Availability
135
+
136
+
Azure Application Gateways are always deployed in a highly available fashion. The service is made out of multiple instances that are created as configured (if autoscaling is disabled) or required by the application load (if autoscaling is enabled). Note that from the user's perspective you do not necessarily have visibility into the individual instances, but just into the Application Gateway service as a whole. If a certain instance has a problem and stops being functional, Azure Application Gateway will transparently create a new instance.
137
+
138
+
Please note that even if you configure autoscaling with zero minimum instances the service will still be highly available, which is always included with the fixed price.
139
+
140
+
However, creating a new instance can take some time (around six or seven minutes). Hence, if you do not want to cope with this downtime you can configure a minimum instance count of 2, ideally with Availability Zone support. This way you will have at least two instances inside of your Azure Application Gateway under normal circumstances, so if one of them had a problem the other will try to cope with the traffic, during the time a new instance is being created. Note that an Azure Application Gateway instance can support around 10 Capacity Units, so depending on how much traffic you typically have you might want to configure your minimum instance autoscaling setting to a value higher than 2.
141
+
133
142
## Feature comparison between v1 SKU and v2 SKU
134
143
135
144
The following table compares the features available with each SKU.
Copy file name to clipboardExpand all lines: articles/cosmos-db/create-sql-api-java-changefeed.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Create an end-to-end Azure Cosmos DB Java SDK v4 application sample by using Change Feed
3
-
description: This how-to guide walks you through a simple Java SQL API application which inserts documents into an Azure Cosmos DB container, while maintaining a materialized view of the container using Change Feed.
4
-
author: anfeldma
3
+
description: This guide walks you through a simple Java SQL API application which inserts documents into an Azure Cosmos DB container, while maintaining a materialized view of the container using Change Feed.
4
+
author: anfeldma-ms
5
5
ms.service: cosmos-db
6
6
ms.subservice: cosmosdb-sql
7
7
ms.devlang: java
@@ -10,7 +10,7 @@ ms.date: 05/08/2020
10
10
ms.author: anfeldma
11
11
---
12
12
13
-
# How to create a Java application that uses Azure Cosmos DB SQL API and Change Feed Processor
13
+
# How to create a Java application that uses Azure Cosmos DB SQL API and change feed processor
14
14
15
15
> [!IMPORTANT]
16
16
> For more information on Azure Cosmos DB Java SDK v4, please view the Azure Cosmos DB Java SDK v4 Release notes, [Maven repository](https://mvnrepository.com/artifact/com.azure/azure-cosmos), Azure Cosmos DB Java SDK v4 [performance tips](performance-tips-java-sdk-v4-sql.md), and Azure Cosmos DB Java SDK v4 [troubleshooting guide](troubleshoot-java-sdk-v4-sql.md).
@@ -28,11 +28,11 @@ This how-to guide walks you through a simple Java application which uses the Azu
28
28
29
29
## Background
30
30
31
-
The Azure Cosmos DB Change Feed provides an event-driven interface to trigger actions in response to document insertion. This has many uses. For example in applications which are both read and write heavy, a chief use of Change Feed is to create a real-time **materialized view** of a container as it is ingesting documents. The materialized view container will hold the same data but partitioned for efficient reads, making the application both read and write efficient.
31
+
The Azure Cosmos DB change feed provides an event-driven interface to trigger actions in response to document insertion. This has many uses. For example in applications which are both read and write heavy, a chief use of change feed is to create a real-time **materialized view** of a container as it is ingesting documents. The materialized view container will hold the same data but partitioned for efficient reads, making the application both read and write efficient.
32
32
33
-
The work of managing Change Feed events is largely taken care of by the Change Feed Processor library built into the SDK. This library is powerful enough to distribute Change Feed events among multiple workers, if that is desired. All you have to do is provide the Change Feed library a callback.
33
+
The work of managing change feed events is largely taken care of by the change feed Processor library built into the SDK. This library is powerful enough to distribute change feed events among multiple workers, if that is desired. All you have to do is provide the change feed library a callback.
34
34
35
-
This simple example demonstrates Change Feed Processor library with a single worker creating and deleting documents from a materialized view.
35
+
This simple example demonstrates change feed Processor library with a single worker creating and deleting documents from a materialized view.
36
36
37
37
## Setup
38
38
@@ -70,7 +70,7 @@ mvn clean package
70
70
71
71
***InventoryContainer** - The inventory record for our example grocery store, partitioned on item ```id``` which is a UUID.
72
72
***InventoryContainer-pktype** - A materialized view of the inventory record, optimized for queries over item ```type```
73
-
***InventoryContainer-leases** - A leases container is always needed forChange Feed; leases track the app's progressin reading the Change Feed.
73
+
***InventoryContainer-leases** - A leases container is always needed forchange feed; leases track the app's progressin reading the change feed.
Press enter to start creating the materialized view...
83
83
```
84
84
85
-
Press enter. Now the following block of code will execute and initialize the Change Feed processor on another thread:
85
+
Press enter. Now the following block of code will execute and initialize the change feed processor on another thread:
86
86
87
87
### <a id="java4-connection-policy-async"></a>Java SDK V4 (Maven com.azure::azure-cosmos) Async API
88
88
@@ -95,7 +95,7 @@ mvn clean package
95
95
})
96
96
.subscribe();
97
97
98
-
while (!isProcessorRunning.get()); //Wait forChange Feed processor start
98
+
while (!isProcessorRunning.get()); //Wait forchange feed processor start
99
99
```
100
100
101
101
```"SampleHost_1"``` is the name of the Change Feed processor worker. ```changeFeedProcessorInstance.start()``` is what actually starts the Change Feed processor.
1. Press enter again in the terminal. This will trigger 10 documents to be inserted into **InventoryContainer**. Each document insertion appears in the Change Feed as JSON; the following callback code handles these events by mirroring the JSON documents into a materialized view:
107
+
1. Press enter again in the terminal. This will trigger 10 documents to be inserted into **InventoryContainer**. Each document insertion appears in the change feed as JSON; the following callback code handles these events by mirroring the JSON documents into a materialized view:
108
108
109
109
### <a id="java4-connection-policy-async"></a>Java SDK V4 (Maven com.azure::azure-cosmos) Async API
1. Now, in Data Explorer navigate to **InventoryContainer-pktype > items**. This is the materialized view - the items in this container mirror **InventoryContainer** because they were inserted programmatically by Change Feed. Note the partition key (```type```). So this materialized view is optimized for queries filtering over ```type```, which would be inefficient on **InventoryContainer** because it is partitioned on ```id```.
140
+
1. Now, in Data Explorer navigate to **InventoryContainer-pktype > items**. This is the materialized view - the items in this container mirror **InventoryContainer** because they were inserted programmatically by change feed. Note the partition key (```type```). So this materialized view is optimized for queries filtering over ```type```, which would be inefficient on **InventoryContainer** because it is partitioned on ```id```.
The Change Feed```feedPollDelay``` is set to 100ms; therefore, Change Feed responds to this update almost instantly and calls ```updateInventoryTypeMaterializedView()``` shown above. That last functioncall will upsert the new document with TTL of 5sec into **InventoryContainer-pktype**.
179
+
The change feed```feedPollDelay``` is set to 100ms; therefore, change feed responds to this update almost instantly and calls ```updateInventoryTypeMaterializedView()``` shown above. That last functioncall will upsert the new document with TTL of 5sec into **InventoryContainer-pktype**.
180
180
181
181
The effect is that after about 5 seconds, the document will expire and be deleted from both containers.
182
182
183
-
This procedure is necessary because Change Feed only issues events on item insertion or update, not on item deletion.
183
+
This procedure is necessary because change feed only issues events on item insertion or update, not on item deletion.
184
184
185
185
1. Press enter one more time to close the program and clean up its resources.
0 commit comments