Skip to main content

Deployment topologies

See what the DALP Helm chart deploys, the replicas each component starts with, how each Platform API role scales, and how PgBouncer sits in front of PostgreSQL.

A dalp Helm release runs the Platform API as four roles across six Kubernetes Deployments that you size separately. The api role runs a current v2 fleet and a frozen v1 fleet, the indexer role runs serving and rebuild pods, and the runner and scheduler roles run one Deployment each. Every role reaches PostgreSQL through PgBouncer.

Use this page to size an environment and check high availability: default replica floors, autoscaling ranges, what each failure costs, and how extra replicas affect PgBouncer and PostgreSQL. For a first install, see Prerequisites and Helm charts. For backup and restore ownership, see Backup and disaster recovery.

One Platform API release, three of its four roles, each sized on its own.Every DALP Helm release deploys the Platform API as role Deployments that are sized independently of each other, side by side, not as a pipeline. The api role serves HTTP traffic and scales from 2 to 24 replicas at 50 per cent average CPU. The runner role executes durable workflow shards and scales from 2 to 12 replicas at 75 per cent average CPU. The indexer role indexes the configured networks and runs a fixed two replicas. Exactly one live owner pod holds a network's ingestion, so the second replica buys failover rather than faster indexing for one network. A scheduler role, a frozen v1 api fleet and a rebuild pool of indexer pods run beside them and are listed in the table below the figure. Arrows lead down from all three roles to PgBouncer, which runs two replicas in transaction pooling mode with per-process pool limits, so adding a platform pod adds cheap client sockets rather than PostgreSQL server connections. A final arrow leads from PgBouncer down to PostgreSQL, where the pgbouncer chart's values budget the aggregate pool peak against the server's max_connections ceiling.One Platform API release, three of its four roles, each sized on its own.The same figure as the desktop variant, drawn portrait for phone widths. Every DALP Helm release deploys the Platform API as role Deployments, three of them grouped in one frame and stacked top to bottom because they are sized independently of each other, not as a pipeline. The api role serves HTTP traffic and scales from 2 to 24 replicas at 50 per cent average CPU. The runner role executes durable workflow shards and scales from 2 to 12 replicas at 75 per cent average CPU. The indexer role indexes the configured networks and runs a fixed two replicas. Exactly one live owner pod holds a network's ingestion, so the second replica buys failover rather than faster indexing for one network. A scheduler role, a frozen v1 api fleet and a rebuild pool of indexer pods run beside them and are listed in the table below the figure. One arrow leads from the group down to PgBouncer, two replicas in transaction pooling mode with per-process pool limits, and a final arrow leads down to PostgreSQL, where the pgbouncer chart's values budget the aggregate pool peak against the server's max_connections ceiling.

One dalp release runs four Platform API roles, three of them drawn, and every role reaches PostgreSQL through PgBouncer.

What deploys

The dalp umbrella chart deploys one DALP Instance into your cluster. Five subcharts run by default (dapi, dapp, docs, pgbouncer and postgres-exporter), and two optional subcharts ship off (blockscout and investor-portal). Set docs.enabled: false to omit the documentation site, or investorPortal.enabled: true to deploy the Investor portal.

Datastores (PostgreSQL, Redis and object storage), ingress, ledger endpoints and SMTP stay outside the chart and connect through global.datastores and global.dalpApp.config. The backup block renders Velero schedules and storage locations, while you operate the Velero server itself.

Subchart
On by default
dapi, the Platform API
Yes
dapp, the Console
Yes
docs, this documentation site
Yes
pgbouncer
Yes
postgres-exporter
Yes
blockscout
No
investor-portal
No

Every dalp service reads its configuration from the chart values, with your overlay applied on top. Inspect rendered ConfigMaps and Secrets with helm template before rollout.

Sizing profiles

Start from one of these profiles, grounded in the shipped chart defaults and the per-pod footprints in Prerequisites.

