# deepgram/self-hosted-resources architecture

> Architecture diagram of the GitHub repository deepgram/self-hosted-resources, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/deepgram/self-hosted-resources
- Repository: https://github.com/deepgram/self-hosted-resources

## Overview

This repository is a resource collection for deploying and operating Deepgram in self-hosted environments, rather than an application server. Operators choose a Kubernetes Helm chart, Docker Compose, or Podman Compose deployment; the chart describes API, engine, billing, and licensing components. Separate resources support troubleshooting, monitoring, and load/latency benchmarking. The benchmark scripts exercise HTTP or WebSocket endpoints and collect or plot metrics. Deployment internals and monitoring wiring are mostly unsampled, so those connections are shown as unverified rather than asserted.

Main entry points: [`charts/deepgram-self-hosted`](https://github.com/deepgram/self-hosted-resources/tree/main/charts/deepgram-self-hosted) (Kubernetes chart), [`benchmarking/tts/k6tts.js`](https://github.com/deepgram/self-hosted-resources/blob/main/benchmarking/tts/k6tts.js) (TTS tests), [`common`](https://github.com/deepgram/self-hosted-resources/tree/main/common) (Service configurations), [`benchmarking/streaming/k6streaming.js`](https://github.com/deepgram/self-hosted-resources/blob/main/benchmarking/streaming/k6streaming.js) (Streaming tests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_deploy["Deployment resources"]
  node_helm["Kubernetes chart"]
  node_docker["Docker Compose"]
  node_podman["Podman Compose"]
  node_config["Service configurations"]
end

subgraph group_runtime["Self-hosted services"]
  node_api["API service"]
  node_engine["Inference engine"]
  node_billing["Billing service"]
  node_license["License proxy"]
  node_volumes[("Model volumes")]
end

subgraph group_operations["Operations"]
  node_diagnostics["Troubleshooting tools"]
  node_monitoring["Monitoring resources"]
end

subgraph group_bench["Benchmarking"]
  node_benchmarking["Benchmark suites"]
  node_httpbatch["HTTP batch tests<br/>[k6batch.js]"]
  node_sitstests["SITS tests<br/>[k6batch_sits.js]"]
  node_sitsanalysis["Throughput calculation"]
  node_tts["TTS tests<br/>[k6tts.js]"]
  node_streaming["Streaming tests<br/>[k6streaming.js]"]
  node_stages["Streaming stages<br/>[streamingstages.js]"]
  node_latencyplot["Latency plots"]
  node_throughputplot["Throughput plots"]
end

node_operator(("Operator"))
node_endpoint{{"Self-hosted API endpoint"}}

node_operator -->|"deploys with"| node_helm
node_operator -->|"deploys with"| node_docker
node_operator -->|"deploys with"| node_podman
node_operator -->|"troubleshoots with"| node_diagnostics
node_helm -.->|"configures"| node_api
node_helm -.->|"configures"| node_engine
node_helm -.->|"configures"| node_billing
node_helm -.->|"configures"| node_license
node_helm -.->|"mounts"| node_volumes
node_config -.->|"configures"| node_api
node_config -.->|"configures"| node_engine
node_httpbatch -->|"posts audio"| node_endpoint
node_sitstests -->|"posts audio URL"| node_endpoint
node_tts -->|"posts text"| node_endpoint
node_streaming -->|"streams audio"| node_endpoint
node_streaming -->|"imports stages"| node_stages
node_sitsanalysis -.->|"analyzes output"| node_sitstests
node_latencyplot -.->|"plots metrics"| node_tts
node_throughputplot -.->|"plots metrics"| node_tts

click node_helm "https://github.com/deepgram/self-hosted-resources/tree/main/charts/deepgram-self-hosted"
click node_docker "https://github.com/deepgram/self-hosted-resources/tree/main/docker"
click node_podman "https://github.com/deepgram/self-hosted-resources/tree/main/podman"
click node_config "https://github.com/deepgram/self-hosted-resources/tree/main/common"
click node_api "https://github.com/deepgram/self-hosted-resources/tree/main/charts/deepgram-self-hosted/templates/api"
click node_engine "https://github.com/deepgram/self-hosted-resources/tree/main/charts/deepgram-self-hosted/templates/engine"
click node_billing "https://github.com/deepgram/self-hosted-resources/tree/main/charts/deepgram-self-hosted/templates/billing"
click node_license "https://github.com/deepgram/self-hosted-resources/tree/main/charts/deepgram-self-hosted/templates/license-proxy"
click node_volumes "https://github.com/deepgram/self-hosted-resources/tree/main/charts/deepgram-self-hosted/templates/volumes"
click node_diagnostics "https://github.com/deepgram/self-hosted-resources/tree/main/diagnostics"
click node_monitoring "https://github.com/deepgram/self-hosted-resources/tree/main/monitoring"
click node_benchmarking "https://github.com/deepgram/self-hosted-resources/tree/main/benchmarking"
click node_httpbatch "https://github.com/deepgram/self-hosted-resources/blob/main/benchmarking/batch/k6batch.js"
click node_sitstests "https://github.com/deepgram/self-hosted-resources/blob/main/benchmarking/batch/sits/k6batch_sits.js"
click node_sitsanalysis "https://github.com/deepgram/self-hosted-resources/blob/main/benchmarking/batch/sits/calculate_k6_throughput.py"
click node_tts "https://github.com/deepgram/self-hosted-resources/blob/main/benchmarking/tts/k6tts.js"
click node_streaming "https://github.com/deepgram/self-hosted-resources/blob/main/benchmarking/streaming/k6streaming.js"
click node_stages "https://github.com/deepgram/self-hosted-resources/blob/main/benchmarking/streaming/streamingstages.js"
click node_latencyplot "https://github.com/deepgram/self-hosted-resources/blob/main/benchmarking/tts/plot_tts_latency.py"
click node_throughputplot "https://github.com/deepgram/self-hosted-resources/blob/main/benchmarking/tts/plot_tts_throughput.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_helm,node_docker,node_podman,node_config toneBlue
class node_api,node_engine,node_billing,node_license,node_volumes toneAmber
class node_diagnostics,node_monitoring,node_endpoint toneMint
class node_benchmarking,node_httpbatch,node_sitstests,node_sitsanalysis,node_tts,node_streaming,node_stages,node_latencyplot,node_throughputplot toneRose
class node_operator toneIndigo
```

## Components

### Deployment resources

- [Kubernetes chart](https://github.com/deepgram/self-hosted-resources/tree/main/charts/deepgram-self-hosted): `charts/deepgram-self-hosted`
- [Docker Compose](https://github.com/deepgram/self-hosted-resources/tree/main/docker): `docker`
- [Podman Compose](https://github.com/deepgram/self-hosted-resources/tree/main/podman): `podman`
- [Service configurations](https://github.com/deepgram/self-hosted-resources/tree/main/common): `common`

### Self-hosted services

- [API service](https://github.com/deepgram/self-hosted-resources/tree/main/charts/deepgram-self-hosted/templates/api): `charts/deepgram-self-hosted/templates/api`
- [Inference engine](https://github.com/deepgram/self-hosted-resources/tree/main/charts/deepgram-self-hosted/templates/engine): `charts/deepgram-self-hosted/templates/engine`
- [Billing service](https://github.com/deepgram/self-hosted-resources/tree/main/charts/deepgram-self-hosted/templates/billing): `charts/deepgram-self-hosted/templates/billing`
- [License proxy](https://github.com/deepgram/self-hosted-resources/tree/main/charts/deepgram-self-hosted/templates/license-proxy): `charts/deepgram-self-hosted/templates/license-proxy`
- [Model volumes](https://github.com/deepgram/self-hosted-resources/tree/main/charts/deepgram-self-hosted/templates/volumes): `charts/deepgram-self-hosted/templates/volumes`

### Operations

- [Troubleshooting tools](https://github.com/deepgram/self-hosted-resources/tree/main/diagnostics): `diagnostics`
- [Monitoring resources](https://github.com/deepgram/self-hosted-resources/tree/main/monitoring): `monitoring`

### Benchmarking

- [Benchmark suites](https://github.com/deepgram/self-hosted-resources/tree/main/benchmarking): `benchmarking`
- [HTTP batch tests](https://github.com/deepgram/self-hosted-resources/blob/main/benchmarking/batch/k6batch.js): `benchmarking/batch/k6batch.js`
- [SITS tests](https://github.com/deepgram/self-hosted-resources/blob/main/benchmarking/batch/sits/k6batch_sits.js): `benchmarking/batch/sits/k6batch_sits.js`
- [Throughput calculation](https://github.com/deepgram/self-hosted-resources/blob/main/benchmarking/batch/sits/calculate_k6_throughput.py): `benchmarking/batch/sits/calculate_k6_throughput.py`
- [TTS tests](https://github.com/deepgram/self-hosted-resources/blob/main/benchmarking/tts/k6tts.js): `benchmarking/tts/k6tts.js`
- [Streaming tests](https://github.com/deepgram/self-hosted-resources/blob/main/benchmarking/streaming/k6streaming.js): `benchmarking/streaming/k6streaming.js`
- [Streaming stages](https://github.com/deepgram/self-hosted-resources/blob/main/benchmarking/streaming/streamingstages.js): `benchmarking/streaming/streamingstages.js`
- [Latency plots](https://github.com/deepgram/self-hosted-resources/blob/main/benchmarking/tts/plot_tts_latency.py): `benchmarking/tts/plot_tts_latency.py`
- [Throughput plots](https://github.com/deepgram/self-hosted-resources/blob/main/benchmarking/tts/plot_tts_throughput.py): `benchmarking/tts/plot_tts_throughput.py`

### Other components

- **Operator**
- **Self-hosted API endpoint**

## Connections

- Operator → Kubernetes chart: deploys with (evidence: `README.md`)
- Operator → Docker Compose: deploys with (evidence: `README.md`)
- Operator → Podman Compose: deploys with (evidence: `README.md`)
- Operator → Troubleshooting tools: troubleshoots with (evidence: `README.md`)
- Kubernetes chart → API service: configures
- Kubernetes chart → Inference engine: configures
- Kubernetes chart → Billing service: configures
- Kubernetes chart → License proxy: configures
- Kubernetes chart → Model volumes: mounts
- Service configurations → API service: configures
- Service configurations → Inference engine: configures
- HTTP batch tests → Self-hosted API endpoint: posts audio (evidence: `benchmarking/batch/k6batch.js`)
- SITS tests → Self-hosted API endpoint: posts audio URL (evidence: `benchmarking/batch/sits/k6batch_sits.js`)
- TTS tests → Self-hosted API endpoint: posts text (evidence: `benchmarking/tts/k6tts.js`)
- Streaming tests → Self-hosted API endpoint: streams audio (evidence: `benchmarking/streaming/k6streaming.js`)
- Streaming tests → Streaming stages: imports stages (evidence: `benchmarking/streaming/k6streaming.js`)
- Throughput calculation → SITS tests: analyzes output
- Latency plots → TTS tests: plots metrics
- Throughput plots → TTS tests: plots metrics
