Scale replicas/instances | Scale | Northflank Application docs
v1

Scale /

Scale replicas/instances

You can increase or decrease the number of running instances of your deployed services to meet demand.

The Northflank load-balancer will automatically ensure an even distribution of traffic to each running instance, avoiding containers that are initialising, terminating, or failing.

Each instance created will have the same resources (compute power, memory and storage) as configured in the service.

Scaling a database or addon will create additional replicas of the database or storage to increase availability, however this works differently depending on the type of database/addon.

Scaling the number of instances for a deployment service in the Northflank application

Scaling a service

You can increase or decrease the number of instances from the service overview using the scaling button in the header, or from the resources page.

Each instance will have the same resources as is configured for the service and Northflank will begin sending traffic to the new containers when they enter a healthy state.

Scaling a service to 0 instances will make it unavailable. If you leave CI enabled the service will still build the latest commit to the linked repository, if you leave CD enabled it will also deploy that latest build when scaled up again.

Scaling a database

You can select the number of replica sets your database will use to increase availability, these replica sets contain a copy of the database to improve availability.

Databases can be scaled up from the resources page but cannot be scaled down. Any increase will be permanent.

See database scaling for more detailed information.

Set the grace period for containers

You can set the grace period (in seconds) allowed for a container to complete its shutdown phase in combined services, deployment services, and jobs. The grace period defines the maximum amount of time between a container receiving a SIGKILL after being sent a SIGTERM. By default, the grace period is 30 seconds.

You may want to increase this if your application includes processes which require being shutdown gracefully, and are terminated prematurely by SIGKILL.

The container may terminate earlier if the workload finishes executing before the grace period expires.

© 2024 Northflank Ltd. All rights reserved.