Home / Companies / Cockroach Labs / Blog / Post Details
Content Deep Dive

Here's how CockroachDB keeps your database from collapsing under load

Blog post from Cockroach Labs

Post Details
Company
Date Published
Author
Sumeer Bhola
Word Count
3,087
Language
English
Hacker News Points
6
Summary

CockroachDB has enhanced its admission control and resource allocation mechanisms to better manage database performance under load, particularly in multi-node transactional databases. The improvements involve hybrid token and slot-based allocation systems that dynamically adjust for CPU and storage resources, along with mechanisms for multi-tenant performance isolation and priority adjustment to minimize priority inversion. CockroachDB addresses challenges like CPU and storage bottlenecks by intercepting CPU-bound work and implementing dynamic slot and token calculation, while an epoch-LIFO queueing system helps manage transaction deadlines. These enhancements shift queuing from the CPU scheduler to admission control queues, maintaining high CPU utilization and reducing latency for high-priority tasks. The system also supports fair resource allocation among tenants and adapts queueing strategies based on observed delays, improving throughput and preventing node failures during overload.