Back to Rivet

Self-Hosting Overview

website/src/content/docs/self-hosting/index.mdx

2.3.24.7 KB
Original Source

{/* Mermaid measures each node label's foreignObject width using its default sans font, but the docs body font (JetBrains Mono) is wider, so the rendered label overflows the measured foreignObject and its overflow: hidden clips the text. Forcing the diagram labels back to a normal sans stack makes the rendered width match Mermaid's measurement so every label fits inside its node box. The overflow/centering rules are a belt-and-suspenders fallback so any residual width difference spills symmetrically inside the already-wide node rect instead of clipping on the right. */}

<style>{` pre.mermaid .nodeLabel, pre.mermaid .edgeLabel, pre.mermaid .cluster-label, pre.mermaid foreignObject *, pre.mermaid text { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important; } pre.mermaid foreignObject { overflow: visible; } pre.mermaid foreignObject > div, pre.mermaid .nodeLabel { width: max-content; max-width: none; margin: 0 auto; } `}</style>

Self-Host vs BYOC

Self-Host

mermaid
flowchart LR
    subgraph infra["Your Infrastructure"]
        direction LR
        backend["Your Backend
(Envoy)"]
        engine["Rivet Engine"]
        storage["Storage"]
        backend <--> engine <--> storage
    end

    classDef envoy fill:#bfdbfe,stroke:#3b82f6,color:#000
    classDef engineNode fill:#fed7aa,stroke:#f97316,color:#000
    classDef storageNode fill:#fecaca,stroke:#ef4444,color:#000
    class backend envoy
    class engine engineNode
    class storage storageNode

BYOC with Rivet Cloud

mermaid
flowchart LR
    subgraph infra["Your Infrastructure"]
        direction LR
        backend["Your Backend
(Envoy)"]
    end
    subgraph cloud["Rivet Cloud"]
        direction LR
        engine["Rivet Engine"]
        storage["Storage"]
        engine <--> storage
    end
    backend <--> engine

    classDef envoy fill:#bfdbfe,stroke:#3b82f6,color:#000
    classDef engineNode fill:#fed7aa,stroke:#f97316,color:#000
    classDef storageNode fill:#fecaca,stroke:#ef4444,color:#000
    class backend envoy
    class engine engineNode
    class storage storageNode

Rivet supports both BYOC (Bring Your Own Cloud) and self-hosting to fit your deployment needs.

Self-HostingBYOC with Rivet Cloud
You ManageFull stack (your backend, engine, Rivet Engine, database)Only your backend
ComplexityHigher (full stack deployment)Lower (connect and deploy)
CostHigher operational overheadUsually lower usage-based cost
Supports ServerlessRequires extra infrastructureYes
Air-Gapped DeploymentsYesNo
Best ForAir-gapped environments, strict compliance, custom security policiesAll other production deployments
SupportContact sales or communityCommunity, Slack, and email (varies by plan)
DocumentationContinue belowSee connect guides

Architecture

mermaid
flowchart LR
    backend["Your Backend
(Envoy)"]
    engine["Rivet Engine"]
    storage["Storage
(PG or FS)"]
    backend <--> engine <--> storage

    classDef envoy fill:#bfdbfe,stroke:#3b82f6,color:#000
    classDef engineNode fill:#fed7aa,stroke:#f97316,color:#000
    classDef storageNode fill:#fecaca,stroke:#ef4444,color:#000
    class backend envoy
    class engine engineNode
    class storage storageNode

Rivet has 3 core components:

  • Your Backend: Your application server that handles user requests and includes an envoy component that executes actor code
  • Rivet Engine: Main orchestration service that manages actor lifecycle, routes messages, and provides APIs
  • Storage: Persistence layer for actor state and messaging infrastructure for real-time communication

Storage Backends

Rivet supports multiple storage backends:

  • File System: Recommended for smaller single-node deployments today
  • PostgreSQL: Recommended for multi-node deployments today, but still experimental
  • FoundationDB: Best scalability and performance for production-ready deployments (requires enterprise)

Deployment Platforms

Deploy Rivet on your preferred platform:

Self-hosting guides coming soon.

Next Steps