← Research
Authors
LuMiNx
Date
02 Mar 2026

Abstract

We describe MatrixFlare, a Matrix-spec homeserver implemented entirely on globally distributed edge runtimes. Room state lives in durable per-room actors; media in object storage; federation is asynchronous by default. We discuss the latency and cost characteristics of this architecture compared to a region-bound monolithic homeserver, and the protocol-level adjustments required to make federation tolerable under arbitrary geographic dispersion.

Architecture

A Matrix homeserver in MatrixFlare is a set of stateless Workers, each holding a reference to one or more Durable Objects representing rooms, users, and federation peers. Stateful invariants — message ordering, membership transitions, ACL evaluation — live inside the Durable Object; the Worker handles transport and serialisation.

Media uploads land in R2; thumbnailing is done lazily on first read. Indexable history (search, archives) is mirrored into D1.

Federation

Edge runtimes do not maintain long-lived outbound connections. We therefore push all federation through a queue, with the room’s Durable Object as the single point of ordering. This gives federation eventual consistency on the order of seconds — measurably worse than a co-located Synapse pair, measurably better than a poorly tuned self-hosted instance.

Latency

We measure p50 and p95 send-and-receive latencies across three geographic deployments. Edge deployment wins p50 and p95 for clients who are not co-located with a hypothetical origin server, and loses by ~30ms for clients who are.

Conclusion

Edge-native homeservers are a practical option for small-to-medium federated communities and represent a meaningful reduction in operational complexity. They are not a drop-in replacement for matrix.org-scale deployments.