---
title: "Scale inference service"
sidebar_label: "Scale inference service"
sidebar_position: 2
description: "How to scale an inference service and change the number of inference instances"
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import {TabItemLabel} from '@selectel/docux/components';
import Formbricks from '@theme/MDXComponents/Formbricks';

# Scale inference service

To use inference service resources optimally, you can scale it depending on the load:

* configure a fixed number of inference instances — deployed model instances. For example, increase the number of inference instances when the request count grows or decrease it if the number of requests has dropped;

* or configure autoscaling. The number of inference instances will change automatically within the specified range depending on the number of requests and their processing time.

To scale an inference service, [change the number of inference instances](#change-number-of-inference-instances).

## Change the number of inference instances \{#change-number-of-inference-instances}

You can use a fixed number of inference instances or configure autoscaling.

<Tabs queryString="change-number-of-inference-instances">
  <TabItem value="fixed-quantity">
    <TabItemLabel>
      Fixed number
    </TabItemLabel>

    1. In the [Control panel](https://my.selectel.ru/ml/default/inference-services/), on the top menu, click **Products** and select **Inference services**.

    2. Open the inference service page → **Service** tab.

    3. In the **Service autoscaling** block, click **Edit**.

    4. Open the **Fixed** tab and specify the number of inference instances.

    5. Click **Save**. Changing scaling settings may take more than 10 minutes. During this time, the inference service will be unavailable.
  </TabItem>

  <TabItem value="autoscaling">
    <TabItemLabel>
      Autoscaling
    </TabItemLabel>

    1. In the [Control panel](https://my.selectel.ru/ml/default/inference-services/), on the top menu, click **Products** and select **Inference services**.

    2. Open the inference service page → **Service** tab.

    3. In the **Service autoscaling** block, click **Edit**.

    4. Open the **Autoscaling** tab and set the minimum and maximum number of inference instances. The number of inference instances will change automatically within the specified range depending on the number of requests to the model and their processing time.

    5. Click **Save**. Changing scaling settings may take more than 10 minutes. During this time, the inference service will be unavailable.
  </TabItem>
</Tabs>

<Formbricks />
