Skip to Content
ConceptsArchitecture

Architecture

System Overview

Components

Convoy API

FastAPI application handling:

  • Request submission (POST /cargo/load)
  • Status tracking (GET /cargo/{id}/tracking)
  • Health checks (GET /health)

Convoy Worker

Temporal worker running three workflows:

WorkflowPurpose
BatchSchedulerWorkflowMonitors pending requests, creates batches, submits to providers
CallbackDeliveryWorkflowDelivers results to callback URLs with retry
ResultCleanupWorkflowRemoves expired results (default: 30 days)

Temporal

Workflow orchestration engine providing:

  • Durable execution
  • Automatic retries
  • Workflow history and visibility

PostgreSQL

Stores:

  • Cargo requests
  • Batch jobs
  • Processing results
  • Callback delivery status

Data Flow

Database Schema

cargo_requests

ColumnTypeDescription
idUUIDPrimary key
cargo_idstringPublic identifier
providerenumbedrock, anthropic
modelstringModel identifier
paramsJSONBRequest parameters
callback_urlstringDelivery URL
statusenumCurrent status
batch_job_idUUIDAssociated batch

batch_jobs

ColumnTypeDescription
idUUIDPrimary key
providerenumbedrock, anthropic
provider_job_idstringExternal job ID
statusenumBatch status
request_countintRequests in batch

cargo_results

ColumnTypeDescription
idUUIDPrimary key
cargo_request_idUUIDParent request
successboolProcessing success
responseJSONBModel response
expires_attimestampCleanup date

callback_deliveries

ColumnTypeDescription
idUUIDPrimary key
cargo_request_idUUIDParent request
statusenumDelivery status
attempt_countintDelivery attempts
Last updated on