InsureRaft A claim isn't approved until a quorum of nodes agrees. The replicated log is the audit trail, not a copy of it.

Carriers, brokers, reinsurers and regulators all need the same ordered history of a policy: created, claimed, approved, paid. InsureRaft replicates that history across a Raft cluster in C++ on NuRaft, so no single party's copy is the one everyone else has to trust.

Stack
C++ · NuRaft · CMake · OpenSSL
Status
Open source · GitHub ↗︎
  • 3node cluster
  • 8typed insurance events
  • 1,469lines of C++

InsureRaft

C++ · NuRaft · CMakeView code
InsureRaft: a leader node and two followers committing an insurance event to a replicated log

01 · Problem

Everyone in an insurance claim keeps their own copy.

A claim moves from broker to carrier to reinsurer to regulator, and today each party trusts its own record of what happened, which leaves no single ordered history everyone agrees on.

02 · Solution

Make the replicated log the record.

Every policy and claim action, created, filed, approved, denied, paid, is a typed event appended to a Raft log. A write only commits once a quorum of nodes has it, so the log itself is the audit trail rather than a copy of one.

03 · Engineering

New parties join as learner nodes: a snapshot catch-up brings them to the current state with no downtime for the rest of the cluster.

04 · Key decisions

  • Quorum writes: majority persists before ack
  • Event ID dedup, so a retried event commits once
  • 8 typed events: created, filed, approved, paid
  • NuRaft (eBay's library), not homegrown consensus
  • Learner nodes for onboarding without downtime

Engineering note

“Exactly once” lives in one small set, in memory. A retried event is caught before it ever reaches the log.

Every event carries a globally unique event_id, and the state machine checks it against an in-memory set before applying anything: if it's been seen, the event is dropped before it touches policy or claim state. It is a few lines, not a dedup service, and it is what makes replaying the same event twice safe.