# Architecture

The DBNL platform architecture consists of a set of [Services](#services) packaged as Docker images and a set of standard [Infrastructure](#infrastructure) components that are [deployed](https://docs.dbnl.com/platform/deployment) into your infrastructure (e.g. a VPC in AWS or GCP, or on-premise). The platform is scalable, modular, and self contained. It does not require an external connection to hosted Distributional services to operate.

<figure><img src="https://content.gitbook.com/content/yx9NXaWRjaOtW8ILLJQO/blobs/XbI633QqEqxMNSSJWuEy/image.png" alt=""><figcaption><p>DBNL platform architecture</p></figcaption></figure>

## Infrastructure

The DBNL platform requires the following infrastructure:

* A Kubernetes cluster to host the DBNL platform services.
* A PostgreSQL database to store metadata.
* An object store bucket to store raw data (e.g. S3 or GCS).
* A Redis database to serve as a messaging queue.
* A load balancer to route traffic to the API or UI service.

### Infrastructure Sizing Requirements

#### Kubernetes Cluster

| Environment                      | Nodes | CPU per Node | Memory per Node | Total Resources        |
| -------------------------------- | ----- | ------------ | --------------- | ---------------------- |
| **Minimum** (POC/Testing)        | 3     | 4 vCPU       | 16 GB           | 12 vCPU, 48 GB RAM     |
| **Recommended** (Production)     | 5+    | 8 vCPU       | 32 GB           | 40+ vCPU, 160+ GB RAM  |
| **High Volume** (>100k logs/day) | 10+   | 16 vCPU      | 64 GB           | 160+ vCPU, 640+ GB RAM |

#### PostgreSQL Database

| Environment     | Instance Type (AWS) | Instance Type (GCP) | vCPU | Memory |
| --------------- | ------------------- | ------------------- | ---- | ------ |
| **Minimum**     | db.t3.medium        | db-n1-standard-2    | 2    | 4 GB   |
| **Recommended** | db.r5.large         | db-n1-highmem-4     | 2-4  | 16 GB  |
| **High Volume** | db.r5.xlarge+       | db-n1-highmem-8+    | 4-8+ | 32+ GB |

#### Object Store

| Environment     | Storage                                       |
| --------------- | --------------------------------------------- |
| **Minimum**     | 100 GB                                        |
| **Recommended** | 1 TB                                          |
| **High Volume** | 10+ TB (scales with log volume and retention) |

#### Redis

| Environment     | Instance Type (AWS) | Instance Type (GCP) | Memory |
| --------------- | ------------------- | ------------------- | ------ |
| **Minimum**     | cache.t3.medium     | M1                  | 3.2 GB |
| **Recommended** | cache.r5.large      | M3                  | 13+ GB |
| **High Volume** | cache.r5.xlarge+    | M4+                 | 25+ GB |

### Estimated Monthly Costs

Costs vary by cloud provider and region. Approximate ranges (as of 2025):

* **Minimum Setup**: $300-500/month (suitable for POC/testing)
* **Recommended Production**: $800-1500/month (handles typical production workloads)
* **High Volume**: $2000-5000+/month (depends on log volume and retention requirements)

{% hint style="info" %}
These estimates assume standard cloud provider pricing. Costs can be reduced with reserved instances, committed use discounts, or on-premise deployments.
{% endhint %}

## Services

The DBNL platform consists of three core services that run within the Kubernetes cluster:

* The API service (api-srv) serves the DBNL API and orchestrates work across the dbnl platform.
* The worker service (worker-srv) processes async jobs scheduled by the API service.
* The UI service (ui-srv) serves the DBNL UI assets.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dbnl.com/platform/architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