Profile
Cluster pod requests (floor)
Key replica and pooler overrides
PostgreSQL sizing
Intended use
Non-production (dev or staging)
~4.0 CPU, ~9.0 GiB RAM (1+ node)
Set dapi.indexerDeployment.rebuild.enabled: false (saves 2.5 CPU and 3 GiB), drop stateless floors to 1 replica, set pgbouncer.replicaCount: 1 on a single-node cluster, and lower each alias's maxDbConnections until the memory check passes
4 to 8 GB RAM (max_connections sized to lowered pools)
Feature testing, staging upgrades and dry runs where brief restart windows are acceptable
Production baseline (chart defaults)
~7.9 CPU, ~16.6 GiB RAM (2+ nodes)
Default replicas: 2 each for api v2, runner, serving indexer, rebuild indexer, dapp, docs and pgbouncer, plus 1 each for api v1, scheduler and postgres-exporter
64 GB RAM, max_connections >= 400 (368 backends at 101 MB worst case plus shared_buffers and a reserve)
Multi-zone HA production baseline with zero-downtime drains and dedicated index rebuild capacity
Production burst (default HPA ceiling)
~26.2 CPU, ~83 GiB RAM (multi-node autoscale)
Default HPA ceilings reached (api v2 up to 24, runner up to 12, dapp up to 30, api v1 up to 4, docs up to 5)
64 GB+ RAM with PgBouncer transaction pooling capping server backends below max_connections
Sustained peak traffic, high-volume primary offerings or heavy concurrent API workloads

The two PgBouncer replicas enforce required anti-affinity across nodes, so any multi-replica production cluster needs at least two schedulable nodes. Optional workloads (investor-portal and blockscout) add their own requests on top.

High availability by component

The chart starts api v2, runner, serving indexer, dapp and pgbouncer at two replicas, each with a PodDisruptionBudget keeping one available during voluntary drains. The frozen api v1 fleet and scheduler start at one replica with minAvailable: 0 so node drains are never blocked. See Prerequisites for per-pod CPU and memory requests.

Component
What it does
Default replicas
Availability defaults
api, v2 fleet
Serves Platform API requests for every path except /api/v1
2 to 24 at 50% average CPU, scale-down waits 300 seconds
A PodDisruptionBudget keeps 1 available. Topology spread constraints prefer to place pods in different zones and on different nodes
api, frozen v1 fleet
Serves the frozen /api/v1 contract for integrations that have not moved
1 to 4 at 50% average CPU
A PodDisruptionBudget keeps 0 available, so a node drain is never refused and can briefly take the only v1 pod out of service
runner
Executes the durable workflow engine and owns the workflow shard groups
2 to 12 at 75% average CPU, scale-in moves one pod at a time
A PodDisruptionBudget keeps 1 available. The HTTP Service never selects runner pods
indexer, serving
Indexes the configured networks
2, fixed
A PodDisruptionBudget keeps 1 available. Rollouts replace one pod at a time with no surge, and a replacement must stay Ready 90 seconds before the wave moves on
indexer, rebuild
Writes a reindex build while one exists, and idles otherwise
2, fixed
No PodDisruptionBudget: a drained rebuild pod costs build time, not serving
scheduler
Owns the scheduler shard group and runs the fleet-wide singleton polls
1, fixed
A PodDisruptionBudget keeps 0 available. While the pod is away the singleton polls pause, and the replacement pod resumes them when it acquires the shard lease
dapp, the Console
Serves the Console web app
2 to 30 at 80% average CPU
A PodDisruptionBudget keeps 1 available, with soft anti-affinity and zone spread
pgbouncer
Pools every platform connection to PostgreSQL
2, fixed
A PodDisruptionBudget keeps 1 available. Required anti-affinity places the replicas on different nodes, so a cluster with one node cannot schedule the second

Topology spread constraints apply to every Platform API role. The docs site and optional Investor portal autoscale from 2 to 5 replicas, and the optional Blockscout frontend scales from 1 to 5.

