Skip to content

Cluster.Hetzner reference

Source: packages/effect-cluster/src/Hetzner/Database.ts

The database an Effect Cluster coordinates through, on Hetzner Cloud, as a Cluster.Database Layer: Postgres on a Server with a Volume, on a private Network that the pool’s Servers attach to. A firewall drops every inbound connection on the Server’s public address; runners reach it over the Network.

export const Database = ClusterHetzner.Database("Cluster");

Source: packages/effect-cluster/src/Hetzner/ServerPool.ts

Run a pool of Effect Cluster runners on Hetzner Cloud: Servers on the database’s private Network, each running every class given these runners as a Hetzner.Service, behind a Load Balancer that serves their gateway to callers anywhere. Runners talk to each other and the database over the Network; their firewall only lets SSH in, which deploys them. Requires a database on a Hetzner Network — ClusterHetzner.Database.

export const Database = ClusterHetzner.Database("Cluster");
export const Default = ClusterHetzner.ServerPool("Default", { replicas: 2 }).pipe(
Layer.provide(Database),
);