Batch accounts and Azure Storage accounts

An Azure Batch account is a uniquely identified entity within the Batch service. Many Batch solutions use Azure Storage for storing resource files and output files, so each Batch account can be optionally associated with a corresponding storage account.

Batch accounts

All processing and resources are associated with a Batch account. When your application makes a request against the Batch service, it authenticates the request using the Azure Batch account name, the URL of the account, and either an access key or a Microsoft Entra token.

You can run multiple Batch workloads in a single Batch account. You can also distribute your workloads among Batch accounts that are in the same subscription but located in different Azure regions.

You can create a Batch account using the Azure portal or programmatically, such as with the Batch Management .NET library. When creating the account, you can associate an Azure storage account for storing job-related input and output data or applications.

When you create a Batch account, you can choose between user subscription and Batch service pool allocation modes. For most cases, you should use the default Batch service pool allocation mode. In Batch service mode, compute and virtual machine (VM)-related resources for pools are allocated on Batch service managed Azure subscriptions.

In user subscription pool allocation mode, compute and VM-related resources for pools are created directly in the Batch account subscription when a pool is created. In scenarios where you create a Batch pool in a virtual network that you specify, certain networking related resources are created in the subscription of the virtual network.

To create a Batch account in user subscription pool allocation mode, you must also register your subscription with Azure Batch, and associate the account with Azure Key Vault. For more information about requirements for user subscription pool allocation mode, see Configure user subscription mode.

Azure Storage accounts

Most Batch solutions use Azure Storage for storing resource files and output files. For example, your Batch tasks (including standard tasks, start tasks, job preparation tasks, and job release tasks) typically specify resource files that reside in a storage account. Storage accounts also stores that data that is processed and any output data that is generated.

Batch supports the following types of Azure Storage accounts:

  • General-purpose v2 (GPv2) accounts
  • General-purpose v1 (GPv1) accounts
  • Blob storage accounts (currently supported for pools in the Virtual Machine configuration)

Important

You can't use the Application Packages feature with Azure Storage accounts configured with firewall rules, or with Hierarchical namespace set to Enabled.

For more information about storage accounts, see Azure storage account overview.

You can associate a storage account with your Batch account when you create the Batch account, or later. Consider your cost and performance requirements when choosing a storage account. For example, the GPv2 and blob storage account options support greater capacity and scalability limits compared with GPv1. (Contact Azure Support to request an increase in a storage limit.) These account options can improve the performance of Batch solutions that contain a large number of parallel tasks that read from or write to the storage account.

When a storage account is linked to a Batch account, it's considered to be the autostorage account. An autostorage account is required if you plan to use the application packages capability, as it's used to store the application package .zip files. It can also be used for task resource files. Linking Batch accounts to autostorage can avoid the need for shared access signature (SAS) URLs to access the resource files.

Next steps