TigerBeetle Core System Architecture: Deconstructing Performance Engineering
11–20 of 43 posts
Re: TigerBeetle Core System Architecture: Deconstructing Performance Engineering
#12I really wish they turned it into a dependency or database framework where users could define their own business logic to swap out the double entry accounting, while reusing all the system architecture and networking features, consensus etc. Sort of like a new paradigm where opinionated custom databases could be created with arbitrary entry logic built on this stack.
Re: TigerBeetle Core System Architecture: Deconstructing Performance Engineering
#13So batching requests is always something I think should increase performance by a lot, but most server implementations make this pretty difficult, but the thing I struggle the most to understand is how to keep the latency down if you have multiple clients request all batched together? The total amount of latency for all clients is always the latency for the slowest.
Re: TigerBeetle Core System Architecture: Deconstructing Performance Engineering
#14Amazing writing, very accessible too. So batching requests is always something I think should increase performance by a lot, but most server implementations make this pretty difficult, but the thing I struggle the most to understand is how to keep the latency down if you have multiple clients request all batched together? The total amount of latency for all clients is always the latency for the slowest.
But if your application then creates another transfer against the client, and another, while the first request is inflight, then the client will autobatch under the hood and send these off as a batch when the first request returns.
You get this sweetspot then between latency and throughput. And your latency is not spiking as your load increases, since your throughput is now able to keep up.
Re: TigerBeetle Core System Architecture: Deconstructing Performance Engineering
#15Joran from TigerBeetle here! I created TB. Happy to answer questions!
EDIT: I guess part of the question is about the problems with clusters with >130ms latency and if there are challenges you consider easy.
Re: TigerBeetle Core System Architecture: Deconstructing Performance Engineering
#16I really wish they turned it into a dependency or database framework where users could define their own business logic to swap out the double entry accounting, while reusing all the system architecture and networking features, consensus etc. Sort of like a new paradigm where opinionated custom databases could be created with arbitrary entry logic built on this stack.
Re: TigerBeetle Core System Architecture: Deconstructing Performance Engineering
#17Joran from TigerBeetle here! I created TB. Happy to answer questions!
What are some interesting problems or things you can think of to work on that would give someone new a nice amount of exposure to this kind of programming?
Re: TigerBeetle Core System Architecture: Deconstructing Performance Engineering
#18Amazing writing, very accessible too. So batching requests is always something I think should increase performance by a lot, but most server implementations make this pretty difficult, but the thing I struggle the most to understand is how to keep the latency down if you have multiple clients request all batched together? The total amount of latency for all clients is always the latency for the slowest.
Re: TigerBeetle Core System Architecture: Deconstructing Performance Engineering
#19Joran from TigerBeetle here! I created TB. Happy to answer questions!
Hey Joran, awesome stuff. I see a TB post every now and then and it seems like such an interesting problem space to work in. I'm all the way at the other end of the stack, most software we write day-to-day is in JVM-based languages where you don't have to think about these things at all (we get by with ms latencies instead of ns). Reading this post inspires me explore low-level engineering more and I figure zig or ru…
I'd check out tigerstyle.dev, pick up Zig, and then make an HTTP server or file format parser. Those are great ways to learn and experience this kind of programming. At some point, you start to realize that it's just easier to build API services in this way.
But for sure, you can learn so much in JVM-based languages. They make you appreciate low-level techniques all the more!
Re: TigerBeetle Core System Architecture: Deconstructing Performance Engineering
#20Joran from TigerBeetle here! I created TB. Happy to answer questions!
If one has a TigerBeetle cluster with high inter node latency, are there any easy wins to lower the latency of the whole cluster left? My head hurts when I think of latency in large clusters, so your work this year with latency was inspiring. EDIT: I guess part of the question is about the problems with clusters with >130ms latency and if there are challenges you consider easy.
That said, network latency usually follows a distribution. For example, the median might be 130 ms while p99 is 200 ms. So one important goal is to avoid being affected by the high-latency tail.
In consensus and replication systems such as TigerBeetle, you can reduce the impact quite a bit by taking advantage of the fact that you only need a quorum. We have six replicas, and under normal operation we only need acknowledgements from three (including the primary, since we use flexible quorums). That means the primary only has to wait for the two fastest replicas to respond. This is very effective at reducing tail latency.
Then, to get as close as possible to speed-of-light latency, you want to avoid adding unnecessary latency inside the system itself. We've done quite a few algorithmic optimizations there over the past year. For example, introducing radix sort and tournament trees to make CPU processing more efficient.