<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>tag:malachi-hq.github.io,2026:/blog/</id>
<title>Malachi blog</title>
<link rel="self" type="application/atom+xml" href="https://malachi-hq.github.io/malachi/blog/feed.xml"/>
<link rel="alternate" type="text/html" href="https://malachi-hq.github.io/malachi/blog/"/>
<updated>2026-11-25T00:00:00Z</updated>
<entry>
<id>tag:malachi-hq.github.io,2026-11-25:/blog/2026-11-25-introducing-malachi</id>
<title>Introducing Malachi, an open source log broker in Elixir</title>
<link rel="alternate" type="text/html" href="https://malachi-hq.github.io/malachi/blog/2026-11-25-introducing-malachi.html"/>
<published>2026-11-25T00:00:00Z</published>
<updated>2026-11-25T00:00:00Z</updated>
<author><name>Hector Cardoso</name></author>
<summary>Malachi is an open source log broker in Elixir whose topics change shape without breaking their clients, and every release publishes the evidence behind it.</summary>
<content type="html">&lt;p&gt;&lt;img src=&quot;https://malachi-hq.github.io/malachi/blog/2026-11-25-introducing-malachi/cover.png&quot; alt=&quot;Introducing Malachi, an open source log broker in Elixir&quot;&gt;&lt;/p&gt;
&lt;p&gt;Some systems cannot afford to lose a &lt;a href=&quot;https://en.wikipedia.org/wiki/Record_(computer_science)&quot;&gt;record&lt;/a&gt;, or to deliver one twice: a payment, an order,
an &lt;a href=&quot;https://en.wikipedia.org/wiki/Audit_trail&quot;&gt;audit trail&lt;/a&gt;.
They need a log that keeps every write it acknowledged while &lt;a href=&quot;https://en.wikipedia.org/wiki/Fault_tolerance&quot;&gt;nodes fail&lt;/a&gt;, disks fill up and the data outgrows
the layout it started with.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/malachi-hq/malachi&quot;&gt;Malachi&lt;/a&gt; is an &lt;a href=&quot;https://en.wikipedia.org/wiki/Open-source_software&quot;&gt;open source&lt;/a&gt;
&lt;a href=&quot;https://en.wikipedia.org/wiki/Message_broker&quot;&gt;log broker&lt;/a&gt; built for that. It is written in &lt;a href=&quot;https://elixir-lang.org/&quot;&gt;Elixir&lt;/a&gt; and runs on the
&lt;a href=&quot;https://www.erlang.org/blog/a-brief-beam-primer/&quot;&gt;BEAM&lt;/a&gt;, the virtual machine of
&lt;a href=&quot;https://www.erlang.org/&quot;&gt;Erlang/OTP&lt;/a&gt;, and it is an independent implementation inspired by the public design of
&lt;a href=&quot;https://en.wikipedia.org/wiki/LinkedIn&quot;&gt;LinkedIn&lt;/a&gt;&amp;#39;s &lt;a href=&quot;https://www.linkedin.com/blog/engineering/infrastructure/introducing-northguard-and-xinfra&quot;&gt;NorthGuard&lt;/a&gt;
log storage. It is not
affiliated with or endorsed by LinkedIn. This post introduces Malachi as it is in v0.28.4.&lt;/p&gt;
&lt;h2&gt;A log that can change shape&lt;/h2&gt;
&lt;p&gt;In most log brokers a &lt;a href=&quot;https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern&quot;&gt;topic&lt;/a&gt; is cut into a fixed number of
&lt;a href=&quot;https://kafka.apache.org/documentation/#intro_concepts_and_terms&quot;&gt;partitions&lt;/a&gt;, and that number decides where
every &lt;a href=&quot;https://en.wikipedia.org/wiki/Partition_(database)&quot;&gt;key&lt;/a&gt; lands. Growing a topic means moving keys, and the
&lt;a href=&quot;https://en.wikipedia.org/wiki/Client_(computing)&quot;&gt;clients&lt;/a&gt; notice.&lt;/p&gt;
&lt;p&gt;A Malachi client deals in three things: a topic, a key and a &lt;a href=&quot;https://malachi-hq.github.io/malachi/log-model.html&quot;&gt;position&lt;/a&gt;. Under the hood a topic is a set of
&lt;a href=&quot;https://malachi-hq.github.io/malachi/log-model.html&quot;&gt;ranges&lt;/a&gt;, slices of its &lt;a href=&quot;https://en.wikipedia.org/wiki/Shard_(database_architecture)&quot;&gt;keyspace&lt;/a&gt;, and an operator
&lt;a href=&quot;https://malachi-hq.github.io/malachi/clustering-and-resharding.html&quot;&gt;splits and merges them&lt;/a&gt; while &lt;a href=&quot;https://en.wikipedia.org/wiki/Producer%E2%80%93consumer_problem&quot;&gt;producers&lt;/a&gt; keep writing. A
&lt;a href=&quot;https://kafka.apache.org/documentation/#intro_concepts_and_terms&quot;&gt;consumer&lt;/a&gt;&amp;#39;s position is an &lt;a href=&quot;https://malachi-hq.github.io/malachi/produce-and-consume.html&quot;&gt;opaque token&lt;/a&gt;, and after a split the new ranges accept the tokens of the range they
came from, so a consumer resumes where it was. It may read its share of the parent&amp;#39;s records again, &lt;a href=&quot;https://kafka.apache.org/documentation/#semantics&quot;&gt;at least
once&lt;/a&gt;, and it never loses one.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://malachi-hq.github.io/malachi/blog/2026-11-25-introducing-malachi/range-split.png&quot; alt=&quot;A range A splits into ranges B and C while producers keep writing; a consumer&amp;#39;s token in A is accepted by both&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot;&gt;&lt;/p&gt;
&lt;h2&gt;What an acknowledgement means&lt;/h2&gt;
&lt;p&gt;Each range is a series of &lt;a href=&quot;https://malachi-hq.github.io/malachi/log-model.html&quot;&gt;segments&lt;/a&gt;, and each segment is
&lt;a href=&quot;https://en.wikipedia.org/wiki/Replication_(computing)&quot;&gt;replicated&lt;/a&gt; across nodes. A write is acknowledged once a
&lt;a href=&quot;https://en.wikipedia.org/wiki/Quorum_(distributed_computing)&quot;&gt;majority&lt;/a&gt; of its segment&amp;#39;s replicas has written it to disk with &lt;a href=&quot;https://man7.org/linux/man-pages/man2/fsync.2.html&quot;&gt;fsync&lt;/a&gt;. The &lt;a href=&quot;https://en.wikipedia.org/wiki/Metadata&quot;&gt;metadata&lt;/a&gt;, which topics and ranges
exist and where their segments live, is replicated by &lt;a href=&quot;https://raft.github.io/&quot;&gt;Raft&lt;/a&gt;. Membership uses &lt;a href=&quot;https://www.cs.cornell.edu/projects/Quicksilver/public_pdfs/SWIM.pdf&quot;&gt;SWIM&lt;/a&gt;, placement is rack-aware, and
the cluster repairs the replicas it finds missing.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://malachi-hq.github.io/malachi/blog/2026-11-25-introducing-malachi/acknowledgement.png&quot; alt=&quot;A producer&amp;#39;s write reaches the segment&amp;#39;s primary and two replicas, and is acknowledged once two of the three have fsynced it&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot;&gt;&lt;/p&gt;
&lt;p&gt;Security is on by default: &lt;a href=&quot;https://en.wikipedia.org/wiki/Transport_Layer_Security&quot;&gt;TLS&lt;/a&gt;, with &lt;a href=&quot;https://malachi-hq.github.io/malachi/authentication.html&quot;&gt;mTLS for clients&lt;/a&gt;,
&lt;a href=&quot;https://openid.net/developers/how-connect-works/&quot;&gt;OIDC&lt;/a&gt; sign-in and
&lt;a href=&quot;https://malachi-hq.github.io/malachi/per-topic-acls.html&quot;&gt;access control per topic&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Evidence with every release&lt;/h2&gt;
&lt;p&gt;A claim about &lt;a href=&quot;https://en.wikipedia.org/wiki/Durability_(database_systems)&quot;&gt;durability&lt;/a&gt; is worth the test behind it. Every release of Malachi ships with:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://malachi-hq.github.io/malachi/running-chaos-drills.html&quot;&gt;chaos drills&lt;/a&gt; that kill nodes, break storage and roll out bad configurations, then check that every
acknowledged write is still there;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Load_testing&quot;&gt;load tests&lt;/a&gt; run on the release&amp;#39;s exact code, published with the hardware they ran on and the noise between
runs;&lt;/li&gt;
&lt;li&gt;a &lt;a href=&quot;https://github.com/malachi-hq/malachi/blob/main/CHANGELOG.md&quot;&gt;changelog&lt;/a&gt; and upgrade notes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://malachi-hq.github.io/malachi/blog/2026-11-25-introducing-malachi/release-evidence.png&quot; alt=&quot;Each release feeds chaos drills, load tests and its changelog, and their results are published with it&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot;&gt;&lt;/p&gt;
&lt;p&gt;The results of every run are published beside the code, in the
&lt;a href=&quot;https://github.com/malachi-hq/malachi/blob/main/benchmark/README.md&quot;&gt;benchmark results&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Where it stands&lt;/h2&gt;
&lt;p&gt;Malachi is in active development and is not production-ready. Its interfaces and on-disk formats can still
change, it has not been tested at scale, and it makes no stability guarantee yet. It is ready to learn from
and to experiment with. What comes next is on the
&lt;a href=&quot;https://github.com/orgs/malachi-hq/projects/1&quot;&gt;project board&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Try it&lt;/h2&gt;
&lt;p&gt;One node on your machine, with &lt;a href=&quot;https://www.docker.com/&quot;&gt;Docker&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;docker run --name malachi \
  -p 127.0.0.1:4040:4040 -p 127.0.0.1:4041:4041 \
  -e MALACHI_ADMIN_PASS=your_secure_password \
  -e MALACHI_REQUIRE_TLS=false \
  -e MALACHI_ADVERTISED_HOST=127.0.0.1 \
  hectorcardoso/malachi:latest&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It serves &lt;a href=&quot;https://en.wikipedia.org/wiki/Plaintext&quot;&gt;plaintext&lt;/a&gt; on &lt;a href=&quot;https://en.wikipedia.org/wiki/Localhost&quot;&gt;localhost&lt;/a&gt; only, which is why TLS is turned off there. The