The indexer floor of two prevents indexing outages on restarts and avoids blocked node drains. Extra serving replicas buy failover and network distribution rather than single-network throughput, because one live owner pod holds each network's database lease at a time. When an owner stops, a surviving replica claims its networks and resumes from the last committed block.

Alerting in the observability chart is off by default (grafana.sidecar.alerts.enabled). Once enabled, ChainUnowned fires if a network has no live owner for five minutes.

Every Platform API and Console pod is stateless, keeping durable state in PostgreSQL and object storage and using Redis for caching and notifications. Pod recovery is a reschedule, and only singleton scheduler polls pause while the single scheduler pod restarts.

Stateful-layer availability comes from your PostgreSQL, Redis and object storage providers (see Stateful dependencies and What sets your RTO and RPO).

Durable workflow execution shards work across all runner replicas using durable.sharding.shardsPerGroup (default 64). Every runner and client hashes entities against this modulus, so change it cluster-wide in one release rather than per pod.

Ledger endpoints

Each network's RPC pool fails over independently. With two or more endpoints, the indexer and Platform API route around lagging or failing endpoints automatically. Platform administrators can extend pools live under Platform admin → Networks (Networks).

The transaction engine signs and broadcasts using only the endpoints listed in rpc.urls in your Helm values (see Networks and Failing over). Give every production network at least two independent endpoints in rpc.urls.

How queries reach PostgreSQL

Application queries connect to PostgreSQL through PgBouncer rather than directly, because the umbrella chart enables pgbouncer by default and renders every service URL against it. Three components keep direct connections: the migration Job (which needs session-scoped advisory locks), postgres-exporter and optional blockscout.

PgBouncer runs strictly in transaction pooling mode across two single-process replicas. Each process accepts up to 3,000 client sockets while holding bounded server pools per database alias, so scaling api pods adds lightweight client sockets rather than PostgreSQL backends.

