Use Cases of Capacity Planning
This section contains use cases of capacity planning for various kinds of CloudBlue Commerce installations:
Use Case 1: A New CloudBlue Commerce Installation
The main goal of this use case is to gather resource usage statistics and obtain correlations between various system metrics.
Analyzing
Skip this step as this is a new installation and you have not yet collected enough data to analyze.
Planning and Acting
The starting point of capacity planning is to define which amounts of resources are required for an initial CloudBlue Commerce installation that is capable of servicing about 10,000 accounts, users, or subscriptions, and to estimate the size of a Kubernetes cluster required to run that CloudBlue Commerce installation.
CloudBlue Commerce components require the following Kubernetes resources: CPU cores, RAM, and persistent storage. To learn more about Kubernetes resources, please refer to the Kubernetes documentation.
You can obtain the minimum resource requirements for every component and its containers in The Minimum Resource Requirements for System Components.
Note: You must also take into account the resources required for the monitoring and alerting solution and logging solution.
Follow these steps to estimate the size of a Kubernetes cluster required to run a set of CloudBlue Commerce components:
-
For each component that you need to install, sum:
-
the numbers of CPU cores required for running its containers
-
the amounts of RAM required for running its containers
-
-
For each component, take into account its persistent storage requirements.
-
Based on your capacity planning strategy, increase the results you obtained in steps 1 and 2 accordingly.
-
Sum the results you obtained in step 3.
-
Take into account that a cluster for CloudBlue Commerce must include at least three worker nodes, and each node must have at least 8 CPU cores and at least 4 GB of RAM per CPU core.
For example, you chose these components for installation:
Component | Container | CPU cores | RAM in GiB | Persistent storage in GiB |
---|---|---|---|---|
Component A | Container A-1 | 1.0 | 2.0 | 10.0 |
Container A-2 | 2.0 | 4.0 | ||
Component B | Container B | 3.0 | 6.0 | 0.0 |
Component C | Container C-1 | 4.0 | 8.0 | 30.0 |
Container C-2 | 5.0 | 10.0 |
For each component, you sum the numbers of CPU cores and the amounts of RAM:
Component | Container | CPU cores | RAM in GiB | Persistent storage in GiB |
---|---|---|---|---|
Component A | Container A-1 | 1.0 | 2.0 | 10.0 |
Container A-2 | 2.0 | 4.0 | ||
Subtotal | 3.0 | 6.0 | 10.0 | |
Component B | Container B | 3.0 | 6.0 | 0.0 |
Subtotal | 3.0 | 6.0 | 0.0 | |
Component C | Container C-1 | 4.0 | 8.0 | 30.0 |
Container C-2 | 5.0 | 10.0 | ||
Subtotal | 9.0 | 18.0 | 30.0 |
Based on your capacity planning strategy, you increase the results you calculated in the previous step by 40%:
Component | Container | CPU cores | RAM in GiB | Persistent storage in GiB |
---|---|---|---|---|
Component A | Container A-1 | 1.0 | 2.0 | 10.0 |
Container A-2 | 2.0 | 4.0 | ||
Subtotal + 40% | 3.0 + 40% = 4.2 | 6.0 + 40% = 8.4 | 10.0 + 40% = 14.0 | |
Component B | Container B | 3.0 | 6.0 | 0.0 |
Subtotal + 40% | 3.0 + 40% = 4.2 | 6.0 + 40% = 8.4 | 0.0 + 40% = 0.0 | |
Component C | Container C-1 | 4.0 | 8.0 | 30.0 |
Container C-2 | 5.0 | 10.0 | ||
Subtotal + 40% | 9.0 + 40% = 12.6 | 18.0 + 40% = 25.2 | 30.0 + 40% = 42.0 |
You sum the results you calculated in the previous step:
Component | Container | CPU cores | RAM in GiB | Persistent storage in GiB |
---|---|---|---|---|
Component A | Container A-1 | 1.0 | 2.0 | 10.0 |
Container A-2 | 2.0 | 4.0 | ||
Subtotal + 40% | 3.0 + 40% = 4.2 | 6.0 + 40% = 8.4 | 10.0 + 40% = 14.0 | |
Component B | Container B | 3.0 | 6.0 | 0.0 |
Subtotal + 40% | 3.0 + 40% = 4.2 | 6.0 + 40% = 8.4 | 0.0 + 40% = 0.0 | |
Component C | Container C-1 | 4.0 | 8.0 | 30.0 |
Container C-2 | 5.0 | 10.0 | ||
Subtotal + 40% | 9.0 + 40% = 12.6 | 18.0 + 40% = 25.2 | 30.0 + 40% = 42.0 | |
Total | 4.2 + 4.2 + 12.6 = 21.0 | 8.4 + 8.4 + 25.2 = 42.0 | 14.0 + 0.0 + 42.0 = 56.0 |
As a cluster for CloudBlue Commerce must include at least three worker nodes and each node must have at least 8 CPU cores and at least 4 GB of RAM per CPU core, your cluster could be made up of 3 worker nodes with 8 CPU cores and 32 GB RAM each.
Note: You can obtain the minimum requirements for the system database server that will run databases of components in The Minimum Resource Requirements for the System Database Server. You can use the same approach as described for system components to estimate the size of that database server.
You allocated resources based on the minimum CloudBlue Commerce component requirements. Provided that the growth of your customer base and the load on your installation are normal, the allocated resources will be sufficient for a period required to collect resource usage statistics and obtain correlations between various system metrics.
Here are examples of resource usage on a new CloudBlue Commerce installation:
Monitoring
Depending on your strategy of capacity planning, you must have thresholds for resource usage metrics. As soon as these thresholds are reached, you must start a new iteration of capacity planning.
For details on how to monitor a CloudBlue Commerce installation, see Monitoring.
Use Case 2: An Existing CloudBlue Commerce Installation
The goal of this use case is to understand which amounts of which resources and for what period to allocate.
Analyzing
Using the resource usage statistics you gathered on your installation, perform the following actions:
-
Identify bottlenecks. For instance, if the usage of a resource repeatedly reached its threshold, you must take that into account when planning the capacity of your installation.
-
Find the major factors that affected increases in resource usage. Note that these factors may include random events, meaning that you must filter those events from systematic trends, such as increasing the number of accounts.
The main metrics that you need to consider are the number of active accounts, the number of active users, the number of active subscriptions, the number of login operations per business day, the number of page views (in Google Analytics), the number of orders, the number of resource rates per service plan, the number of service plans, and the number of delegated service plans.
For example, below are graphs of the CPU usage by the BSS component during one business day on two different CloudBlue Commerce installations that have the same size and different load profiles. Although the numbers of accounts on these installations are the same, the CPU usage on installation B is more than the CPU usage on installation A as their load profiles significantly differ.
-
Installation A
-
Accounts: 1,000,000
-
CPU usage by the BSS component (8 CPU cores):
-
-
Installation B
-
Accounts: 1,000,000
-
CPU usage by the BSS component (16 CPU cores):
-
Planning and Acting
Estimate which amounts of which resources and for what period you need to allocate. Based on your estimations, adjust the capacity of your installation. For details on how to scale a CloudBlue Commerce installation, see Tuning.
Monitoring
Depending on your strategy of capacity planning, you must have thresholds for resource usage metrics. As soon as these thresholds are reached, you must start a new iteration of capacity planning.
For details on how to monitor a CloudBlue Commerce installation, see Monitoring.
Use Case 3: Migration to a CloudBlue Commerce Installation
The goal of this use case is to plan the capacity of a CloudBlue Commerce installation before performing a migration of a significant number of accounts, users, and subscriptions.
If you have been gathering resource usage statistics on your installation for a reasonable period, for example, one year, and already see correlations between various system metrics, you must plan the capacity of your installation based on that information. Otherwise, you can use this general approach: Increase the capacity by 30% before the number of accounts, users, or subscriptions is doubled. As the accuracy of this approach is not high, we recommend that you perform a test migration in a lab environment before performing the actual migration.
An example of this approach:
You plan to migrate 30,000 accounts to your CloudBlue Commerce installation, which services 10,000 accounts and has the following resources:
10,000 accounts
Component | Container | CPU cores | RAM in GiB | Persistent storage in GiB |
---|---|---|---|---|
Component A | Container A-1 | 1.0 | 2.0 | 10.0 |
Container A-2 | 2.0 | 4.0 | ||
Subtotal | 3.0 | 6.0 | 10.0 | |
Component B | Container B | 3.0 | 6.0 | 0.0 |
Subtotal | 3.0 | 6.0 | 0.0 | |
Component C | Container C-1 | 4.0 | 8.0 | 30.0 |
Container C-2 | 5.0 | 10.0 | ||
Subtotal | 9.0 | 18.0 | 30.0 |
To plan the capacity of your installation, for each component, you increase the amounts of resources by 30% each time when the number of accounts is doubled:
20.000 accounts
Component | Container | CPU cores | RAM in GiB | Persistent storage in GiB |
---|---|---|---|---|
Component A | Container A-1 | 1.0 | 2.0 | 10.0 |
Container A-2 | 2.0 | 4.0 | ||
Subtotal + 30% | 3.0 + 30% = 3.9 | 6.0 + 30% = 7.8 | 10.0 + 30% = 13.0 | |
Component B | Container B | 3.0 | 6.0 | 0.0 |
Subtotal + 30% | 3.0 + 30% = 3.9 | 6.0 + 30% = 7.8 | 0.0 + 30% = 0.0 | |
Component C | Container C-1 | 4.0 | 8.0 | 30.0 |
Container C-2 | 5.0 | 10.0 | ||
Subtotal + 30% | 9.0 + 30% = 11.7 | 18.0 + 30% = 23.4 | 30.0 + 30% = 39.0 |
40.000 accounts
Component | Container | CPU cores | RAM in GiB | Persistent storage in GiB |
---|---|---|---|---|
Component A | Container A-1 | 1.0 | 2.0 | 10.0 |
Container A-2 | 2.0 | 4.0 | ||
Subtotal + 30% + 30% | 3.0 + 30% + 30% = 5.07 | 6.0 + 30% + 30% = 10.14 | 10.0 + 30% + 30% = 16.9 | |
Component B | Container B | 3.0 | 6.0 | 0.0 |
Subtotal + 30% + 30% | 3.0 + 30% + 30% = 5.07 | 6.0 + 30% + 30% = 10.14 | 0.0 + 30% + 30% = 0.0 | |
Component C | Container C-1 | 4.0 | 8.0 | 30.0 |
Container C-2 | 5.0 | 10.0 | ||
Subtotal + 30% + 30% | 9.0 + 30% + 30% = 15.21 | 18.0 + 30% + 30% = 30.42 | 30.0 + 30% + 30% = 50.7 |
Finally, you calculate the total amounts of resources:
Component | Container | CPU cores | RAM in GiB | Persistent storage in GiB |
---|---|---|---|---|
Component A | Container A-1 | 1.0 | 2.0 | 10.0 |
Container A-2 | 2.0 | 4.0 | ||
Subtotal + 30% + 30% | 3.0 + 30% + 30% = 5.07 | 6.0 + 30% + 30% = 10.14 | 10.0 + 30% + 30% = 16.9 | |
Component B | Container B | 3.0 | 6.0 | 0.0 |
Subtotal + 30% + 30% | 3.0 + 30% + 30% = 5.07 | 6.0 + 30% + 30% = 10.14 | 0.0 + 30% + 30% = 0.0 | |
Component C | Container C-1 | 4.0 | 8.0 | 30.0 |
Container C-2 | 5.0 | 10.0 | ||
Subtotal + 30% + 30% | 9.0 + 30% + 30% = 15.21 | 18.0 + 30% + 30% = 30.42 | 30.0 + 30% + 30% = 50.7 | |
Total | 5.07 + 5.07 + 15.21 = 25.35 | 10.14 + 10.14 + 30.42 = 50.7 | 16.9 + 0.0 + 50.7 = 67.6 |
Use Case 4: Upgrading to CloudBlue Commerce 21.0
The main goal of this use case is to plan the size of a Kubernetes cluster that you need to prepare before upgrading to CloudBlue Commerce 21.0.
To plan the size of that Kubernetes cluster, follow these steps:
-
Sum the number of CPU cores, the amount of RAM, and the amount of disk space currently allocated for the following items of your CloudBlue Commerce 20.5 installation:
-
The OSS management node
-
The BSS application node
-
The UI and Branding nodes
-
The Kubernetes cluster running CloudBlue Commerce 20.5 extensions
-
-
Consider adding components that are not available in CloudBlue Commerce 20.5, such as CloudBlue Store. If you want to install those components during or after the upgrade, estimate the required resources as described in use case 3.
- Take into account the resources required for the monitoring and alerting solution and logging solution.
-
Take into account that a cluster for CloudBlue Commerce must include at least three worker nodes, and each node must have at least 8 CPU cores and at least 4 GB of RAM per CPU core.
To learn more on Kubernetes cluster requirements, see these sections:
-
Preparing a Kubernetes Cluster (for Azure)
-
Preparing a Kubernetes Cluster (for an on-premise infrastructure)
-
Important: The numbers you obtain after performing the steps above are estimations. After upgrading to CloudBlue Commerce 21.0, you must monitor the consumption of resources on your installation and adjust its capacity accordingly.
An example of this approach:
You are going to upgrade your CloudBlue Commerce 20.5 installation that has the following items:
Item | CPU cores | RAM in GiB | Persistent storage in GiB |
---|---|---|---|
The OSS management node | 4.0 | 16.0 | 1,000.0 |
The BSS application node | 8.0 | 32.0 | 1,000.0 |
The UI and Branding nodes | 16.0 | 64.0 | 1,000.0 |
The Kubernetes cluster running CloudBlue Commerce 20.5 extensions | 32.0 | 128.0 | 1,000.0 |
You sum the number of CPU cores, the amount of RAM, and the amount of disk space currently allocated for those items of your CloudBlue Commerce 20.5 installation:
Item | CPU cores | RAM in GiB | Persistent storage in GiB |
---|---|---|---|
The OSS management node | 4.0 | 16.0 | 1,000.0 |
The BSS application node | 8.0 | 32.0 | 1,000.0 |
The UI and Branding nodes | 16.0 | 64.0 | 1,000.0 |
The Kubernetes cluster running CloudBlue Commerce 20.5 extensions | 32.0 | 128.0 | 1,000.0 |
Total | 60.0 | 240.0 | 4,000.0 |
After the upgrade, you are going to install an additional component that has the following minimum resource requirements:
-
CPU cores: 1.0
-
RAM: 2.0 GiB
Assuming that your installation currently has 40,000 accounts, you add the required amounts of resources for that component:
Item | CPU cores | RAM in GiB | Persistent storage in GiB |
---|---|---|---|
The OSS management node | 4.0 | 16.0 | 1,000.0 |
The BSS application node | 8.0 | 32.0 | 1,000.0 |
The UI and Branding nodes | 16.0 | 64.0 | 1,000.0 |
The Kubernetes cluster running CloudBlue Commerce 20.5 extensions | 32.0 | 128.0 | 1,000.0 |
The additional component | 1.0 + 30% + 30% = 1.69 | 2.0 + 30% + 30% = 3.38 | 0.0 + 30% + 30% = 0.0 |
Total | 61.69 | 243.38 | 4,000.0 |
As a cluster for CloudBlue Commerce must include at least three worker nodes and each node must have at least 8 CPU cores and at least 4 GB of RAM per CPU core, your cluster could be made up of 8 worker nodes with 8 CPU cores and 32 GB RAM each.