Skip to content

Commit dfac19d

Browse files
authored
Merge pull request #104391 from HeidiSteen/heidist-toc
[Azure Cognitive Search] Scale/performance TOC and doc updates
2 parents a00e1d4 + 6d88247 commit dfac19d

File tree

4 files changed

+111
-114
lines changed

4 files changed

+111
-114
lines changed

articles/search/TOC.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@
105105
href: search-sku-tier.md
106106
- name: Service limits
107107
href: search-limits-quotas-capacity.md
108-
- name: Scale partitions and replicas
108+
- name: Adjust capacity
109109
href: search-capacity-planning.md
110-
- name: Deployment strategies and best practices
110+
- name: Scale for performance
111111
href: search-performance-optimization.md
112112
- name: Multitenant architecture
113113
href: search-modeling-multitenant-saas-applications.md
Lines changed: 30 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Scale capacity for query and index workloads
2+
title: Adjust capacity for query and index workloads
33
titleSuffix: Azure Cognitive Search
44
description: Adjust partition and replica computer resources in Azure Cognitive Search, where each resource is priced in billable search units.
55

@@ -8,68 +8,60 @@ author: HeidiSteen
88
ms.author: heidist
99
ms.service: cognitive-search
1010
ms.topic: conceptual
11-
ms.date: 11/04/2019
11+
ms.date: 02/14/2020
1212
---
1313

14-
# Scale up partitions and replicas to add capacity for query and index workloads in Azure Cognitive Search
14+
# Adjust capacity in Azure Cognitive Search
1515

16-
After you [choose a pricing tier](search-sku-tier.md) and [provision a search service](search-create-service-portal.md), the next step is to optionally increase the number of replicas or partitions used by your service. Each tier offers a fixed number of billing units. This article explains how to allocate those units to achieve an optimal configuration that balances your requirements for query execution, indexing, and storage.
16+
Before [provisioning a search service](search-create-service-portal.md) and locking in a specific pricing tier, take a few minutes to understand the role of replicas and partitions in a service, whether you need proportionally larger or faster partitions, and how you might configure the service for expected load.
1717

