November 2021 Summaries
14 posts from Cockroach Labs
Filter
Month:
Year:
Post Summaries
Back to Blog
Connection pooling is a technique used to reduce the overhead of opening and closing database connections by maintaining a pool of open connections that can be reused as needed. This approach helps improve application performance, especially at scale, by minimizing the expense of constantly opening and closing new connections. However, determining the optimal size for a connection pool requires considering various factors such as application interactions with the database, frequency of operations, database technology, hardware specifications, network latency, and more. CockroachDB recommends setting the maximum number of connections to be between 2x and 4x the number of CPU cores in your cluster for most workloads.
Nov 30, 2021
1,082 words in the original blog post.
This tutorial demonstrates how to create a complete web application using React, TypeScript, and CockroachDB. The app is a simulated gaming leaderboard that stores data in a CockroachDB Serverless database and uses serverless functions deployed on Netlify for communication between the front-end and back-end. The tutorial covers setting up the project with Create React App, creating a CockroachDB Serverless database, generating Prisma schema based on the database tables, creating serverless functions using Netlify Functions, and building the user interface with React and TypeScript. Finally, it explains how to deploy the application to Netlify and set up environment variables for the database connection string.
Nov 29, 2021
3,788 words in the original blog post.
Change Data Capture (CDC) is a powerful feature of CockroachDB that can impact the performance of a cluster. However, its highly configurable nature allows users to balance additional performance costs such as CPU usage and SQL latency to achieve desired changefeed behavior. This blog outlines various tradeoffs one can make while using CDC.
Changefeeds are CockroachDB's distributed change data capture mechanism that work by running on every node, sending messages from a node to a sink endpoint (like Kafka) as rows are updated/added/deleted in the watched table(s). Each node sends back checkpointing information to the aggregator node which updates the high watermark timestamp.
When tuning CDC for durability in the face of disaster, one should consider options like RequiredAcks (Kafka only), gc.ttl, protect_on_pause and pause_on_error, along with monitoring and alerting setup. For scaling and performance, batching, resolved timestamps, memory budget, message format, compression, scan request parallelism, time-based iterator, experimental poll interval, and number of changefeeds can be considered.
It's crucial to understand the costs and benefits of various priorities for your application while fine-tuning CDC for an exact fit with your application’s needs to keep your changefeed pipeline healthy and performant.
Nov 23, 2021
1,983 words in the original blog post.
Database contention occurs when multiple processes try to access the same data simultaneously, leading to processing delays and potential errors. This issue is particularly relevant for applications that have reached significant scale. To avoid contention issues, it's essential to understand isolation levels and ACID transactions, which ensure data integrity in a database. Common examples of contention include multiple transactions trying to update the same row or table at the same time. Diagnosing contention can be challenging but involves checking performance metrics, error messages, and querying internal tables. To resolve contention issues, consider using random index key values, breaking up large transactions into smaller ones, and increasing data normalization.
Nov 22, 2021
1,312 words in the original blog post.
A Universally Unique IDentifier (UUID) is a 36-character alphanumeric string used to identify information such as table rows. UUIDs are globally unique, making them ideal for use in distributed systems where each node can generate its own UUID autonomously without fear of duplication or consistency issues. They are widely used in various applications including databases, analytics systems, and web and mobile applications. There are different types of UUIDs: time-based (versions 1 and 2), name-based (versions 3 and 5), and random (version 4). Generating a UUID is straightforward using libraries or built-in functions in most programming languages and databases. In distributed SQL databases, UUIDs are often preferred over traditional sequential ID generation methods due to their ability to scale without creating performance bottlenecks.
Nov 22, 2021
1,723 words in the original blog post.
The article discusses how to run CockroachDB on Kubernetes. It explains the history of StatefulSets and their role in managing stateful workloads on Kubernetes, including CockroachDB. The author provides a step-by-step tutorial for running CockroachDB on Kubernetes using GKE. They also discuss how to use the CockroachDB cluster, access the CockroachDB console, simulate node failure, scale the CockroachDB cluster, and shut down the CockroachDB cluster. The article concludes with suggestions for next steps such as writing applications that use the CockroachDB cluster, modifying how the cluster is initialized, setting up monitoring tools, and contributing to CockroachDB's development.
Nov 17, 2021
1,637 words in the original blog post.
Cockroach Labs is a company that values work-life balance and supports its employees with comprehensive parental leave policies. The company extends eligibility for parental leave to all parents, including those adopting or fostering children. Parents receive $500 baby bucks, benefits support through Cocoon and family support resources through Cleo, 12 weeks of Parental Leave plus two weeks of paid PTO, flexibility in utilizing the leave, a ReRoachmate pairing upon return, 12 weeks of Family Fridays, and access to a Slack channel for parents. The company's leadership team embraces these policies, setting an example for other employees. Cockroach Labs allows working parents to focus on their families while maintaining successful careers.
Nov 17, 2021
882 words in the original blog post.
Cockroach Labs has released CockroachDB 21.2, a highly scalable and resilient relational database designed to improve the developer experience and ease of operations at scale. The new version includes seamless integration with event-driven data architectures using CockroachDB's distributed Change Data Capture (CDC), enabling developers to stream data updates to any HTTPS endpoint. It also offers a better developer experience, including new SQL syntax, additional query performance data in the monitoring UI and CLI, and new integrations with popular tools like Alembic and Sequelize. Additionally, CockroachDB 21.2 provides improvements for large-scale clusters, disaster preparedness, and recovery operations, making it easier to operate at massive scale.
Nov 16, 2021
1,116 words in the original blog post.
Real money gambling applications require a stable, reliable payment processing system and real-time processing engine that can support millions of concurrent users. CockroachDB's geolocation capabilities enable data restriction at the database, table, and row level to meet global compliance requirements for online gambling industry. Its multi-active resilient architecture ensures high availability and fault tolerance, while its horizontal scaling capabilities eliminate the need for manual sharding. Building on CockroachDB's scalable foundation prepares gambling operators for success in a competitive market.
Nov 15, 2021
1,155 words in the original blog post.
Compliance is adherence to policies that govern a company's information and cyber security. Organizations should start thinking about compliance when they offer products or services that could impact the confidentiality, integrity, or availability of their customers' information or data. Common compliance frameworks include Service Organization Controls (SOC) 1 and 2, International Standards Organization (ISO) 27001, Payment Card Industry Data Security Standards (PCI DSS), Health Information Trust Alliance (HITRUST), and Federal Risk and Authorization Management Program (FedRAMP). To achieve compliance goals, organizations can use tools/software, hire a consultant, or hire a compliance specialist. Cockroach Labs took a hybrid approach of hiring a consultant to design controls and then hiring a compliance specialist to manage the workloads.
Nov 11, 2021
2,669 words in the original blog post.
Cockroach Labs introduced Free Fridays in 2016 as a non-traditional way to support work-life balance for its employees. The program allowed employees to have one day a week where they could self-manage their time, leading to increased happiness and productivity. However, as the company grew and new teams were introduced, Free Fridays evolved into Flex Fridays in 2019 to accommodate different needs within the organization while maintaining the spirit of flexibility and balance. Today, each department defines what Flex Fridays mean for them, with a common goal of removing meetings, encouraging focus, and creating a more balanced work week.
Nov 09, 2021
1,009 words in the original blog post.
In this codelab, we will walk through the process of creating an image recognition engine using Google's machine learning capabilities and CockroachDB Serverless. The primary purpose of this engine is to identify employees entering a building who may or may not be wearing a mask. This can assist with return-to-office scenarios and possible contact tracing, enhancing building safety and awareness. We will leverage Google’s Vision API product and CockroachDB Serverless to store and retrieve data. The estimated lab time is 45 minutes.
Nov 08, 2021
2,949 words in the original blog post.
Serverless databases are ideal for businesses with spiky or unpredictable workloads as they can scale up and down automatically in response to changes in demand. They offer cost savings by billing users based on actual storage and compute usage, rather than the machine. Additionally, serverless databases minimize operational efforts required for scaling, making them a good choice for development teams that want to focus on application building. However, they may not be suitable when control over hardware is needed or in cases where high-security workloads require dedicated solutions.
Nov 03, 2021
1,691 words in the original blog post.
Optimizing Distributed Databases for Game Development: Tips from Heroic Labs. Chris Molozian, CEO of Heroic Labs, shares insights on optimizing distributed databases for game development using CockroachDB. Two key areas highlighted are garbage collection and the use of UUIDs. Garbage collection is crucial in scaling games due to frequent write workloads, and developers need to tune garbage collection parameters at different levels. Using UUIDs enables unique identification without creating performance bottlenecks in distributed systems.
Nov 01, 2021
866 words in the original blog post.