Auto scaling automatically adds or removes resources to the cloud infrastructure in order to maintain optimal performance and reasonable costs. Currently, this feature is only available for projects configured with a Scaled architecture.
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:
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.
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.
For a reference on building queries, see NRQL syntax, clauses, and functions in the New Relic documentation.
Use your queries to build a New Relic dashboard.
The following example New Relic query shows 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.
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
To enable or disable auto scaling for your Adobe Commerce on cloud infrastructure project, Submit an Adobe Commerce Support ticket. Choose the following reasons in the ticket:
The auto-scaling feature captures unanticipated events. Even if you have auto scaling enabled, Adobe recommends that you continue to Submit an Adobe Commerce Support ticket if you expect an upcoming event.
Adobe enables auto scaling on your Cloud project staging cluster first. After you perform and complete load testing in your Staging environment, Adobe then enables auto scaling on your production cluster. For guidance on load testing, see Performance testing.
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 Adobe Commerce on cloud infrastructure project, then you may need to update the IP addresses in the third-party service allowlist.