---
sourceDocument: Brazil ServiceNow AI Platform Capabilities
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/servicenow-platform

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# Containerized MID Server Autoscaling

# Containerized MID Server Autoscaling {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Containerized MID Server Autoscaling

Containerized MID Servers can be deployed in a Kubernetes environment using StatefulSets with multiple replicas, enabling automatic scaling based on workload demand.
This autoscaling leverages Kubernetes Horizontal Pod Autoscaler (HPA), which adjusts the number of MID Server pods by monitoring CPU and memory metrics.
This approach ensures MID Servers scale efficiently to meet changing workload requirements.
Show full answer Show less  

## Key Features

* **StatefulSet Deployment:** MID Servers are deployed as stateful applications with persistent volumes that store configuration files and metadata, ensuring state preservation across pod restarts.
* **Persistent Volume Claims (PVC):** PVCs specify storage parameters like storage class, access modes, and storage requests, enabling MID Servers to retain essential files such as *config.xml* and sub-folders even after pods are recreated.
* **Pod Lifecycle Management:** StatefulSets guarantee that when pods are removed and replaced during scaling, the same persistent volume is reattached, allowing MID Servers to resume their state seamlessly.
* **Configuration Backup and Restore:** Since only initially empty sub-folders can be mounted on persistent volumes, configuration and metadata files must be backed up during pod shutdown and restored at startup. An init script detects environment changes and updates configurations accordingly.
* **Deployment via YAML:** Deployment requests can be exported as YAML files to create or update StatefulSet workloads, allowing declarative management of MID Server pods and their scaling behavior.
* **HPA Autoscaling Activation:** Autoscaling can be enabled on existing StatefulSet workloads by creating an HPA controller. Users can select HPA version 1 or 2 during deployment, and applying the YAML file activates autoscaling immediately.

## Key Outcomes

* Automated scaling of containerized MID Servers to efficiently handle varying workloads.
* Preservation of MID Server state and configuration across pod restarts and scaling events.
* Seamless integration with Kubernetes features for workload management and resource optimization.
* Flexibility to manage MID Server deployment and scaling declaratively using Kubernetes YAML manifests.  
MID Servers can be deployed via StatefulSet with any number of replicas. They can scale
automatically by leveraging Kubernetes Horizontal Pod Autoscaler (HPA). Horizontal Pod Autoscaler
automatically updates a workload resource (such as a Deployment or StatefulSet) to match
demand.

|-|
|   |
[ ]

{#containerized-mid-autoscaling__table_p53_ms4_nhb} Kubernetes can add or remove any numbers of stateful MID Server replicas as required by the workload. HPA only supports CPU and memory metrics. MID Servers can be deployed as a stateful application by providing the following information in the StatefulSet section of the deployment request form:

* Name
* Headless service name
* Persistent volume claim (PVC)
* Parameters, such as storage class, access modes, and storage request
* The resource request/limit
{#containerized-mid-autoscaling__ul_vv1_bcz_2wb}

The PVC declares the desired persistent volume where the MID Server stores config.xml, meta
data files, and several of its sub-folders.

During workload fluctuations, a pod with a running MID Server container can be removed and
replaced by a new one. StatefulSet ensures the same persistent volume is attached to the new
pod, which allows the MID Server to resume its state.

The only sub-folders that can be mounted to the persistent volume are those that are initially
empty with a new MID Server installation. The config.xml file and other
meta data files must be backed up when the pod is shut down and restored during start-up.

Deployment requests exported as YAML files can be used to create a StatefulSet workload and
new MID Server pods in the Kubernetes cluster.

When you make changes to the deployment YAML file and re-apply it, the existing pods of the deployment are recreated. With StatefulSet deployment, the configuration files are restored from the backup folder. The init script must
detect the deployment environment changes and apply them to the configuration files before MID server is started.

## HPA Autoscaling activation {#containerized-mid-autoscaling__section_g45_r2z_2wb}

HPA Autoscaling can be activated for any existing StatefulSet workload by creating an HPA
controller.

When you create a deployment request, you can choose either HPA version 1 or version
2.

When creating a deployment request on the instance with an HPA configuration, apply the
exported YAML file and HPA autoscaling begins working immediately.

