Skip to content

v4.5.0

Choose a tag to compare

@github-actions github-actions released this 15 Aug 11:30
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.WithProtocolPin pins the wire to auto, legacy, or duplex for 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 (default 16 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 50 messages (maximum 10,000), with configurable retry and resend intervals. Default Tell semantics are unchanged; reliability applies only to flows you configure.

⚡ Performance

  • Local Tell and Ask scale across independent actor pairs (#1308). Process-wide bottlenecks on the messaging path are gone. On an 8-core Apple M1, pairwise Tell increased from 9.3M to 25M msg/s and Ask from 1.0M to 3.1M req/s. Single-pair Tell increased from 7.8M to approximately 12M msg/s; a 32-vCPU GCP instance reached 54–62M msg/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 Ask reply 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.
  • GrainOf and GrainIdentity skip the cluster registry for an already active local grain (#1307, #1309). Resolution matches the fast path TellGrain and AskGrain already use.
  • Grain messaging path (#1310). Grain contexts and TellGrain acknowledgment 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. AskGrain replies, 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, TellGrain against a single grain increased from 1.4M to 2.1M msg/s, fan-out across 256 grains doubled from 1.2M to 2.5M msg/s, and AskGrain increased from 1.0M to 1.27M req/s, landing within 10% of actor Ask.
  • 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 actor Ask throughput.

⚠️ Behavior Changes

  • Remote fire-and-forget reports enqueue success consistently on the duplex path. Transport failures are dead-lettered. Outbound congestion returns errors.ErrRemoteSendBackpressure after the configured deadline. Message ordering is preserved per sender–target pair.
  • TellGrain and AskGrain delivery semantics are unchanged. TellGrain still 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