REFERENCE ARCHITECTURE

Real-time API & notifications

WebSocket/long-poll API on Compute, Beacon for pub/sub fan-out, Lane for durable notification delivery, Redis state in Datastore.

IntermediatePlan: Business+Resilience: multi-zona

Diagram

Use cases

  • Live ops dashboard
  • In-app notifications
  • Collaboration presence

Components

LayerRoleProduct
EdgeTLS + routingGateway
RealtimeWebSocket APICompute
Pub/subEvent fan-outBeacon
QueueOffline deliveryLane
StateSessions & presenceDatastore (Redis)
ScaleConnection burstsAutoscale
OperationsConnection metricsInsight

Products

When to use

  • Live dashboards, chat, collaborative editing presence.
  • Mobile push notification backends.
  • IoT telemetry fan-out to thousands of subscribers.

When to avoid

  • Batch-only reporting — use data pipeline pattern.
  • Strict ordering across all users globally — Conduit may fit better.

Design notes

Beacon for fan-out

Publish domain events to Beacon subjects; edge Compute instances subscribe and push to connected clients.

Lane for reliability

When a user is offline, enqueue notifications in Lane; worker Compute retries with exponential backoff.

Blueprint

Use this JSON as a starting point when creating a project via the Tesserra API or console. Replace image URLs, domains, and resource references with your values.

json
{
  "nome": "Realtime Platform",
  "recursos": [
    {
      "tipo": "compute",
      "nome": "realtime-api",
      "config": {
        "subtipo": "api",
        "porta": 8080,
        "replicas_min": 2,
        "replicas_max": 16
      }
    },
    {
      "tipo": "compute",
      "nome": "notify-worker",
      "config": {
        "subtipo": "worker",
        "replicas_min": 1,
        "replicas_max": 8
      }
    },
    {
      "tipo": "beacon",
      "nome": "events",
      "config": {
        "jetstream": true
      }
    },
    {
      "tipo": "lane",
      "nome": "offline-notify",
      "config": {
        "duravel": true
      }
    },
    {
      "tipo": "datastore",
      "nome": "presence",
      "config": {
        "engine": "redis",
        "tamanho_gb": 10
      }
    },
    {
      "tipo": "gateway",
      "nome": "realtime-dns",
      "config": {
        "dominio": "live.acme.io",
        "tls": true
      }
    },
    {
      "tipo": "autoscale",
      "nome": "ws-scale",
      "config": {
        "alvo_recurso_id": "realtime-api",
        "metrica": "connections",
        "limiar": 70
      }
    },
    {
      "tipo": "insight",
      "nome": "live-obs",
      "config": {
        "retencao_dias": 14,
        "alertas": true
      }
    }
  ]
}
Documentation · Tesserra