July in TigerLand

    Dear friends,

    We hope your July was jolly! We improved repair protocol performance, optimized LSM compaction scheduling, and updated how function arguments and struct fields are named and ordered. We also upgraded to Zig 0.14.1, launched SD25 on YouTube, and welcomed a new team member, Peter Ahn, to lead sales and customer experience!

    Let’s go!

    Do few things but do them well, simple joys are holy. Francis of Assisi

    • TigerStyle values simple code, and not only for the developer, but for the machine to execute. Ideas such as “Push ifs up and fors down” and “Let the CPU be a sprinter doing the 100m” avoid context switches that waste CPU cycles and provoke cache misses. While these might seem trifling on the surface, reasoning about the system as two different planes, the data plan e and the control plane , allows us to focus where optimization compounds most: the code running in a tight loop in the data plane.

    • The LSM compaction scheduling algorithm used to compact each active tree and level in turns, leading to context switches in the data plane. We changed the scheduling to compact each tree and level to completion before moving on to the next, eliminating suspend-resume cycles across multiple compactions. This new approach reduced latency, improved throughput, and even saved memory by reducing the amount of state compaction needs to carry.

    If you’re curious about the practical effects of this optimization, check out the profiling results showing gains of up to 20% in some scenarios, along with overall improvements in CPU utilization.

    • We also improved the repair protocol performance by ensuring each missing prepare message is requested exactly once per repair interval. We observed that reordered network messages could cause a more advanced op (the operation number) to be requested before an earlier one, causing it to be rejected and retried only after a timeout. Now, instead of tracking only the highest op requested, we track all inflight ops to avoid delays.

    • This month, we upgraded TigerBeetle to Zig 0.14.1, which went smoothly and brought improvements in the language and standard library!

    • We chased down all TODO comments related to Zig workarounds and fixed many of them, also employing some of the new language features along the way.

    • A compile-time generic type specialization on Time was removed and replaced with a runtime interface, similar to the Allocator interface in Zig’s standard library. This gives us extra flexibility to reuse the same compiled types when writing tests and simulations with alternative (deterministic) sources of time, while also reducing compilation time and binary size.

    • Addressing other cases of unnecessary compile-time type specialization, we refactored a chicken-and-egg situation where the Tracer depended on IO (to flush logs), while IO also depended on the Tracer (to log I/O activity).

    • TigerStyle received an addition about naming things, specifically about function arguments and ordering struct fields. Check it out!

    • The architecture documentation now explains how to integrate TigerBeetle into a larger data processing system from a systems-thinking perspective rather than a component-oriented one. This reflects in our documentation the brilliant explanation from Dominik Tornow’s blog post about why TigerBeetle does not surface network failures and timeouts. As he says, “exposing a definite failure may only offer the illusion of control while increasing risk.“

    Last month, an attempt to explain our deterministic performance was foiled by a need to debug live, we explained how to run VOPR 24/7/1000 with the CFO, and shared an upgrade trick. Plus streamed a 2-part mini-series on enterprise cat: 1) debugging a curious case of missing stdout and 2) what’s in an 𝚎𝚕𝚏.

    Join us live every week on Twitch or catch up on the TigerTube!

    Zig and Rust in Production (ft. Matklad) (Jul 2) This lively conversation covered how matklad got his name, the real (and secret) reason we chose to build with Zig, and why trusting a programmer to not step on a rake doesn’t write reliable software. Thanks for having us, Prime (again)!

    Inverse Triangle Inequality (Jul 7) “In programming, I find myself referring again and again to the idea of inverse of triangle inequality, |AC|>|AB|+|BC|. If you need to go from A to C, it is almost always easier to reach midpoint B first!” - a post from matklad.

    How to add rate limiting to your API using TigerBeetle (May 30) A detailed solution for adding rate limiting to a Spring Boot API application, using TigerBeetle for the book-keeping portion. Published in May this came onto our radar just this past month; thanks again, Mirceau!

    Push Ifs Up and Fors Down - A Broader Perspective (Jul 19) One of TigerStyle’s recommendations, to centralize control flow. Debasish Ghosh, Principal Engineer at Conviva, expounded on this, surmising that “early projections and deferred joins can be interpreted as reordering morphisms in a category to optimize composition.”

    SD25 Online has begun! Every year, we release Systems Distributed conference talks on YouTube to be enjoyed. Watch matklad’s Building Systems, Simply (Jul 21), Stephanie Wang’s Simplicity Is the New Black (Jul 23), Dominik Tornow’s Building a Distributed Protocol (Jul 27), Loris Cro’s Hello, Systems (Jul 30) and just yesterday, Hannes’s DuckLake (Aug 4). More to come in August!

    Systems Distributed ’25 Online Continues! Seven more talks will be released during August. Save the date(s) to hear about what your system isn’t supposed to do from Hillel Wayne, and why you should flush from Andrew Kelley. Learn about new shared-log abstractions with Ram Alagappan, a systems view of AI with Amod Malviya, and big data and AI at the CERN LHC with Dr Thea Arrestad. Enjoy this year’s gong show a.k.a lightning talks and dive into our Jepsen report with Kyle Kingsbury! Then in September–our last talk, a race!

    Tweet Tweet Tweet Tweet Tweet Tweet Tweet Tweet

    ‘Till next time… when we’re not coding!

    The TigerBeetle Team

    RSS iconRSS
    An idling tiger beetle Speech bubble says hi