---
title: "What are the key steps involved in enabling autoscaling for my application?"
date: "2025-05-08T06:04:45+00:00"
summary: "Learn how to enable autoscaling for your app with our step-by-step guide. Integrate monitoring scripts and configure settings for optimal performance."
image:
type: "article"
url: "/acquia-cloud-platform/add-ons/node-js/help/68646-what-are-key-steps-involved-enabling-autoscaling-my-application"
id: "765c225a-237b-4f73-a1a6-a81933a36851"
---

To enable autoscaling for your application through a standalone monitoring script:

1\. Integrate the provided acquia-autoscaling.js file into your project.

   This script collects and exposes the performance metrics necessary for auto-scaling decisions.

2\. Place the acquia-autoscaling.js file in the root of your project directory.

3\. Modify the start command of your package.json to include the acquia-autoscaling.js file.

4\. Install the prom-client dependency in the package.json with the following command:  
 

    npm install prom-client

For example, if your original start command was node server.js, change it to:

    "start": "NODE_OPTIONS='-r ./acquia-autoscaling.js' node server.js"

For example, if your original start command was next start, change it to:

    "start": "NODE_OPTIONS='-r ./acquia-autoscaling.js' next start"

This ensures that the monitoring script runs before your application starts. It makesthe metrics available and enables us to scale your application based on these metrics.  
  
Place `NODE_OPTIONS='-r ./acquia-autoscaling.js'` immediately before the main entry point command of the Node.js application as shown in the preceding example. Placing it elsewhere in the startup command does not enable autoscaling.

Note: Autoscaling is not enabled if the monitoring script is not configured