Skip to main content

51 posts tagged with "Architecture"

System architecture patterns and infrastructure design.

View All Tags

Which Primitive, Which Problem: A Field Guide to the Zaris Data Model

· 14 min read
Clustron Team
Distributed Systems Engineering

Choosing the right Zaris primitive for the problem

Most of this blog has gone deep on one thing at a time — compare-and-swap, multi-key transactions, native data structures, streams, watch, the op-log underneath. Each post answers "how does this work." This one answers a different, more practical question: when you have a problem in front of you, which one do you reach for?

That question matters because the wrong choice is rarely a crash. It's a system that works in the demo and then loses an update under load, or funnels a thousand writers through one key, or uses a fire-and-forget notification where it needed a durable log. The primitives don't stop you from using them wrong. So this is a field guide: the mental model that ties them together, a decision table, a walk down each branch with its honest fit and honest edge, and a flowchart at the end.

The Same Code, With or Without a Network: Zaris Embedded Mode

· 9 min read
Clustron Team
Distributed Systems Engineering

Zaris embedded in-process mode

Most distributed data stores make you choose, early and permanently, between two worlds. There is the "real" store — a cluster you deploy, point a client at over the network, and talk to through a wire protocol. And there is the "fake" store you reach for in unit tests: an in-memory dictionary, a mock, a hand-rolled stub that implements just enough of the interface to make the test compile. The two share nothing. Your test exercises the stub's behaviour, not the store's, and the gap between them is exactly where bugs hide.

Zaris collapses that choice. The same typed .NET client that talks to a distributed cluster over TLS also runs the store embedded inside your process, with no socket, no partition map, and no deployment — and it is the same store engine, not a stand-in. You select which one you get with a single connection string. This post is about how that works, the cases it's genuinely good for, and the hard line where embedded mode stops and a cluster begins.

Reading Your Own Writes: The Zaris Consistency Model, Stated Honestly

· 12 min read
Clustron Team
Distributed Systems Engineering

Reading your own writes — one owner per partition

There's a question every developer eventually asks a distributed store, usually right after a confusing bug report: if I write a value and then immediately read it back, am I guaranteed to see what I wrote? It sounds like it should have a one-word answer. It doesn't — not for any partitioned, replicated store, and not for Zaris. The honest answer is "yes, within a partition, because reads go to the same single owner your write did" — and the interesting part is everything packed into that qualifier.

This post is the consistency model for Zaris, assembled in one place. We've written about the pieces separately — optimistic compare-and-swap, transparent retry under ownership churn, the replayable op-log that feeds replicas, multi-key transactions. Here we tie them together from the reader's side and answer the only question that matters at a keyboard: when I read, what am I actually promised? Including, especially, where the promise stops.

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.

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.

Big Values, Small Pauses: Large-Object Chunking in Zaris

· 6 min read
Clustron Team
Distributed Systems Engineering

Large-object chunking keeps big values off the LOH

There's a number every .NET performance engineer eventually memorizes: 85,000 bytes. Any single allocation at or above roughly that size doesn't go on the normal small-object heap — it goes on the Large Object Heap (LOH). The LOH is a different animal. It's only collected during a gen-2 (full) garbage collection, and by default it isn't compacted. That combination is fine for a big buffer you allocate once and keep. It is not fine for a low-latency in-memory store that repeatedly writes and overwrites large values.

Picture the workload: big serialized blobs, large JSON documents, images, protocol payloads — stored, updated, replaced, over and over. Every one of those large writes lands a fresh object on the LOH. Because the LOH isn't compacted, freed slots don't merge back into contiguous space; they fragment. And because reclaiming any of it means a full gen-2 collection, the pauses get longer and land more often exactly as the working set grows. For a store whose entire pitch is low latency, that's the wrong kind of surprise.

Zaris ships an opt-in feature to sidestep the LOH entirely for these values. It's off by default, and this post is about what it does, how it works, and — just as important — when you should and shouldn't turn it on.

Elastic Scaling: Adding and Removing Zaris Servers Without Downtime

· 5 min read
Clustron Team
Distributed Systems Engineering

Growing and shrinking a Zaris store live under a supervisor

Capacity is never right for long. Traffic grows, a launch lands, a season ends — and the store you sized last quarter is either straining or half-idle. The question that decides whether that's a chore or a crisis is simple: can you change the size of a running store without taking it down?

For Zaris the answer is yes, with an important asymmetry that's worth being honest about up front. Scaling out — adding servers — is the easy, safe, lossless direction, and it happens live while the store keeps serving. Scaling in — removing servers — is also supported, but it's a deliberate, monitored operation because the data on a departing server has to go somewhere first.

This post walks both directions: growing a store with Add-ZrServer, shrinking it with Remove-ZrServer, why scale-in needs a drain, and where the web console fits.

Pluggable TLS Trust: Four CA Modes for Locking Down Zaris

· 7 min read
Clustron Team
Distributed Systems Engineering

Four CA modes for pluggable TLS trust in Zaris

The fastest way to make sure TLS gets skipped is to force one trust model on everyone. A dev running a store on a laptop doesn't want to stand up a CA. A bank with an offline root in an HSM doesn't want your tool minting certificates at all. Ship a store that only knows one of those, and half your users turn security off to get their work done.

So Zaris doesn't pick for you. Its TLS trust is pluggable across four certificate-authority modes, from zero-config self-signed all the way to certificates you provision entirely out of band. You choose the mode that matches the PKI you already run, and Zaris slots into it instead of asking you to rebuild around it. TLS isn't one-size-fits-all, and treating it that way is exactly why security gets deferred.

Any Language, One Store: How Zaris Speaks the Redis Protocol

· 7 min read
Clustron Team
Distributed Systems Engineering

Any language, one store

Zaris is a distributed key/value store built natively for .NET. Its first-class clients speak an efficient binary protocol, and if your stack is .NET, that's the path you want — real async APIs, .NET types, coordination primitives, IDistributedCache and HybridCache drop-ins.

But most systems aren't only .NET. There's a Python service doing data work, a Go sidecar, a Ruby job runner, a Node gateway. Rewriting all of them onto a new client to try a new store is a non-starter. So in 2.0.0, every Zaris node can also expose a Redis-protocol (RESP2) listener: point an existing Redis client at it and use Zaris as a drop-in key/value store, in any language, without changing a line of client code.

This post is about how that front-end actually works — the routing model, the data model, the failover models, and exactly which commands are in and out.

Zaris 0.9.0 Is Here — and It's Generally Available

· 4 min read
Clustron Team
Distributed Systems Engineering

Zaris 0.9.0 — Generally Available

Today we're shipping Zaris 0.9.0, and with it, Zaris hits general availability. It's production-ready, cross-platform, and now backed by commercial support.

If you haven't run into it yet: Zaris is a distributed, in-memory key/value store for .NET. It's fast, replicated, and you can operate it from a browser, PowerShell, or straight from your app. This release is the culmination of that work — the point where "promising project" becomes "thing you can put in production."