v4.5.0
Immutable
release. Only release title and notes can be modified.
✨ Features
🌐 Multiplexed remoting
- Duplex remoting protocol (#1301, #1302). Nodes now speak a multiplexed remoting protocol with dedicated control, ordinary, and large-message lanes. Protocol negotiation falls back to the legacy unary path, and
remote.WithProtocolPinpins the wire toauto,legacy, orduplexfor mixed-version rollouts or homogeneous clusters. - Configurable lanes, chunking, and credit-based flow control. Lanes, deadlines, and frame limits are tunable. Large messages are chunked (default
256 KiB) and paced by a credit window (default16 MiB). Existing actor APIs (Tell,Ask, and batches) are unchanged.
📬 Reliable delivery
- Confirmed point-to-point delivery (#1296, #1300). Actors can opt into confirmed, ordered, flow-controlled delivery for a named producer–consumer pair, locally or across remoting. Delivery confirmations, retries, deduplication, chunking, durable queues, and cluster/remoting deployment options are included. Point-to-point delivery is effectively-once on the fault-free path.
- Work-pulling delivery. Jobs can be distributed across a dynamic worker group with at-least-once semantics.
- Consumer-driven flow control. The default window is
50messages (maximum10,000), with configurable retry and resend intervals. DefaultTellsemantics are unchanged; reliability applies only to flows you configure.
⚡ Performance
- Local
TellandAskscale across independent actor pairs (#1308). Process-wide bottlenecks on the messaging path are gone. On an 8-core Apple M1, pairwiseTellincreased from9.3Mto25Mmsg/s andAskfrom1.0Mto3.1Mreq/s. Single-pairTellincreased from7.8Mto approximately12Mmsg/s; a 32-vCPU GCP instance reached54–62Mmsg/s across pairwise workloads. - Sharded receive-context recycling. Contexts are recycled from per-actor pool shards instead of a process-wide channel, reducing contention and steady-state memory use.
- Direct dispatcher handoff. Worker wake-ups no longer serialize on a shared condition variable.
- Per-request
Askreply channels. Reply channels are no longer taken from a global pool, which removes channel-lock contention and the timeout-reuse hazard of a late reply landing in a recycled channel. GrainOfandGrainIdentityskip the cluster registry for an already active local grain (#1307, #1309). Resolution matches the fast pathTellGrainandAskGrainalready use.- Grain messaging path (#1310). Grain contexts and
TellGrainacknowledgment channels recycle from per-grain sharded pools. Grain turns stamp activity once per turn and coalesce passivation-manager updates, so the drain path no longer takes a shared mutex on every message.AskGrainreplies, success and failure alike, travel on a single per-request reply channel; handler errors and panics are still returned to the caller. On an 8-core Apple M1,TellGrainagainst a single grain increased from1.4Mto2.1Mmsg/s, fan-out across 256 grains doubled from1.2Mto2.5Mmsg/s, andAskGrainincreased from1.0Mto1.27Mreq/s, landing within10%of actorAsk. - Pairwise throughput and tail-latency benchmarks. The benchmark suite now covers independent actor pairs and grain pairs (
GrainTellPairwise,GrainAskPairwise). At that scaling surface, grains match actorAskthroughput.
⚠️ Behavior Changes
- Remote fire-and-forget reports enqueue success consistently on the duplex path. Transport failures are dead-lettered. Outbound congestion returns
errors.ErrRemoteSendBackpressureafter the configured deadline. Message ordering is preserved per sender–target pair. TellGrainandAskGraindelivery semantics are unchanged.TellGrainstill blocks until the grain has processed and acknowledged the message.
📚 Documentation
- Updated the remoting documentation with the duplex protocol, lanes, chunking, credit-window, and send-semantics configuration.
- Added contributor architecture documentation for reliable delivery.
- Added user documentation for point-to-point and work-pulling reliable delivery.
🔀 Pull Requests
- #1297 chore(deps): update module github.com/bufbuild/buf to v1.72.0 by @renovate[bot]
- #1298 chore(deps): update actions/setup-go action to v7 by @renovate[bot]
- #1299 feat(actor): ✨ add reliable delivery by @Tochemey
- #1302 feat: multiplexed lane-based remoting protocol by @Tochemey
- #1304 chore(deps): update module github.com/vektra/mockery/v2 to v3.7.2 by @renovate[bot]
- #1306 chore(deps): update actions/stale action to v11 by @renovate[bot]
- #1305 chore(deps): update ossf/scorecard-action action to v2.4.4 by @renovate[bot]
- #1308 perf: ⚡ performance enhancement by @Tochemey
- #1309 perf: skip cluster registry reads/writes when resolving an already active grain by @Tochemey
- #1310 perf(grain): enhance grain performance by @Tochemey
Full Changelog: v4.4.3...v4.5.0