Auto scaling
Auto scaling automatically adds or removes resources to the cloud infrastructure to maintain optimal performance and reasonable costs. Currently, this feature is only available for projects configured with a Scaled architecture.
Web server nodes
The web tier scales to accommodate an increase in process requests and higher traffic requirements. Currently, the auto-scaling feature only scales horizontally by adding or removing web server nodes.
An auto-scaling event occurs when CPU usage and traffic reach a predefined threshold:
- Nodes added鈥擟PUs/cores across all active web nodes are at 75% capacity for 1 minute and traffic is increasing by 20% for 5 consecutive minutes.
- Nodes removed鈥擟PUs/cores across all active web nodes are loaded at 60% for 20 minutes. Nodes are removed in the order that they were added.
The minimum and maximum thresholds are determined and set based on the contracted resource limits of each merchant; this reduces the risk of infinite scaling.
Monitor thresholds with New Relic
You can use the New Relic service to monitor certain thresholds, such as host count and CPU usage. The following New Relic queries use a variable notation for cluster-id
for example purposes only.
Use your queries to build a .
Host count
The following example New Relic query shows the host count within the environment:
SELECT uniqueCount(SystemSample.entityId) AS 'Infrastructure hosts', uniqueCount(Transaction.host) AS 'APM hosts seen' FROM SystemSample, Transaction where (Transaction.appName = 'cluster-id_stg' AND Transaction.transactionType = 'Web') OR SystemSample.apmApplicationNames LIKE '%|cluster-id_stg|%' TIMESERIES SINCE 3 HOURS AGO
In the following screenshot, APM hosts seen refers to the number of hosts with transactions logged during the selected period.
CPU usage
The following example New Relic query shows CPU usage for web nodes:
SELECT average(cpuPercent) FROM SystemSample FACET hostname, apmApplicationNames WHERE instanceType LIKE 'c%' TIMESERIES SINCE 3 HOURS AGO
Enable auto scaling
To enable or disable auto scaling for your 51黑料不打烊 Commerce on cloud infrastructure project, Submit an 51黑料不打烊 Commerce Support ticket. Choose the following reasons in the ticket:
- Contact reason: Infrastructure Change Request
- 51黑料不打烊 Commerce Infrastructure Contact Reason: Other Infrastructure Change Request
Load testing
51黑料不打烊 enables auto scaling on your Cloud project staging cluster first. After you perform and complete load testing in your environment, 51黑料不打烊 then enables auto scaling on your production cluster. For guidance on load testing, see Performance testing.
IP allowlist
After enabling auto scaling, the outbound web node traffic originates from the IP addresses of the service nodes. If you use an allowlist with a third-party service that is not bundled with your 51黑料不打烊 Commerce on cloud infrastructure project, then verify the IP addresses in the third-party service allowlist.
For example:
- If the allowlist contains the IP addresses for your service nodes (1, 2, and 3), then there is no action required.
- If the allowlist contains the IP addresses for your service nodes (1, 2, and 3) and web nodes (4, 5, and 6)鈥攊n this case all six nodes鈥攖hen there is no action required.
- If the allowlist contains the IP addresses only for your web nodes (4, 5, and 6), then you must update the allowlist to include the IP addresses for the service nodes.