# Subscription-Based Model

The **Subscription-Based Model** is the most commonly used licensing model in the Digibee Integration Platform. It is based on a basic licensing unit called **Pipeline Subscription**, which grants access to the Platform’s infrastructure, support, and customer success services.

This model is ideal for organizations that have a clear understanding of their integration needs and can plan their capacity requirements in advance.

## License structure

A Pipeline Subscription includes **Runtime Units (RTUs)**, which are used to scale pipelines either:

* **Vertically** (according to pipeline size), or
* **Horizontally** (based on the number of replicas).

Each Pipeline Subscription includes:

* **2 RTUs** for deployments in the **Prod** environment
* **1 RTU** for deployments in the **Test** environment

{% hint style="info" %}
Any non-production environment (such as **Homolog**) is counted as a **Test** environment for licensing purposes, regardless of the licensing model. **Test and Prod RTUs are not interchangeable.**
{% endhint %}

You can purchase as many Pipeline Subscriptions as needed to meet your company’s usage. Each pipeline can be deployed in either **Test** or **Prod**, as long as you have enough available subscriptions and RTUs.

* Each integration flow can have **only one active major version per environment at a time**.
* Different **major versions** of the same pipeline are treated as **separate pipelines** and require **separate subscriptions**.
* You can **create unlimited pipelines**, but deployment depends on the number of Pipeline Subscriptions and RTUs available.

## Hosting and infrastructure

The Subscription-Based Model uses a multi-tenant platform, where all customers share the same infrastructure and available resources. However, each user account is assigned to a specific realm. Data is not shared across realms, and all information is protected by Digibee's security system.

## License consumption

RTU consumption depends on the **pipeline size** and **number of replicas**. The following table outlines RTU usage by deployment size:

| **Size** | **Consumed RTUs** |
| -------- | ----------------- |
| Small    | 1                 |
| Medium   | 2                 |
| Large    | 4                 |

Each pipeline replica consumes the **same number of RTUs** as the initial deployment size. Therefore, **total RTU consumption = pipeline size (in RTUs) × number of replicas**.

## Usage examples

### Example 1: Deploying a new pipeline

You have 10 Pipeline Subscriptions and 20 RTUs in Prod. You deploy a Large pipeline (4 RTUs) in Prod.

* **Subscriptions used:** 1
* **RTUs consumed:** 4
* **Remaining:** 9 Pipeline Subscriptions, 16 RTUs in Prod

### Example 2: Medium pipeline in Test with 2 replicas

* **Size:** Medium (2 RTUs per instance)
* **Environment:** Test
* **Replicas:** 2
* **Calculation:** 2 replicas × 2 RTUs = 4 Test RTUs
* **Consumption:**
  * 1 Pipeline Subscription
  * 4 Test RTUs

### Example 3: Large pipeline in Prod with 3 replicas

* **Size:** Large (4 RTUs per instance)
* **Environment:** Prod
* **Replicas:** 3
* **Calculation:** 3 replicas × 4 RTUs = 12 Prod RTUs
* **Consumption:**
  * 1 Pipeline Subscription
  * 12 Prod RTUs

### Example 4: Two pipelines with different major versions

* **Scenario:** Pipeline A v1.0 and Pipeline A v2.0 are both deployed in Prod
* Each major version is treated as a separate pipeline
* **Consumption:**
  * 2 Pipeline Subscriptions
  * RTU usage depends on the deployment size and replica count of each version
