The Resonate Server acts as a supervisor and orchestrator for Resonate Workers — that is, it provides reliability and scalability to applications built with a Resonate SDK.
Why does this component exist?
Popular programming languages like Python and TypeScript are not designed with abstractions that address distribution. To provide those abstractions at the application level (i.e. to enable API-like abstractions that simplify the implementation of reliable process to process message passing) the system needs a service that acts as both an orchestrator of messages and a supervisor of the processes sending them.
The Resonate Server is a highly efficient single binary that pairs with a Resonate SDK to provide those APIs.
- How to contribute to this repo
- Evaluate Resonate for your next project
- Example application library
- The concepts that power Resonate
- Join the Discord
- Subscribe to the Blog
- Follow on Twitter
- Follow on LinkedIn
- Subscribe on YouTube
brew install resonatehq/tap/resonatenpm install @resonatehq/sdkpip install resonate-sdkA countdown as a loop. Simple, but the function can run for minutes, hours, or days, despite restarts.
import { Resonate, type Context } from "@resonatehq/sdk";
function* countdown(context: Context, count: number, delay: number) {
for (let i = count; i > 0; i--) {
// Run a function, persist its result
yield* context.run((context: Context) => console.log(`Countdown: ${i}`));
// Sleep
yield* context.sleep(delay * 1000);
}
console.log("Done!");
}
// Instantiate Resonate
const resonate = new Resonate({ url: "http://localhost:8001" });
// Register the function
resonate.register(countdown);from resonate import Resonate, Context
from threading import Event
# Register the function
@resonate.register
def countdown(ctx: Context, count: int, delay: int):
for i in range(count, 0, -1):
# Run a function, persist its result
yield ctx.run(ntfy, i)
# Sleep
yield ctx.sleep(delay)
print("Done!")
def ntfy(_: Context, i: int):
print(f"Countdown: {i}")
# Instantiate Resonate
resonate = Resonate.remote()
resonate.start() # Start Resonate threads
Event().wait() # Keep the main thread aliveresonate devnpx ts-node countdown.tspython countdown.pyActivate the function with execution ID countdown.1:
resonate invoke countdown.1 --func countdown --arg 5 --arg 60You will see the countdown in the terminal
npx ts-node countdown.ts
Countdown: 5
Countdown: 4
Countdown: 3
Countdown: 2
Countdown: 1
Done!python countdown.py
Countdown: 5
Countdown: 4
Countdown: 3
Countdown: 2
Countdown: 1
Done!After starting the function, inspect the current state of the execution using the resonate tree command. The tree command visualizes the call graph of the function execution as a graph of durable promises.
resonate tree countdown.1Now try killing the worker mid-countdown and restarting. The countdown picks up right where it left off without missing a beat.
For more Resonate Server deployment information see the Set up and run a Resonate Server guide.
You can download and install the Resonate Server using Homebrew with the following commands:
brew install resonatehq/tap/resonateThis previous example installs the latest release. You can see all available releases and associated release artifacts on the releases page.
Once installed, you can start the server with:
resonate serveYou will see log output like the following:
time=2025-09-09T20:54:31.349-06:00 level=INFO msg="starting http server" addr=:8001
time=2025-09-09T20:54:31.349-06:00 level=INFO msg="starting poll server" addr=:8002
time=2025-09-09T20:54:31.351-06:00 level=INFO msg="starting metrics server" addr=:9090The output indicates that the server has HTTP endpoints available at port 8001, a polling endpoint at port 8002, and a metrics endpoint at port 9090.
These are the default ports and can be changed via configuration. The SDKs are all configured to use these defaults unless otherwise specified.
The Resonate Server repository contains a Dockerfile that you can use to build and run the server in a Docker container. You can also clone the repository and start the server using Docker Compose:
git clone https://github.com/resonatehq/resonate
cd resonate
docker-compose upIf you don't have Homebrew, we recommend building from source using Go. Run the following commands to download the repository and build the server:
git clone https://github.com/resonatehq/resonate
cd resonate
go build -o resonate
After it is built, you can compile and run it as a Go program using the following command:
go run main.go serve
Or, you can run it as an executable using the following command:
./resonate server