# Size and cost

Know what Platforma costs all the time and how jobs use computing power, and how to size and limit it.

The cost of Platforma has two levels:

- The license of Platforma: your company pays it to MiLaboratories under a separate agreement. For its terms, [contact MiLaboratories](https://platforma.bio/contacts).

- The cost of use: the bill of the cloud or of the servers where Platforma runs. This page is about this level. It has two parts:

  - The stable part costs money all the time, also when nobody works: the fixed base, which is the parts of Platforma that run all the time, and the storage, which grows with the data.
  - The dynamic part depends on the analyses of the projects: it is the computing power that the jobs (One run of a tool on data. The Backend starts jobs on the server where it runs, or in a Kubernetes cluster.) of the Blocks (A small application for one step of an analysis, for example the import of reads or clustering. It can combine several tools.) use while users run analyses.

In a Kubernetes (A system that runs programs on a group of machines (a cluster). Platforma can run in a Kubernetes cluster.) cluster that the Terraform modules (The Terraform code that MiLaboratories provides to install Platforma. The cloud-specific Terraform modules make the cluster and its cloud parts in AWS or Google Cloud; the cloud-agnostic Terraform modules install Platforma into the cluster.) make, the nodes for the jobs exist only while jobs run, so a quiet week costs little more than the stable part. In Single Server mode, the server is in the stable part and gives the computing power at the same time: you pay for all of it, used or not.

The fixed base is the cost when nothing runs, without the data in the storage. With the default sizes of the Terraform modules and the list prices of 26 November 2026, it costs about 600 USD a month on AWS and about 670 USD on Google Cloud. In Single Server mode (The mode in which the Backend and all its jobs run on one Linux machine, the server, with no Kubernetes cluster.), a cloud server of 32 CPUs (The compute units of a node or of the server, as Kubernetes and the operating system count them. A job asks for a number of CPUs. The cloud quotas call them vCPUs.) and 256 GiB costs about 1,550 USD a month on AWS and about 1,390 USD on Google Cloud. For the parts of these sums and the prices, see [Example in US dollars](/plan-analysis-size-and-cost/#example-in-us-dollars).

This page tells how Platforma uses resources and money. For how much memory an analysis needs and how to calculate the bill from these numbers, see [Size and cost of an analysis](/plan-analysis-size-and-cost/).

## How Platforma uses resources and money

### What you pay all the time

#### Variant: Kubernetes cluster

These parts run all the time, also when nobody works. The instance types are the defaults of the Terraform modules, and you can choose others.

| Part                                                                                                                                                                                                                                              | AWS                                                                                                                    | Google Cloud                                                                                                      |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| Control plane of the cluster                                                                                                                                                                                                                      | EKS cluster                                                                                                            | Zonal GKE cluster                                                                                                 |
| System nodes: the components of the cluster                                                                                                                                                                                                       | 2 × `m7i.large` (2 CPUs, 8 GiB)                                                                                        | 1 × `e2-standard-4` (4 CPUs, 16 GiB)                                                                              |
| Backend (The server program of Platforma. It keeps the projects, runs the Blocks and starts jobs.) node                                                                                                                                           | 1 × `m7i.2xlarge` (8 CPUs, 32 GiB)                                                                                     | 1 × `n4-standard-8` (8 CPUs, 32 GiB)                                                                              |
| NAT for the outbound connections                                                                                                                                                                                                                  | 1 NAT gateway with 1 public IP address                                                                                 | Cloud NAT                                                                                                         |
| Load balancer for the Desktop App (The program that each user installs on their own computer to work with Platforma. It is a client of the Backend.)                                                                                              | 1 Application Load Balancer                                                                                            | 1 Application Load Balancer                                                                                       |
| Volumes                                                                                                                                                                                                                                           | Boot disks (50 GiB for each system node, 100 GiB for the Backend node), database volume (50 GiB), logs volume (30 GiB) | Boot disks (100 GiB for the system node and for the Backend node), database volume (50 GiB), logs volume (30 GiB) |
| Workspace (The storage where the Backend and all jobs keep the working files of running jobs. The Backend and the jobs use it at the same time. In Kubernetes, it is a network file system; in Single Server mode, it is a folder on the server.) | EFS: you pay for the data in it and for the data that jobs read and write, not for a fixed size                        | Filestore, zonal: at least 1 TiB, and you pay for the full size, also when it is empty                            |
| Primary storage (The bucket (Amazon S3 or Google Cloud Storage) or folder where Platforma keeps all results and uploaded files.)                                                                                                                  | S3 bucket: you pay for the data in it                                                                                  | Cloud Storage bucket: you pay for the data in it                                                                  |

The Backend gets all of its node. With the modules, the Backend pod asks for all the CPU and memory that the node gives to pods. This is about 7.2 CPUs and 27 GiB on AWS, and about 7.2 CPUs and 26 GiB on Google Cloud. This size is enough for up to about 30 users who work at the same time. For more users at the same time, choose a Backend node of 16 CPUs and 64 GiB (for example `m7i.4xlarge` or `n4-standard-16`). The Backend then gets the larger node, and the Backend node costs about 2 times more (see [Example in US dollars](/plan-analysis-size-and-cost/#example-in-us-dollars)).

The node pools for the jobs (`ui`, `batch` and `gpu`) are not in this list: their minimum size is 0, so they do not have nodes when no jobs run. The `gpu` pool is empty by default.

An address allow-list of the entry point (The way in to the Backend from outside the cluster, a load balancer or an Ingress with a DNS name. It usually ends TLS and sends the traffic to the Backend pod.) (`gateway.allowed_cidrs` of the Terraform modules) adds a cost on Google Cloud only. With the default list `["0.0.0.0/0"]`, there is no allow-list and no cost. A list that limits the addresses makes a Cloud Armor Standard policy:

- about 5 USD each month for the policy;
- about 1 USD each month for each rule: one rule for each 10 networks of the list, and one default rule;
- about 0.75 USD for each million requests with an external entry point, or about 0.60 USD with an internal entry point.

**Example:**

One policy with 2 rules costs about 7 USD each month, plus the requests.

On AWS, the allow-list is a set of rules of the security group of the load balancer, which do not cost more.

The fixed base runs all the time: Platforma does not have a mode that pauses the installation and stops it. To stop paying for the fixed base, you uninstall Platforma. After the [uninstall](/security-data-flows/#uninstall), the primary storage, the workspace and the database disk stay, and you continue to pay for the data in them until you delete them. The logs disk stays only when you choose this in the settings of the installation; by default, it is deleted.

#### Variant: Single Server

You pay for the server all the time, used or not: its CPUs, its memory and its disks. When the primary storage is a bucket, you also pay for the data in it. A server in a cloud costs the same each hour, also at night and at weekends. A server in the data center of the company costs its purchase and operation, and its size does not change.

Platforma does not have a mode that pauses the installation: to stop paying for the server in a cloud, you uninstall Platforma and remove the server. The [uninstall procedure](/security-data-flows/#uninstall) keeps the primary storage; the data folder of the Backend, with the database, stays only while the server exists.

### How jobs get computing power

#### Variant: Kubernetes cluster

You pay for job nodes only while jobs need them. When a user runs a Block, its jobs go through these steps:

1. The job waits in its queue until the quota of the queue has room for its CPU and memory. Kueue (A Kubernetes add-on that holds jobs in a queue until the cluster has free CPU, memory and GPU for them.) then admits it.
2. With the default settings of the modules, Kueue asks the cluster autoscaler for all nodes of the job at once. The autoscaler adds them, or none, so a job does not wait on half of its nodes.
3. On AWS, the autoscaler picks the node group with the least free CPU and memory left after the job is on the node. So a small job does not start a large node when a small node is enough. On Google Cloud, the modules set the `BALANCED` autoscaling profile of GKE, and GKE chooses the node group.
4. The job runs. The autoscaler never removes a node while a job runs on it.
5. When a node is empty, the autoscaler removes it after 10 minutes. The delay keeps a node for the next wave of jobs of a Block run, so that these jobs do not wait for a new node. On AWS, the Terraform modules set this delay explicitly. On Google Cloud, the `BALANCED` profile of GKE gives it, and GKE does not have a setting for the exact time. You pay for these minutes.

**The `ui` pool also starts from zero.** The `ui` pool runs the short tasks that the Desktop App waits for, for example the rendering of results. Its minimum size is 0 to save cost. Thus, after a time without work, the first such task waits for a new node to start, and the user sees a delay of some minutes. To prevent this delay, you can set a minimum size for the `ui` pool, for example one small node. These nodes are then paid all the time, also at night.

#### Variant: Single Server

There is no scaling: all jobs share the server. By default, the Backend gives the jobs 95% of the memory and all CPUs. The memory is the memory limit of the Backend when it runs in a container or in a systemd unit with a memory limit, else the memory of the server. You can give the jobs a different amount (see [Jobs and resources](/configuration-jobs-and-resources/#single-server-mode)).

The Backend starts a job only when two conditions are true. The memory that the job asks for fits into the memory that the running jobs leave free. Its CPUs fit into the CPU budget of its queue. For the large jobs (the heavy queue), this budget is 4 times the CPUs, so the jobs share the CPUs and run slower. Thus the memory and the CPUs both limit how many jobs run at the same time. For example, 7 jobs of MiXCR Clonotyping at the same time, with 16 CPUs each, need at least 28 CPUs (7 × 16 = 112 = 4 × 28).

When a job asks for more memory than its queue can give, the Backend makes the request smaller. It lowers the request to the memory limit of its queue (or to the maximum request that you set), and writes a warning to its log. The job then starts, but it can run out of memory and fail. With Docker, the container of the job gets this smaller memory limit.

### How to limit the cost

#### Variant: Kubernetes cluster

With the Terraform modules, two settings cap how many job nodes can run at the same time, and thus the cost of each hour:

- **The maximum size of each node group.** The autoscaler never adds more nodes than this. By default, the `batch` pool has three node groups. They have up to 8 nodes of 4 CPUs and 16 GiB, up to 4 nodes of 16 CPUs and 64 GiB, and up to 8 nodes of 32 CPUs and 256 GiB. The `ui` pool has two: up to 4 nodes of 2 CPUs and 8 GiB, and up to 4 nodes of 4 CPUs and 16 GiB.
- **The quota of each queue.** Kueue admits jobs only up to the quota, so the autoscaler never needs more nodes than the quota. By default, the quota is the sum of the allocatable CPU and memory (what a node gives to jobs) of all nodes of the pool at their maximum size. You can set a lower quota, but not a higher one.

When all job nodes of the defaults run at the same time, the `batch` pool has 352 CPUs (8 × 4 + 4 × 16 + 8 × 32) and 2,432 GiB, and the `ui` pool 24 CPUs and 96 GiB. This is the highest cost of an hour with the defaults, not the usual one.

**The vCPU quota of the cloud account must allow this.** The cloud limits the number of vCPUs that an account can use in a region. This quota must have room for the job nodes at their maximum size, plus the system nodes and the Backend node. When the quota is too small, the autoscaler cannot add nodes, and the jobs wait in the queue. Check the quota before the installation, and ask the cloud provider for more when it is necessary, or set lower maximum sizes.

**GPU machines have their own quota.** The cloud account (AWS) or the project (Google Cloud) has a separate quota for GPU machines. To use GPU nodes, get this quota first.

The alternatives and their consequences:

- **A lower maximum or a lower quota** makes the highest cost of an hour lower, but jobs wait in the queue longer when many users work at the same time. A large analysis does not cost less: the same jobs run, one after another, so it takes longer.
- **A higher maximum** lets more jobs run at the same time. An analysis ends sooner and costs about the same, because you pay for node hours, not for nodes. The peak cost of an hour is higher.
- **A larger maximum job size** (a node group with more memory) lets larger jobs run without a reduced request, but each such job starts a more expensive node.
- **Several node shapes in each pool** keep small jobs on small nodes. The modules refuse a job pool with only one instance type.

When the quota of the `ui` queue is full, the `ui` tasks can use the quota of the `batch` queue. The `batch` jobs never use the quota of the `ui` queue.

All nodes are on-demand, not spot or preemptible nodes, and the modules do not have a setting for spot nodes for the Backend and the jobs. The reason: the cloud can stop a spot node at any time, and a job that stops before its end fails. On Google Cloud, only the system pool can use spot nodes.

**A commitment lowers the price of each hour.** AWS Savings Plans and Google Cloud committed use discounts give a lower price when you commit to an amount of use for each hour. The part of the commitment that you do not use in an hour is lost: it does not go to the next hour. The discount is not tied to specific nodes: in each hour, it applies to all eligible nodes, also to the job nodes that the autoscaler adds. Thus the system nodes and the Backend node, which run each hour, fit a commitment fully. For the job nodes, commit only up to the use that is there in almost every hour. To choose the size of the commitment, use the recommendations of the cloud: the Savings Plans recommendations in AWS Cost Explorer, or the CUD analysis report of Google Cloud.

For how to set the maximum sizes and the quotas, see [Jobs and resources](/configuration-jobs-and-resources/); for what Platforma expects of them, see [Quotas](/infrastructure-contract-jobs/#quotas).

#### Variant: Single Server

The server is the cap: the cost does not change with the work. The size of the server decides how many jobs run at the same time and which jobs can run at all:

- **A smaller server** costs less, but more jobs run one after another, and a job that asks for more memory than the server has, gets a reduced request and can fail.
- **A larger server** runs more samples at the same time, but you pay for all of its memory also when nobody works.

A server in a cloud runs each hour, so a commitment (AWS Savings Plans or Google Cloud committed use discounts) fits it fully.

To see how much memory the analyses need, see [How much an analysis needs](/plan-analysis-size-and-cost/#how-much-an-analysis-needs) and [Memory examples](/plan-single-server-requirements/#memory-examples).

### Storage and traffic

**The primary storage grows.** The results stay in the primary storage as long as a project uses them, and the database backups are there too (see [How long data is kept](/security-data-flows/#how-long-data-is-kept)). No bucket rule deletes results, so the storage cost grows with the work of the users. When users delete projects, the Backend deletes the files that no project uses.

**Data stays after an uninstall.** When the Terraform modules remove an installation in AWS or Google Cloud, the bucket of the primary storage, the workspace and the database disk stay. A new installation can use them again. The logs disk stays only when you choose this; by default, it is deleted. You pay for the data that stays until you delete it (see [Uninstall](/security-data-flows/#uninstall)).

**Downloads cost money in a cloud.** The Desktop App downloads the results directly from the bucket. In AWS and Google Cloud, these downloads are internet egress, and the cloud bills them by the gigabyte. Uploads into the bucket are free in both clouds.

**Traffic of the cluster.** In a Kubernetes cluster, these items also cost money:

- The NAT carries the tool images, the software packages and the license checks, and the cloud bills it by the gigabyte. By default, the cloud-specific Terraform modules (The Terraform modules platforma-tf-cloud-base and platforma-tf-cloud-cluster. There is one pair for each cloud, AWS and Google Cloud. The roots cloud and cluster apply them. They make the network, the Kubernetes cluster, the storage, the cloud identities and the registry caches. They give the hand-off file cluster_config to the cloud-agnostic Terraform modules.) make [caches of the images](/install-cloud-terraform/#caches-of-the-cloud-specific-modules) in the cloud, so that each image comes through the NAT only once. Traffic to the primary storage does not go through the NAT, when the modules make the network.
- On AWS, the jobs read and write their working files on EFS, and AWS bills this traffic by the gigabyte.
- On Google Cloud, the job nodes can start in any zone of the region, on purpose, while the workspace (Filestore) is in one zone. So the cloud bills the traffic between a job node in another zone and the file system. MiLaboratories does not limit the jobs to one zone because the capacity of one zone is limited. In popular regions, a zone often does not have free machines of the necessary type, and the jobs then cannot start. You can limit the job nodes to the zone of the file system: the traffic costs less, but you add this risk. On AWS, the job nodes also start in all zones of the cluster, but each zone has its own connection to EFS, so this traffic does not go between zones.
- A job that asks for scratch space gets its own fast volume, which the cluster deletes with the job. You pay for the volume while the job runs.

**Keep the parts in one region, and in one zone when possible.** Put the cluster (or the server), the primary storage and the data libraries (A folder or bucket with input data of the company. Users select files from it in the Desktop App. Platforma only reads it.) in one region: traffic between regions costs more. Clouds also bill the traffic between the availability zones of a region. So put the parts in one zone when you can: for example, a server in Single Server mode and its storage, or a cluster in a zone that has enough machines. But one zone can run out of machines of the necessary type, and the jobs then wait. So by default the job nodes of a cluster start in any zone of the region.

**Find the cost of Platforma in the bill.** The cloud-specific Terraform modules tag each resource with the name of the installation and of the component. Then the billing tools of the cloud can show the cost of Platforma apart from the other costs of the account.

## Next

- [Size and cost of an analysis](/plan-analysis-size-and-cost/)
- [Requirements of Single Server mode](/plan-single-server-requirements/)
- [Nodes, job queues and GPU](/infrastructure-contract-jobs/)
- [Jobs and resources](/configuration-jobs-and-resources/)

Source: https://docs.platforma.bio/plan-sizing-and-cost/
