January 2023 Summaries
10 posts from Cockroach Labs
Filter
Month:
Year:
Post Summaries
Back to Blog
CockroachDB dedicated, a fully managed service of CockroachDB, has achieved PCI-DSS certification as a Level 1 Service Provider, which signifies its compliance with the security standards established by the PCI Security Standards Council to protect customers' payment information. This certification, crucial for companies handling credit card data, involves a rigorous assessment of platform security measures such as vulnerability management, system hardening, and encryption, and is particularly critical for the database component within a system. For CockroachDB users, this means an enhanced ability to securely store confidential data, streamlining the process of achieving PCI-DSS compliance for their entire systems, and allowing engineering teams to focus on operational efficiency by leveraging a service provider that adheres to stringent security requirements. Additionally, this certification complements CockroachDB dedicated's existing SOC 2 Type 2 certification, underscoring its commitment to safeguarding customer data.
Jan 31, 2023
596 words in the original blog post.
The article, written by Charlie Custer, discusses handling transaction failures in CockroachDB, emphasizing its ACID transactional guarantees which ensure consistency through serializable isolation. However, these guarantees can lead to transaction failures, such as deadlocks, where two transactions compete for the same resource, resulting in one being canceled and returning a 40001 error code. CockroachDB can automatically retry some transactions, particularly single SQL statements or batched statements, but others require application-level logic to handle retries, especially when additional application-side processing is involved. The article advises using ORM or database driver documentation for retry methods, or writing custom retry logic if none exist. An example of implementing transaction retries using node.js and node-postgres is provided, illustrating the practical application of these concepts, and further resources for learning are available through Cockroach University.
Jan 30, 2023
873 words in the original blog post.
CockroachDB's locality-aware backups for Azure Blob are designed to enhance both cost-effectiveness and compliance in multi-region database setups. This feature minimizes expensive data transfers across regions by ensuring that each node writes backup files to a storage location corresponding to its locality, thus meeting data domiciling requirements. CockroachDB leverages a distributed SQL technology that scales across multiple nodes, decreasing reliance on backups for disaster recovery but still requiring them for protection against human error and data corruption. The backup process involves validating parameters, determining data spans and times for backup, and finally storing data with metadata in an appropriate cloud location. The blog outlines step-by-step instructions for setting up Azure storage and executing locality-aware backups, along with validation methods to ensure that backups are correctly implemented. This approach not only helps in adhering to regulatory data storage requirements but also reduces operational costs by keeping data transfers within the same region.
Jan 24, 2023
2,424 words in the original blog post.
CockroachDB employs multi-version concurrency control (MVCC) to maintain data consistency by keeping multiple data revisions, which can increase query execution costs if not managed properly. To address this, the concept of Protected Timestamps is introduced, allowing CockroachDB to retain only necessary data while safely clearing outdated versions. This mechanism is achieved through Protected Timestamp Records (PTS records), which safeguard specific data revisions from garbage collection, crucial for operations like backups and analytical queries that require historical data. In a multi-tenant architecture, PTS records apply protections at the schema object level, cascading down the database hierarchy, ensuring that operations remain efficient and resilient without compromising data integrity. The implementation of protected timestamps enables CockroachDB to aggressively manage garbage collection, particularly benefiting backup processes by protecting necessary data until successful backups are completed. This approach allows for a shorter default garbage collection time-to-live, reducing unnecessary data accumulation and enhancing performance.
Jan 23, 2023
2,194 words in the original blog post.
CockroachDB has introduced MVCC range tombstones to efficiently manage large-scale data deletions while preserving the Multi-Version Concurrency Control (MVCC) history, which is crucial for functionalities like transaction isolation and cluster replication. Traditional methods of writing individual point tombstones for each deletion were cumbersome and space-intensive, particularly for bulk deletions such as table drops. MVCC range tombstones allow marking an entire range of data as deleted with a single operation, avoiding the need for numerous individual tombstones. This development required significant changes to the MVCC and storage layers and builds on previous work with Pebble's LSM range tombstones. While MVCC range tombstones are not yet supported within transactions due to the complexity of required changes, they eliminate the need for direct data removal "cheats" in the storage engine, ensuring a consistent MVCC history. The implementation of MVCC range tombstones, inspired by Pebble's approach, includes a new generalized MVCC range key concept, allowing for storing arbitrary values over key spans at specific timestamps. Though currently disabled by default due to its complexity, MVCC range tombstones are expected to be gradually rolled out, enhancing data management efficiency in future CockroachDB releases.
Jan 19, 2023
2,997 words in the original blog post.
CockroachDB has enhanced its bulk data ingestion and index backfilling processes to ensure Multi-Version Concurrency Control (MVCC) compliance, which is critical for maintaining data consistency in distributed systems. Traditionally, bulk operations like schema changes and index backfills bypassed regular transaction processing and directly wrote data to storage, potentially violating MVCC invariants. To address this, CockroachDB now mandates that AddSSTable operations write data at current timestamps to uphold MVCC principles, avoiding issues like stale reads. This change necessitated redesigning the index backfill process, originally reliant on AddSSTable's ability to write at previous timestamps. The new approach involves using a temporary index to capture concurrent writes during backfills, ensuring the main index remains consistent without overwriting newer data. This method effectively separates ongoing transactional writes from bulk backfill operations, maintaining data integrity and consistency across distributed nodes. The transformation ensures that index backfills are compatible with MVCC, enabling robust and reliable schema changes within CockroachDB's distributed database environment.
Jan 19, 2023
3,454 words in the original blog post.
CockroachDB engineers have been working on a project to make bulk operations compliant with Multi-Version Concurrency Control (MVCC) to ensure consistent data management without sacrificing performance. Initially, non-MVCC operations like AddSSTable and ClearRange were used to enhance performance during bulk data writes and deletions, but these methods posed challenges for incremental backups and replication features that rely on accurate timestamped data to track changes. The non-MVCC methods allowed for backdating and overwriting of data, leading to gaps in backup coverage and challenges in multi-tenant environments. To address these issues, the engineers decided to convert bulk operations to use MVCC-compliant methods, requiring reengineering of the underlying storage mechanisms and higher-level operations like index creation. This transition aims to maintain the performance benefits of previous methods while ensuring data integrity and consistency across backups and replications, forming a crucial part of CockroachDB's ongoing development to support scalable and reliable distributed systems.
Jan 18, 2023
4,927 words in the original blog post.
The article, authored by Cassie McAllister, explores the strategic decision of three fintech companies—Form3, Stake, and finleap—to operate their platforms across multiple cloud providers, leveraging CockroachDB for enhanced resilience and flexibility. Form3, aiming to simplify global payment schemes, transitioned to a multi-cloud approach using AWS, GCP, and Azure to address regulatory concerns and ensure platform portability. Stake, an online trading company, evolved from a monolithic application to a microservices architecture, utilizing CockroachDB to manage data location and adhere to global regulations across AWS and GCP. Finleap, focusing on the regulated open banking sector, adopted a cloud-native architecture with CockroachDB to achieve cloud portability, enabling seamless application migration across various cloud environments and ensuring compliance. These cases highlight the growing trend towards multi-cloud strategies in fintech to mitigate disruptions, comply with regulations, and enhance operational efficiency.
Jan 12, 2023
1,333 words in the original blog post.
Cockroach Labs has been recognized by Built In as a top employer, winning in six categories on the 2023 Best Places to Work Awards, including both city-specific and national lists for best places to work and best midsize places to work. This achievement follows a year of growth and development for the company, emphasizing its commitment to fostering a culture of innovation, inclusivity, and respect. According to Sheridan Orr, Chief Marketing Officer at Built In, the honored companies have adapted to modern professional expectations by focusing on purpose, growth, and inclusion. Cockroach Labs has prioritized flexibility in its programs and values, aiming to provide a supportive environment for employees, which includes inclusive recruiting, flexible work opportunities, and a balance between personal and professional commitments. The company looks forward to continuing its mission of growth and learning, ensuring that all employees are empowered to excel in their roles.
Jan 11, 2023
397 words in the original blog post.
The rapid growth of sports betting, or real-money gaming, presents unique challenges in building efficient and compliant betting applications, especially given the regulatory landscape and user expectations. Essential elements for these applications include elastic scalability to handle fluctuating demand, consistency to ensure precise tracking of bets, resilience to avoid downtime during critical events, and low latency for optimal user experience. Multi-region architecture is vital, particularly in the U.S., due to legal constraints like The Wire Act, which necessitates geolocating data within specific state boundaries. Traditional approaches using databases like PostgreSQL can lead to complexity and potential data loss, while adopting a distributed SQL database like CockroachDB simplifies these challenges by supporting geolocation, minimizing data duplication, and automatically managing data distribution. This architecture, used by companies like Hard Rock Digital, enhances reliability and performance by using built-in tools for data replication and synchronization, supporting seamless scaling, and reducing the need for complex application logic.
Jan 05, 2023
1,627 words in the original blog post.