18-
Resource configuration is available when you set up a service at the [Basic tier](https://aka.ms/azuresearchbasic) or one of the [Standard or Storage Optimized tiers](search-limits-quotas-capacity.md). For services at these tiers, capacity is purchased in increments of *search units* (SUs) where each partition and replica counts as one SU.
19-
20-
Using fewer SUs results in a proportionally lower bill. Billing is in effect for as long as the service is set up. If you are temporarily not using a service, the only way to avoid billing is by deleting the service and then re-creating it when you need it.
21-
22-
> [!Note]
23-
> Deleting a service deletes everything on it. There is no facility within Azure Cognitive Search for backing up and restoring persisted search data. To redeploy an existing index on a new service, you should run the program used to create and load it originally.
18+
Capacity is a function of the [tier you choose](search-sku-tier.md) (tiers determine hardware characteristics), and the replica and partition combination necessary for projected workloads. This article focuses on replica and partition combinations and interactions.
2419

2520
## Terminology: replicas and partitions
26-
Replicas and partitions are the primary resources that back a search service.
2721

28-
| Resource | Definition |
29-
|----------|------------|
30-
|*Partitions* | Provides index storage and I/O for read/write operations (for example, when rebuilding or refreshing an index).|
31-
|*Replicas* | Instances of the search service, used primarily to load balance query operations. Each replica always hosts one copy of an index. If you have 12 replicas, you will have 12 copies of every index loaded on the service.|
22+
|||
23+
|-|-|
24+
|*Partitions* | Provides index storage and I/O for read/write operations (for example, when rebuilding or refreshing an index). Each partition has a share of the total index. If you allocate three partitions, your index is divided into thirds. |
25+
|*Replicas* | Instances of the search service, used primarily to load balance query operations. Each replica is one copy of an index. If you allocate three replicas, you'll have three copies of an index available for servicing query requests.|
3226

33-
> [!NOTE]
34-
> There is no way to directly manipulate or manage which indexes run on a replica. One copy of each index on every replica is part of the service architecture.
35-
>
27+
## How to allocate replicas and partitions
3628

29+
Initially, a service is allocated a minimal level of resources consisting of one partition and one replica.
3730

38-
## How to allocate replicas and partitions
39-
In Azure Cognitive Search, a service is initially allocated a minimal level of resources consisting of one partition and one replica. For tiers that support it, you can incrementally adjust computational resources by increasing partitions if you need more storage and I/O, or add more replicas for larger query volumes or better performance. A single service must have sufficient resources to handle all workloads (indexing and queries). You cannot subdivide workloads among multiple services.
31+
A single service must have sufficient resources to handle all workloads (indexing and queries). Neither workload runs in the background. You can schedule indexing for times when query requests are naturally less frequent, but the service will not otherwise prioritize one task over another.
4032

41-
To increase or change the allocation of replicas and partitions, we recommend using the Azure portal. The portal enforces limits on allowable combinations that stay below maximum limits. If you require a script-based or code-based provisioning approach, the [Azure PowerShell](search-manage-powershell.md) or the [Management REST API](https://docs.microsoft.com/rest/api/searchmanagement/services) are alternative solutions.
33+
When modifying the allocation of replicas and partitions, we recommend using the Azure portal. The portal enforces limits on allowable combinations that stay below maximum limits of a tier. However, if you require a script-based or code-based provisioning approach, the [Azure PowerShell](search-manage-powershell.md) or the [Management REST API](https://docs.microsoft.com/rest/api/searchmanagement/services) are alternative solutions.
4234

43-
Generally, search applications need more replicas than partitions, particularly when the service operations are biased toward query workloads. The section on [high availability](#HA) explains why.
35+
As a general rule, search applications tend to need more replicas than partitions, particularly when the service operations are biased toward query workloads. The section on [high availability](#HA) explains why.
4436

4537
1. Sign in to the [Azure portal](https://portal.azure.com/) and select the search service.
4638

47-
2. In **Settings**, open the **Scale** page to modify replicas and partitions.
39+
1. In **Settings**, open the **Scale** page to modify replicas and partitions.
4840

4941
The following screenshot shows a standard service provisioned with one replica and partition. The formula at the bottom indicates how many search units are being used (1). If the unit price was $100 (not a real price), the monthly cost of running this service would be $100 on average.
5042

5143
![Scale page showing current values](media/search-capacity-planning/1-initial-values.png "Scale page showing current values")
5244

53-
3. Use the slider to increase or decrease the number of partitions. The formula at the bottom indicates how many search units are being used.
45+
1. Use the slider to increase or decrease the number of partitions. The formula at the bottom indicates how many search units are being used.
5446

5547
This example doubles capacity, with two replicas and partitions each. Notice the search unit count; it is now four because the billing formula is replicas multiplied by partitions (2 x 2). Doubling capacity more than doubles the cost of running the service. If the search unit cost was $100, the new monthly bill would now be $400.
5648

5749
For the current per unit costs of each tier, visit the [Pricing page](https://azure.microsoft.com/pricing/details/search/).
5850

5951
![Add replicas and partitions](media/search-capacity-planning/2-add-2-each.png "Add replicas and partitions")
6052

61-
3. Click **Save** to confirm the changes.
53+
1. Click **Save** to confirm the changes.
6254

6355
![Confirm changes to scale and billing](media/search-capacity-planning/3-save-confirm.png "Confirm changes to scale and billing")
6456

6557
Changes in capacity take several hours to complete. You cannot cancel once the process has started and there is no real-time monitoring for replica and partition adjustments. However, the following message remains visible while changes are underway.
6658

6759
![Status message in the portal](media/search-capacity-planning/4-updating.png "Status message in the portal")
6860

69-
7061
> [!NOTE]
71-
> After a service is provisioned, it cannot be upgraded to a higher SKU. You must create a search service at the new tier and reload your indexes. See [Create an Azure Cognitive Search service in the portal](search-create-service-portal.md) for help with service provisioning.
62+
> After a service is provisioned, it cannot be upgraded to a higher tier. You must create a search service at the new tier and reload your indexes. See [Create an Azure Cognitive Search service in the portal](search-create-service-portal.md) for help with service provisioning.
7263
>
64+
> Additionally, partitions and replicas are managed exclusively and internally by the service. There is no concept of processor affinity, or assigning a workload to a specific node.
7365
>
7466
7567
<a id="chart"></a>
@@ -96,10 +88,10 @@ SUs, pricing, and capacity are explained in detail on the Azure website. For mor
9688
> The number of replicas and partitions divides evenly into 12 (specifically, 1, 2, 3, 4, 6, 12). This is because Azure Cognitive Search pre-divides each index into 12 shards so that it can be spread in equal portions across all partitions. For example, if your service has three partitions and you create an index, each partition will contain four shards of the index. How Azure Cognitive Search shards an index is an implementation detail, subject to change in future releases. Although the number is 12 today, you shouldn't expect that number to always be 12 in the future.
9789
>
9890
99-
10091
<a id="HA"></a>
10192

10293
## High availability
94+
10395
Because it's easy and relatively fast to scale up, we generally recommend that you start with one partition and one or two replicas, and then scale up as query volumes build. Query workloads run primarily on replicas. If you need more throughput or high availability, you will probably require additional replicas.
10496

10597
General recommendations for high availability are:
@@ -112,31 +104,27 @@ Service level agreements (SLA) for Azure Cognitive Search are targeted at query
112104

113105
Basic tier tops out at one partition and three replicas. If you want the flexibility to immediately respond to fluctuations in demand for both indexing and query throughput, consider one of the Standard tiers. If you find your storage requirements are growing much more rapidly than your query throughput, consider one of the Storage Optimized tiers.
114106

115-
### Index availability during a rebuild
107+
## Disaster recovery
116108

117-
High availability for Azure Cognitive Search pertains to queries and index updates that don't involve rebuilding an index. If you delete a field, change a data type, or rename a field, you will need to rebuild the index. To rebuild the index, you must delete the index, re-create the index, and reload the data.
109+
Currently, there is no built-in mechanism for disaster recovery. Adding partitions or replicas would be the wrong strategy for meeting disaster recovery objectives. The most common approach is to add redundancy at the service level by setting up a second search service in another region. As with availability during an index rebuild, the redirection or failover logic must come from your code.
118110

119-
> [!NOTE]
120-
> You can add new fields to an Azure Cognitive Search index without rebuilding the index. The value of the new field will be null for all documents already in the index.
111+
## Estimate replicas
121112

122-
When rebuilding the index there will be a period of time when the data is being added to the new index. If you would like to continue to make your old index available during this time, you must have a copy of the old index with a different name on the same service, or a copy of the index with the same name on a different service, and then provide redirection or failover logic in your code.
113+
On a production service, you should allocate three replicas for SLA purposes. If you experience slow query performance, one remedy is to add replicas so that additional copies of the index are brought online to support bigger query workloads and to load balance the requests over the multiple replicas.
123114

124-
## Disaster recovery
125-
Currently, there is no built-in mechanism for disaster recovery. Adding partitions or replicas would be the wrong strategy for meeting disaster recovery objectives. The most common approach is to add redundancy at the service level by setting up a second search service in another region. As with availability during an index rebuild, the redirection or failover logic must come from your code.
115+
We do not provide guidelines on how many replicas are needed to accommodate query loads. Query performance depends on the complexity of the query and competing workloads. Although adding replicas clearly results in better performance, the result is not strictly linear: adding three replicas does not guarantee triple throughput.
126116

127-
## Increase query performance with replicas
128-
Query latency is an indicator that additional replicas are needed. Generally, a first step toward improving query performance is to add more of this resource. As you add replicas, additional copies of the index are brought online to support bigger query workloads and to load balance the requests over the multiple replicas.
117+
For guidance in estimating QPS for your solution, see [Scale for performance](search-performance-optimization.md)and [Monitor queries](search-monitor-queries.md)
129118

130-
We cannot provide hard estimates on queries per second (QPS): query performance depends on the complexity of the query and competing workloads. Although adding replicas clearly results in better performance, the result is not strictly linear: adding three replicas does not guarantee triple throughput.
119+
## Estimate partitions
131120

132-
For guidance in estimating QPS for your workloads, see [Azure Cognitive Search performance and optimization considerations](search-performance-optimization.md).
121+
The [tier you choose](search-sku-tier.md) determines partition size and speed, and each tier is optimized around a set of characteristics that fit various scenarios. If you choose a higher-end tier, you might need fewer partitions than if you go with S1.
133122

134-
## Increase indexing performance with partitions
135123
Search applications that require near real-time data refresh will need proportionally more partitions than replicas. Adding partitions spreads read/write operations across a larger number of compute resources. It also gives you more disk space for storing additional indexes and documents.
136124

137125
Larger indexes take longer to query. As such, you might find that every incremental increase in partitions requires a smaller but proportional increase in replicas. The complexity of your queries and query volume will factor into how quickly query execution is turned around.
138126

139-
140127
## Next steps
141128

142-
[Choose a pricing tier for Azure Cognitive Search](search-sku-tier.md)
129+
> [!div class="nextstepaction"]
130+
> [Choose a pricing tier for Azure Cognitive Search](search-sku-tier.md)

0 commit comments

Comments
 (0)