The connection and memory budget lives in pgbouncer values. The chart budgets the aggregate peak (every pooled alias across both peers, reserve pools, direct consumers and PostgreSQL's 3 reserved slots) against global.datastores.default.postgresql.maxConnections (default 400). When you state the server's RAM, it also prices every backend the aliases can open, plus the direct consumers, at the worst case one backend reaches while it runs a query (pgbouncer.pool.backendMegabytes, 101 MB, or an alias's own backendMegabytes), so 37,168 MB for the 368 default backends, on top of shared_buffers and a reserve for maintenance and headroom (reservedMegabytes). The total must stay within memoryTargetPercent (100 by default) of that RAM. Postgres memory for the pooler gives the calculation.

Raising pool ceilings or PgBouncer replicas multiplies per-process limits by the peer count, so recalculate both budgets together. Under saturation, clients queue up to the wait timeout (10 seconds by default) before failing.

At render time, the chart fails if the aggregate exceeds the declared maxConnections, if a role at its replica ceiling exceeds 8 clients per server connection, or (when memoryMegabytes is set) if those backends at their worst case plus shared_buffers and the reserve exceed memoryTargetPercent (100 by default) of server RAM. Keep declared values matched to your real PostgreSQL instance.

Stateful dependencies

You supply PostgreSQL, Redis and object storage and point global.datastores and global.dalpApp.config.objectStorage at them. Availability and backups for each store depend on the provider you choose.

Dependency
What the platform needs
Who carries availability and backup
PostgreSQL
One database server, reached through PgBouncer
Your database provider
Redis
A cache and notification service, and the platform keeps serving while it is away
Your Redis provider
Object storage
AWS, GCP, Azure, an S3-compatible endpoint or a filesystem path, one active
Your storage provider

One PostgreSQL server backs several logical databases (default, blockscout and dapp). Only the active object storage provider's block is read. See Backup and disaster recovery for restore ownership.

When the cache and notification transport fail

DALP keeps serving while Redis is unreachable, though multi-replica deployments need a shared Redis for consistent reads. Pods do not block startup on Redis: a pod starting during a Redis outage serves from its in-process cache and reconnects automatically.

Each pod retries Redis on bounded backoff without a retry cap and verifies Redis is serving requests (not loading a snapshot or failing over) before marking the connection healthy.

While disconnected, pods miss shared cache updates and change notifications and fall back to scheduled reconciliation: cache invalidations heal within cache.versioned.windowMaxLifetimeMs (600,000 ms, or 10 minutes), and chain-health and network-config reloads heal within 60 seconds. Deployment-wide cache clears fail while Redis is unreachable rather than reporting false success.

dalp_redis_client_unavailable_seconds stays at 0 while connected and climbs during outages. With observability alerts enabled, RedisClientLatchedOffline fires for sustained outages.

One chart for every environment

Every environment from development to production runs the same dalp chart with its own values overlay pointing at that environment's datastores, networks and ingress.

global.deploymentEnvironment accepts local, development, test, staging, demo or production. The dapi ConfigMap derives platform.environment from it at render time.

Install the observability chart as a separate release beside dalp. On OpenShift, layer values-openshift.yaml over both the dalp and observability releases (see OpenShift).

Deployment identity

Every deployment sets two identity values: global.dalpInstance (a 1 to 63 character lowercase slug) and global.deploymentEnvironment. Both default to local and must be overridden in every non-local environment so shared telemetry views separate instances cleanly.

The dapi subchart validates both keys at render time and fails on missing or invalid values. The observability chart adds one further check, rejecting any non-local environment that still carries global.dalpInstance: local.

Consequences and reversibility

Scaling a role triggers a rolling update and moves no data because Platform API pods are stateless. Whenever you raise pool ceilings or PgBouncer replicas, recalculate the PostgreSQL connection and memory budget in the same change.

Keep at least two serving indexer replicas for restart headroom and node drains, and verify network ownership after scaling. Change durable.sharding.shardsPerGroup only in one coordinated release across every runner and client.

Shutdown budgets are fixed in the chart: a 50-second termination grace period, a 5-second preStop pause, and a 44-second DAPI_SHUTDOWN_BUDGET_MS covering the 20-second HTTP drain (DAPI_HTTP_DRAIN_TIMEOUT_MS), 15-second durable entity handoff, and 5-second telemetry flush. During shutdown, api pods drain HTTP requests, runner pods relocate shards, and indexer pods release network leases.

Frequently asked questions

Can the runner role pick up HTTP traffic if the api role is overloaded?

No. The runner's HTTP port is health-only: kubelet probes it, and the application Service never selects runner pods. Scale the api role for HTTP capacity so workflow backlogs on runner cannot starve request handling.

How much warning do I get before PgBouncer starts rejecting queued clients?

There is no guaranteed advance warning. With alerting enabled, PgBouncerClientMaxWait fires after a 1-second wait held for 10 seconds (evaluated every 10 seconds), which matches the 10-second query_wait_timeout. Use it to diagnose sustained pool pressure rather than expecting pre-rejection notice.

Why does PgBouncer scale by adding replicas instead of raising the number of processes in each pod?

Each PgBouncer pod pins processCount: 1 because its metrics exporter holds one admin-console connection. A multi-process pod would route that scrape to an arbitrary process, hiding queue depth in the other processes from saturation alerts. Adding replicas keeps every process scraped by its own exporter sidecar.

What happens if global.dalpInstance or global.deploymentEnvironment is left unset entirely, rather than kept at its default?

An unset value fails immediately at render time because the dapi ConfigMap wraps both in Helm's required guard. The observability chart repeats those guards after its Alloy credential checks. Leaving global.dalpInstance at local with a non-local environment passes dalp rendering, and only the observability chart rejects that combination.

Which PostgreSQL, Redis and object storage does a deployment use?

The services you configure under global.datastores and global.dalpApp.config.objectStorage. Whenever you resize or switch your PostgreSQL server, recalculate the PgBouncer connection and memory budgets against the new server's max_connections and RAM.

Was this page helpful?