Distributed Go actor framework to build a reactive and distributed system in Go with typed actor messages. GoAkt is highly scalable and available when running in cluster mode. It comes with the necessary features require to build a distributed actor-based system without sacrificing performance and reliability. With GoAkt, you can instantly create a fast, scalable, distributed system across a cluster of computers.
If you are not familiar with the actor model, the blog post from Brian Storti here is an excellent and short introduction to the actor model. Also, check the reference section at the end of the post for more material regarding the actor model.
- Core & Messaging
- Actor model — concurrent, distributed actors with typed messages
- Grains — virtual actors with their own context and lifecycle
- Actor hierarchies — parent/child trees via
SpawnChild, with child/parent navigation - Lifecycle hooks —
PreStartandPostStop; graceful stop and poison-pill shutdown - Behavior switching —
Become/UnBecomeplus stackedBecomeStacked/UnBecomeStackedfor protocol phases - Messaging —
Tell/Askfor fire-and-forget and request/response flows, plusBatchTell/BatchAskfor bulk delivery - PubSub — topic-based publish/subscribe via a dedicated
TopicActor, cluster-aware with cross-node dissemination over remoting - Forward & PipeTo — forward messages preserving the original sender; pipe async task results back to an actor
- Reentrancy — non-blocking async
Requestwith configurable modes and in-flight limits - Watch & Terminated — monitor actor lifecycle and receive
Terminatedon death - Stashing —
Stash/Unstash/UnstashAllto defer messages during transient states - Dependency injection — attach runtime dependencies to actors at spawn time
- Supervision & Fault Tolerance
- Supervision — one-for-one / one-for-all strategies with
Stop/Resume/Restart/Escalatedirectives and retry windows - Passivation — auto-stop idle actors via a time-based strategy
- Reinstate — bring a previously stopped actor back online by PID or name
- Circuit breaker —
PipeTointegrates thebreakerpackage to short-circuit calls to unhealthy dependencies - Dead letters — unhandled messages captured and published on the event stream
- Supervision — one-for-one / one-for-all strategies with
- Scheduling
- Timers —
ScheduleOnce, recurringSchedule, andScheduleWithCronfor cron-driven delivery - Schedule lifecycle —
PauseSchedule/ResumeSchedule/CancelScheduleon existing references
- Timers —
- Routing & Mailboxes
- Routers — round-robin, random, and fan-out routing strategies
- Mailboxes — unbounded FIFO, bounded, priority, and fair (segmented) mailboxes
- Cluster & Topology
- Remoting — TCP actor communication across nodes with pluggable serializers (Proto, CBOR and custom)
- Clustering — Consul, etcd, Kubernetes, NATS, mDNS, and static discovery
- Location transparency — address actors without knowing their node
- Relocation — automatic actor relocation on node failure
- Cluster singletons — single instance cluster-wide with guardian lifecycle
- Multi-datacenter — DC-transparent messaging, pluggable control plane (NATS JetStream, Etcd), DC-aware placement
- State & Streams
- Distributed data — CRDTs (GCounter, PNCounter, LWWRegister, MVRegister, ORSet, ORMap, Flag) with delta replication, anti-entropy sync, tombstone deletion, and snapshots
- Reactive streams — backpressure-aware stream processing with a composable DSL (map, filter, flatMap, batch, throttle, fan-out/in), stage fusion, and built-in metrics/tracing
- Observability & Extensibility
- Observability — OpenTelemetry metrics, event stream, dead letters
- Event stream — in-process topic-based pub/sub for system and user events
- Context propagation — pluggable propagation for request-scoped metadata
- Extensions — pluggable APIs for cross-cutting capabilities
- TLS / mTLS — configurable transport security for remoting
See docs.goakt.dev for the full feature reference.
go get github.com/tochemey/goakt/v4- v4: docs.goakt.dev
- v3 (legacy): tochemey.gitbook.io/goakt
Kindly check out the examples' repository.
GoAkt is free and open source. If you need priority support on complex topics or request new features, please consider sponsorship.
Applications using this library should routinely upgrade their Go version and refresh dependencies as needed to mitigate security vulnerabilities. GoAkt will make a best effort to keep dependencies current and perform vulnerability checks whenever necessary.
You can join these groups and chat to discuss and ask GoAkt related questions on:
We welcome contributions—bug fixes, new features, and documentation improvements. Before diving in, read the Architecture Document to understand the codebase. We use Conventional Commits and a Docker-backed Makefile so contributors only need Docker and Make installed — run make help to see the available targets.
See contributing.md for prerequisites, setup, and the full contribution workflow.
This framework is used in production by the following projects/companies:
- Baki Money: AI-powered Expense Tracking platform that turns receipts into stories...
- Event Processor: Clustered Complex Event Processor (CEP) for IoT data streams.
Kindly use this issue to give us your feedback that can help us enhance the framework.
One can find the benchmark tests here: Benchmark
One can find the architecture documents here: Architecture
