Skip to main content

Request Lifecycle

Traces a user message from the mobile app, through infrastructure and orchestrator, into the Agent Runtime, and back as a real-time event.

From Client to Orchestrator

1
Step 1

Resolve DNS in Cloudflare

The mobile app sends an HTTPS request to api.crawbl.com. Cloudflare resolves the hostname to the correct public IP.

2
Step 2

Hit the cloud load balancer

The load balancer provides a stable public entry point and forwards traffic to gateway pods.

3
Step 3

Authenticate at the gateway

The API gateway decrypts traffic and validates the request's credentials. If the check fails, the request is rejected here.

4
Step 4

Route to the orchestrator

The gateway routes the request to the correct backend service and hands it off to the orchestrator.

5
Step 5

Process the request

The orchestrator processes the request through its handler, service, and data layers.

Key Infrastructure Components

ComponentRole
API gatewayTLS termination, authentication, request routing
Certificate managementAutomatic TLS certificates
DNS automationKeeps public DNS records in sync with gateway hostnames

From Orchestrator to Runtime

Once the orchestrator receives a user message, it forwards it to the user's Agent Runtime and returns the response.

Orchestrator to Runtime Flow
Click diagram to zoom
1
Step 1

Ensure the runtime exists

The orchestrator checks that the user's runtime exists and is ready. This is why the first message after account creation may take a few extra seconds.

2
Step 2

Forward to the runtime

The orchestrator forwards the message to the user's isolated runtime. Users never communicate with the runtime directly — all traffic is mediated by the orchestrator.

3
Step 3

Process the agent work

The runtime activates the appropriate agent, calls the configured LLM provider, and executes any necessary tool calls.

4
Step 4

Handle the response

The orchestrator persists the conversation, pushes real-time events to connected clients, and returns the API response to the caller.

Real-Time Events

Crawbl pushes real-time events (new messages, typing indicators) to connected clients via WebSocket. All WebSocket connections use the same authentication as REST requests.

Real-time Events Architecture
Click diagram to zoom