Skip to main content

95 posts tagged with "Clustron"

Articles related to Clustron distributed key-value store.

View All Tags

Keyspace Notifications That Survive Failover

· 9 min read
Clustron Team
Distributed Systems Engineering

Redis keyspace notifications on Zaris's replicated native watch

Keyspace notifications are one of Redis's most useful features and one of its most quietly fragile. The idea is lovely: every time a key is written, deleted, or expires, the server publishes an event on a well-known pub/sub channel, and anyone who cares can PSUBSCRIBE and react — invalidate a cache, wake a worker, refresh a projection. No polling, no GET in a loop asking "has it changed yet."

The fragility is in the fine print. Redis keyspace notifications are fire-and-forget pub/sub, emitted by whichever node processed the command, to subscribers connected to that same node. In a clustered deployment that means a subscriber only hears about writes that happened to land on the node it's attached to, and if that node fails over, the subscription — and the stream of events it was carrying — goes with it. The feature works beautifully on a single box and gets subtle fast once there's more than one.

Zaris speaks the exact same protocol — CONFIG SET notify-keyspace-events, the __keyspace@0__ and __keyevent@0__ channels, a vanilla PSUBSCRIBE from any Redis client in any language. But the plumbing underneath is not a reimplementation of Redis's notifier. It's a thin bridge onto a feature Zaris already had: a native, cluster-wide, replicated watch. That changes what the notifications are worth.

No Auth Server: Offline-Verifiable Tokens, Roles, and Scopes in Zaris

· 11 min read
Clustron Team
Distributed Systems Engineering

Offline-verifiable tokens, roles, and scopes in Zaris

Most ways of putting auth in front of a distributed data store end up adding a second distributed system to run it: an auth service to call, a session database to replicate, a token-introspection endpoint every node has to reach on the hot path. You secured the store and bought yourself a new availability dependency and a new source of latency.

Zaris takes a different route, and it is a deliberately boring one: one signing key per cluster, and tokens that any node can verify by itself. A token is a JWT signed with the cluster's private key; every manager and every node holds the public half and checks the signature offline — no call to an auth server, no quorum, no database lookup. Security is off by default, and a cluster with it off behaves exactly like an unsecured one. This post is about what turns on when you switch it on: the token's shape, the role-and-scope model, the two planes where enforcement actually happens, and — because pretending otherwise is how people get a false sense of security — the operational edges that are easy to get wrong.

Replication Factor Is Not Fault Tolerance: Sizing a Zaris Cluster for Durability on Kubernetes

· 8 min read
Clustron Team
Distributed Systems Engineering

Sizing a Zaris cluster for durability on Kubernetes

There is a tempting line of reasoning when you deploy a replicated store on Kubernetes: I set replicationFactor: 2, so every partition has a backup, so I survive a node loss. It feels airtight. It is also, for a surprisingly common cluster size, wrong — and wrong in the quiet way that only shows up the first time a pod actually dies.

Zaris on Kubernetes stores data in memory and makes it durable by replication, not disk: the node data volume is an emptyDir, and a rescheduled pod rebuilds from the copy held on another pod. That design is sound — but it leans entirely on there being a copy on another pod. Whether that copy exists is not decided by replicationFactor alone. It is decided by the arithmetic between your pod count and your replication factor, and if you get that arithmetic wrong the store will run perfectly, serve every read and write, and silently hold one partition that has nowhere to replicate to.

Fail Closed, Never Destructive: Inside the Zaris License Lifecycle

· 10 min read
Clustron Team
Distributed Systems Engineering

The Zaris license lifecycle

Licensing is the part of a product most engineers never want to think about, and it shows. The usual pattern is a time bomb: a date is checked, and when it passes, the software punishes you — it throws on startup, it corrupts or wipes local state to stop you "stealing" it, or it simply crashes and takes your data with it. That design treats your own operators as adversaries, and it fails in exactly the moment you can least afford it: in production, after the clock quietly rolled over.

Zaris takes the opposite stance. The license check is a distributed data store's most safety-critical switch, so it's built like one: a single pure, deterministic policy function, a graceful and fully reversible enforcement path that never destroys a byte, and one clock per machine that resumes the instant you activate a key. This post walks through how that lifecycle actually works in the shipping code — because the interesting engineering here is in what it refuses to do to you.

All or Nothing: Multi-Key Transactions in Zaris

· 9 min read
Clustron Team
Distributed Systems Engineering

Multi-key transactions in Zaris

A companion post, Race-Free Coordination on Optimistic CAS, made the case that a single primitive — a store-owned version plus a version-guarded conditional write — carries a remarkable amount of coordination. It also drew a hard line: CAS is atomic on one key. Move money from account A to account B and a single compare-and-swap can't cover both; the honest advice was to model the transfer as a state machine on one key, or reach for a saga.

