Successfully reported this slideshow.
Your SlideShare is downloading. ×

Is It Faster to Go with Redpanda Transactions than Without Them?!

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 39 Ad

Is It Faster to Go with Redpanda Transactions than Without Them?!

Download to read offline

P99 CONF
We all know that distributed transactions are expensive, have higher latency and lower throughput compared to a non-transactional workload. It's just common sense that when we ask a system to maintain transactional guarantees it should spend more time on coordination and thus have poorer performance, right?

Well, it's true that we can't get rid of this overhead. But at the same time each transaction defines a unit of work, so the system stops dealing with individual requests and becomes more aware about the whole workload. Basically it gets more information and may use it for new kinds of optimizations which compensate for the overhead.

In this talk I'll describe how Redpanda optimized the Kafka API and pushed throughput of distributed transactions up to eight times beyond an equivalent non-transactional workload while preserving sane latency.

P99 CONF
We all know that distributed transactions are expensive, have higher latency and lower throughput compared to a non-transactional workload. It's just common sense that when we ask a system to maintain transactional guarantees it should spend more time on coordination and thus have poorer performance, right?

Well, it's true that we can't get rid of this overhead. But at the same time each transaction defines a unit of work, so the system stops dealing with individual requests and becomes more aware about the whole workload. Basically it gets more information and may use it for new kinds of optimizations which compensate for the overhead.

In this talk I'll describe how Redpanda optimized the Kafka API and pushed throughput of distributed transactions up to eight times beyond an equivalent non-transactional workload while preserving sane latency.

Advertisement
Advertisement

More Related Content

Slideshows for you (20)

Similar to Is It Faster to Go with Redpanda Transactions than Without Them?! (20)

Advertisement

More from ScyllaDB (20)

Recently uploaded (20)

Advertisement

Is It Faster to Go with Redpanda Transactions than Without Them?!

  1. 1. Brought to you by Is It Faster to Go with Redpanda Transactions than Without Them?! Denis Rystsov Staff Engineer at
  2. 2. Denis Rystsov Staff Engineer at Vectorized ■ Invented CASPaxos ■ Designed Redpanda transactions ■ Tested consistency of Cosmos DB ■ Can’t decide what I like more P0 or P99 ■ Surfing is pure joy
  3. 3. A All functions from list to list B All sorting functions from list to list
  4. 4. More work worse performance
  5. 5. Silver lining Algorithm Complexity Merge sort O(n ln n) Radix sort O(n) Counting sort O(n)
  6. 6. A All sorting functions from list[byte] to list[byte] B All sorting functions from list[int] to list[int] Contravariance
  7. 7. Specialization better performance
  8. 8. Bulk insert
  9. 9. Canonical bulk insert var futures = new ArrayList(); for (var i=0;i<N;i++) { futures.add(send("topic1",...)); } for (var future : futures) { future.get() }
  10. 10. ■ O(N): ■ Replication protocol ■ Disk IO ■ Client-Cluster RTT ■ Intra-cluster RTT Latency
  11. 11. Traditional transactional bulk insert beginTransaction(); for (var i=0;i<N;i++) { send("topic1",...); } commit();
  12. 12. Traditional transactional bulk insert addTopicToTxn("topic1") for (var i=0;i<N;i++) { send("topic1",...); } commit();
  13. 13. ■ O(N): ■ Replication protocol ■ Disk IO ■ Client-Cluster RTT ■ Intra-cluster RTT ■ Add Topic to Txn ■ Commit Latency
  14. 14. Add Topic to Txn
  15. 15. Commit
  16. 16. Redpanda optimization
  17. 17. ■ Let’s send() be eventual consistent Redpanda optimization
  18. 18. ■ Let’s send() be eventual consistent ■ Validate that it’s fully replicated during commit Redpanda optimization
  19. 19. ■ Let’s send() be eventual consistent ■ Validate that it’s fully replicated during commit ■ Parallel commits Redpanda optimization
  20. 20. Add Topic to Txn
  21. 21. Commit
  22. 22. ■ O(N): ■ Replication protocol ■ Disk IO ■ Client-Cluster RTT ■ Intra-cluster RTT ■ Add Topic to Txn ■ Commit Latency
  23. 23. Takeaway ■ Avoid disk IO ■ Embrace limitations ■ Find specialization ■ Be optimistic ■ Look around
  24. 24. Brought to you by Denis Rystsov @rystsov

×