Company
Date Published
Author
David Bressler
Word count
862
Language
English
Hacker News points
None

Summary

CockroachDB has introduced a new feature called buffered writes, currently in preview, to enhance transaction throughput performance by minimizing network round trips and reducing latency during transaction execution. Prior to this, each read or write operation required communication with the leaseholder, often resulting in network delays and serial execution. Buffered writes temporarily store transaction data on the KV-client side until the transaction commits, allowing for batching of writes and elimination of redundant writes, thus improving efficiency. This approach also enables serving read-your-writes locally, which is faster and more cost-effective, particularly when the leaseholder is distant. By utilizing buffered writes, transactions maintain ACID compliance while reducing communication overhead. Although buffered writes are off by default, users can enable the feature to optimize performance, especially in multi-statement transactions.