November 2022 Summaries
14 posts from Cockroach Labs
Filter
Month:
Year:
Post Summaries
Back to Blog
The blog discusses the challenges and solutions Starburst has implemented to achieve high availability and low latency for a global user base, focusing on their use of CockroachDB. Starburst, a company known for its SQL-based MPP query engine, addresses the complexities of distributed data by deploying a cloud-agnostic, multi-region architecture to ensure efficient data access and uptime across diverse geographies. They prioritize read latency by utilizing CockroachDB’s global table locality, while strategically planning for region failures to maintain data availability for users in the United States, Europe, Asia Pacific, and South America. By collaborating with Cockroach Labs, Starburst has successfully configured a system that balances the nuances of read and write latencies and supports their extensive data management needs. The company’s commitment to multi-cloud architecture and its future plans for separating storage from compute reflect their dedication to delivering robust solutions for a distributed data environment.
Nov 29, 2022
1,158 words in the original blog post.
Database migrations are often necessary when applications outgrow their current databases, when businesses move away from legacy technology, or when the existing database no longer fits the application's needs. These migrations can be simplified using tools like CockroachDB, which offers a schema conversion tool and support for AWS DMS (Database Migration Service). The schema conversion tool helps migrate schema from databases such as PostgreSQL to CockroachDB by identifying necessary changes for optimal performance in a distributed system. AWS DMS facilitates data transfer between endpoints, even if only one is on AWS, using CockroachDB's PostgreSQL wire compatibility. This process typically involves creating a replication instance, setting up source and target endpoints, and creating a migration task. CockroachDB's offerings aim to make database migrations faster and easier, supported by detailed documentation and community resources for users seeking to transition to distributed databases.
Nov 28, 2022
1,198 words in the original blog post.
Merchants like SeatGeek seek to simplify and enhance their payment systems through automation and API-driven approaches, while also adhering to standard data protection requirements. Spreedly, a payments orchestration service, transitioned from a legacy database to CockroachDB to address challenges in scaling and security associated with their previous NoSQL database. This migration allowed Spreedly to consolidate legacy systems and improve their architecture, resulting in better performance, high availability, and security for a global audience. CockroachDB enables Spreedly to store essential transactional data necessary for connecting customers to various service providers in the payments ecosystem. As Spreedly continues to expand their database topology to new regions, they aim to maintain fairness and flexibility in the industry, benefiting both large and small merchants.
Nov 20, 2022
876 words in the original blog post.
In response to Heroku's discontinuation of its free plans, developers are advised to consider migrating from Heroku Postgres to CockroachDB serverless, which offers a robust free tier and distinct advantages such as increased storage capacity and flexible scaling options. The process involves several key steps, including exporting the database schema and data from Heroku using pg_dump, creating a CockroachDB account, setting up a serverless cluster, and utilizing CockroachDB's schema conversion tool to facilitate the migration. The tutorial provides detailed instructions on importing the data using various methods, including local file imports and cloud storage commands, ensuring that even those unfamiliar with the intricacies of database migration can follow along. The guide underscores the benefits of CockroachDB's cloud-native architecture, which allows for automatic scaling and customizable spending limits, making it an appealing alternative for developers seeking a cost-effective and scalable solution after Heroku's changes.
Nov 17, 2022
2,670 words in the original blog post.
Distributed databases, which operate across multiple interconnected servers or nodes, have become a mainstream solution offering several advantages over traditional single-instance databases. They enhance resilience by replicating data across instances, ensuring continued operation even if one instance fails, and allow for easier scalability by adding nodes as needed. These databases can improve performance by distributing workloads and, when geographically spread, reduce latency for end-users. Two primary types are NoSQL and distributed SQL databases, with the former being more flexible and the latter maintaining strict data consistency. Configurations like active-passive, active-active, and multi-active each have their pros and cons in terms of availability and consistency. Although distributed databases can be more complex to manage, they offer substantial benefits for mission-critical workloads, making them an attractive option for many organizations, especially in cloud-based or hybrid environments.
Nov 16, 2022
2,847 words in the original blog post.
Black Friday presents significant challenges for inventory management systems due to the surge in shopper activity, requiring systems to ensure scalability, high availability, low latency, and consistency. Retailers must prepare for unpredictable demand by utilizing flexible, distributed, cloud-based architectures that can quickly scale resources and maintain service continuity. High availability is crucial to avoid financial losses from system outages that could lead to overselling or a poor customer experience. Low latency is essential to keep shoppers satisfied and prevent them from turning to competitors. Consistency across all system components is vital to prevent errors like selling beyond zero stock. Modern solutions such as distributed SQL databases like CockroachDB provide the necessary transactional consistency and scalability, with built-in features like Change Data Capture to keep application services updated without overwhelming the database. While no system can entirely alleviate the stress of Black Friday, such architectures significantly ease the management of high traffic and complex transactions.
Nov 14, 2022
1,514 words in the original blog post.
Upsert in SQL is a database operation that combines updating existing records and inserting new ones, depending on whether a specified value already exists in a table. Although the term "upsert" might not appear in all database management systems (DBMS) documentation, it is a crucial operation for managing data efficiently. Different relational database management systems (RDBMS) such as MySQL, PostgreSQL, and CockroachDB handle upserts with varying syntax and commands. In MySQL, upserts are performed using the "INSERT ... ON DUPLICATE KEY UPDATE" command, while PostgreSQL uses "INSERT ON CONFLICT" to manage conflicts with more control over the operation. CockroachDB offers a dedicated UPSERT command, which simplifies the process by not requiring a conflict target or action, although it can also utilize "INSERT ON CONFLICT" for specific scenarios. Each method has its own advantages and use cases, and understanding these can help optimize database operations and handle data conflicts effectively.
Nov 11, 2022
1,322 words in the original blog post.
As retailers prepare for the surge in online sales during Black Friday and Cyber Monday, they are implementing strategies learned from the pandemic's unprecedented digital traffic to prevent logistical issues. Approaches like extending promotions into a "Cyber Month" and using lottery systems are employed to manage customer expectations, while some companies opt out of sales altogether. The focus is on maintaining robust ecommerce infrastructure to handle high traffic without downtime, ensuring accurate pricing and inventory information, and protecting customer privacy. CockroachDB is highlighted as a solution for these challenges, offering high availability through data replication, consistent transactions, and geo-partitioning to comply with global data privacy regulations. As ecommerce continues to grow, retailers are prioritizing scalable and resilient systems to meet evolving consumer demands.
Nov 10, 2022
967 words in the original blog post.
The article by Jon St. John discusses the challenges and strategies for optimizing write latency in global tables within CockroachDB, a multi-region database. Global tables allow low-latency, non-stale reads from all regions but can suffer from high write latency, potentially reaching 800ms with default settings in globally distributed clusters. The article outlines several optimizations to reduce this latency, including adjusting the maximum clock offset, lowering the side transport interval, and utilizing measured network round-trip times, which can bring latency down to as low as 250ms. These improvements make global tables more viable for workloads with a high read-to-write ratio and where low read latency is crucial. The piece also highlights the trade-offs involved, such as increased CPU usage and network traffic, and provides guidance on measuring follower read efficiency to ensure optimal configuration.
Nov 08, 2022
3,220 words in the original blog post.
The article, written by Julian Levi Hernandez, explores the benefits of using Vector by Datadog in conjunction with CockroachDB for data collection and delivery, particularly in self-hosted environments. Hernandez shares his early challenges with creating a paging alert system using Bash scripts, highlighting the limitations of available tools at the time. He later discovered Vector, an open-source and flexible tool offering seamless data delivery to multiple monitoring platforms without the resource conflicts common with multi-agent collectors. Vector's ability to use "Sources" for data collection, "Transforms" for data cleansing and customization, and "Sinks" for data delivery empowers users to manage complex data flows efficiently. Despite its learning curve, Vector's community-maintained flexibility allows users to tailor data collection and alerting solutions to their specific needs, making it an attractive option for monitoring distributed database clusters like CockroachDB.
Nov 07, 2022
1,033 words in the original blog post.
Private CockroachDB clusters and egress perimeter controls have been introduced to enhance network security by addressing data exfiltration risks and insider threats, particularly in Database as a Service (DBaaS) environments. These private clusters eliminate the need for public IPs on cluster nodes, using cloud provider-specific NAT gateways to route egress traffic securely, and enable access to cloud buckets through private networks. Egress perimeter controls provide a cloud-agnostic virtual firewall to manage egress traffic rules, allowing organizations to switch between ALLOW-ALL and DENY-ALL modes for enhanced security. This approach offers a seamless and secure way to manage data flow, reducing the complexity and cost associated with traditional proxies or firewalls, and aligning with zero-trust security models. Organizations can opt-in for private clusters on AWS or default to them on GCP, enabling secure, managed connectivity while maintaining the flexibility and management ease of CockroachDB dedicated services.
Nov 04, 2022
1,131 words in the original blog post.
Modern gaming services require a sophisticated backend architecture to address crucial demands such as near-instant consistency, resilient availability, elastic scalability, low latency, and minimal complexity. Traditionally, game developers created bespoke systems for each game, but the industry has shifted towards separating game content creation from backend service development. This approach allows for more efficient development but also introduces challenges, as backend services need to support multiple games across various regions and handle high user expectations. Key requirements include ensuring transactions like microtransactions and player entitlements are immediate and globally consistent, maintaining high availability to prevent data loss during outages, and supporting elastic scalability to handle varying workloads. Utilizing Kubernetes for automated scaling and employing distributed databases like CockroachDB can meet these demands by offering consistency, availability, and low latency through multi-region capabilities, while also minimizing complexity by integrating smoothly with existing systems. This architecture is critical for both large gaming companies and indie developers to provide a seamless gaming experience and support the dynamic nature of the gaming industry.
Nov 03, 2022
1,559 words in the original blog post.
The blog post discusses the complexities of implementing identity and access management (IAM) in applications, highlighting the challenges developers face when building permission systems and advocating for outsourcing to specialized platforms like Authzed and SpiceDB. Inspired by Google's Zanzibar paper, Authzed founders Jake Moshenko, Joey Schorr, and Jimmy Zelinskie developed SpiceDB, an open-source database designed to manage application permissions with a focus on high performance, scalability, and reliability. SpiceDB offers a flexible schema language that supports various access control models and enables globally deployed, cost-effective permissions management without vendor lock-in, leveraging a distributed backend such as CockroachDB for consistency and availability. The post encourages exploring SpiceDB's open-source capabilities and Authzed's managed services for enhanced security and efficiency in IAM solutions.
Nov 02, 2022
1,172 words in the original blog post.
In the digital age, inventory management poses significant challenges due to the complexity of maintaining consistency, scalability, and low latency across various sales channels, both online and offline. The technical difficulties include ensuring real-time accuracy in stock levels, managing geographically partitioned databases, and handling product complexities such as items being moved, lost, or damaged. Effective inventory systems require high availability, global consistency, and flexible scaling to handle peak sales without overspending. CockroachDB is highlighted as a solution for its ability to maintain consistency and scalability by offering multi-region support and a change data capture feature that enables real-time updates without overloading primary databases. This approach allows application services to stay synchronized with inventory data without constant querying, which would otherwise impact performance. The article provides examples of how major retailers use robust database architectures to support scalable and resilient inventory management systems, illustrating the importance of choosing the right tools and architecture to meet diverse business needs.
Nov 01, 2022
1,965 words in the original blog post.