&lt;a href=&quot;https://malachi-hq.github.io/malachi/introduction.html&quot;&gt;documentation&lt;/a&gt; covers &lt;a href=&quot;https://en.wikipedia.org/wiki/Computer_cluster&quot;&gt;clusters&lt;/a&gt;, TLS and the client protocol, and the code is on
&lt;a href=&quot;https://github.com/malachi-hq/malachi&quot;&gt;GitHub&lt;/a&gt;, &lt;a href=&quot;https://github.com/malachi-hq/malachi/blob/main/LICENSE&quot;&gt;MIT licensed&lt;/a&gt;. Issues labelled
&lt;a href=&quot;https://github.com/malachi-hq/malachi/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22&quot;&gt;good first issue&lt;/a&gt;
are a place to start contributing.&lt;/p&gt;
&lt;h2&gt;Follow along&lt;/h2&gt;
&lt;p&gt;New posts arrive with each release: subscribe to the newsletter below, follow the
&lt;a href=&quot;https://malachi-hq.github.io/malachi/blog/feed.xml&quot;&gt;Atom feed&lt;/a&gt; or the &lt;a href=&quot;https://www.linkedin.com/company/malachi-hq&quot;&gt;Malachi page on LinkedIn&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;What changed in v0.28.4&lt;/h2&gt;
&lt;h3&gt;Performance&lt;/h3&gt;
&lt;ul&gt;&lt;li&gt;batch the sealed copy integrity probe (#372)&lt;/li&gt;
&lt;/ul&gt;
</content>
</entry>

</feed>