That line is real, but it isn't the whole story. Zaris has a genuine multi-key transaction — BeginTransactionAsync, a staged read/write set, CommitAsync — and it commits across keys and across nodes with an all-or-nothing guarantee. This post is about what that transaction actually is under the hood (a client-coordinated two-phase commit over optimistic versions), precisely what it guarantees, and the one subtlety that decides whether your cross-key invariant actually holds.

One Primitive, Many Guarantees: Race-Free Coordination on Optimistic CAS

· 12 min read
Clustron Team
Distributed Systems Engineering

Race-free coordination on Zaris optimistic CAS

It's tempting to judge a data store by the length of its command list. Redis has INCR, SETNX, MULTI/EXEC, WATCH, Lua, SCAN, pub/sub — a verb for every occasion. The Zaris .NET client, by contrast, looks almost austere. There is no server-side atomic increment. There is no general multi-key transaction that runs arbitrary logic. There is no prefix scan. Native pub/sub exists only through the RESP front-end, not the typed .NET client.

What the .NET client gives you instead is one small, sharp coordination primitive: optimistic versioned compare-and-swap. This post is about how far that one primitive actually goes — because the honest answer is: surprisingly far. A rate limiter, a wallet that never goes negative under a thousand concurrent debits, a job queue where exactly one worker claims each job, and a feature-flag ruleset that never loses an update under concurrent admin edits. All of them, from the same primitive, with no extra server-side machinery.

Clustron Zaris 2.0.1: Durable by Default, Licensed in One Line

· 5 min read
Clustron Team
Distributed Systems Engineering

Clustron Zaris 2.0.1 — durable by default, licensed in one line

Zaris 2.0.1 is out. It's a drop-in upgrade from 2.0.0 — same wire protocol, same client API, same on-disk and in-memory formats — and it does two things worth upgrading for: it makes the cluster's ownership and recovery path meaningfully more durable under failure, and it gives Zaris a clean, built-in trial-and-license model so you can evaluate it and run it in production without friction.

One Log, Two Jobs: How a Replica and a New Owner Catch Up the Same Way

· 12 min read
Clustron Team
Distributed Systems Engineering

Catch up by replaying the log — one revision-ordered op-log feeds replicas and new owners alike

Two very different-looking events in a distributed store turn out to be the same problem underneath. The first: a replica falls behind its primary — a GC pause, a slow disk, a brief network partition — and now holds a stale copy of a partition it must eventually match. The second: a partition is reassigned to a node that has never held it, and that node must acquire the entire dataset from the current owner. One is replication lag; the other is migration. They have different triggers, different operators, different failure stories.

But the question each one has to answer is identical: how do I converge to the current truth of this partition without freezing writes while I do it? Zaris answers both with a single mechanism — a revision-ordered operation log kept per segment, replayed from a known point. This post is about that log: how it's built on the write path, how it's bounded so it can't grow without limit, how it's replayed, and why the exact same substrate carries both a lagging replica and a brand-new owner to convergence.

Retries You Don't Write: Surviving Ownership Churn in the Zaris Client

· 10 min read
Clustron Team
Distributed Systems Engineering

Transparent retry and reroute under ownership churn

Here is a fact about any partitioned key-value store that the glossy diagrams tend to skip: the node that owns your key will move. A node fails and its partitions fail over to their replicas. You scale out and partitions migrate to the new member. A preferred primary comes back and ownership fails back to it. Every one of those events means that the node your client was happily talking to a millisecond ago is, right now, the wrong node for some set of keys.

The naive client experience of that moment is ugly: a connection reset, a generic "server error," or — worse — a write that lands on a node that is no longer the active owner and quietly goes nowhere. The Zaris .NET client is built so that none of that reaches your code. An ownership change becomes a typed status, the client reroutes to the new owner, and the retry is bounded by both an attempt budget and a wall-clock deadline. In the common case your PutAsync just takes a few milliseconds longer and returns Ok. This post is about the machinery that makes that true, and — just as importantly — about the cases it deliberately does not paper over.

No Acknowledged Write Left Behind: The Ownership & Recovery Backbone Under 12 Hours of Chaos

· 10 min read
Clustron Team
Distributed Systems Engineering

Zero acknowledged-write loss, proven over 12 hours of chaos

The happy path of a distributed key-value store is easy to get right. A write lands on the primary, streams to the replicas, everyone agrees, you move on. If that were the whole story, durability would be a solved problem and this post wouldn't exist.

The hard problems live in the seams — the brief, awkward moments when the cluster is mid-transition. A node restarts in the middle of a partition migration. A replica falls far behind the active it's copying from, and then that active fails over to someone else. Ownership of a partition moves to a new node while writes are still in flight to the old one. Each of these is a window: a stretch of a few seconds where, if the handoff is not exactly right, an acknowledged write — one the client was told succeeded — can quietly disappear. Not because the storage engine is buggy, but because two parts of the system disagreed, for a moment, about who owned the truth.

This post is about how Zaris closes those windows, and — the part that actually matters — how we convinced ourselves it works, by running the cluster under continuous, deliberate chaos for twelve hours straight.