Posts

Showing posts from 2023

Optimizing pgbench for CockroachDB Part 3

Image
This is a long anticipated third article on optimizing pgbench for CockroachDB. I've been wanting to write a follow up ever since I learned about new improvements in the next release of CockroachDB. Previous articles Previous articles on PgBench and CockoachDB: Using PgBench with CockroachDB Serverless Optimizing PgBench for CockroachDB Part 1 Optimizing PgBench for CockroachDB Part 2 Motivation For the longest time CockroachDB only supported serializable isolation . In our next release after 23.1, CockroachDB will additionally support read committed isolation . The idea here is that users coming from other RDBMS tend to face many challenges with application migrations due to the excessive contention stemming from serializable isolation. To ease the migration woes, read committed isolation will provide an easy on-ramp for those applications. Since read committed isolation is less strict, it has additional benefits of being more performant at the cost of data anomali...

Secure schema migrations with Flyway and CockroachDB Dedicated

Image
CockroachDB Dedicated comes with TLS enabled by default. At the minimum, a certificate authority is needed to authenticate. A customer was having issues using Flyway and TLS. My previous articles on schema migrations and CockroachDB Migrating feature toggles with Unleash and CockroachDB Motivation A prospect was having issues with TLS and Flyway schema migrations and since both topics are near and dear to my heart I felt obligated to respond. High Level Steps Deploy a CockroachDB Dedicated cluster Configure Flyway Verify Demonstrate the problem Step by step instructions Deploy a CockroachDB Dedicated cluster Spinning up a CockroachDB Dedicated cluster is fairly straight forward. Follow this guide . Configure Flyway Setting up a Flyway migration depends on your deployment model. I don't use any sophisticated CI/CD pipeline and rely on Docker for my needs. I'm also using the community edition and limited to certain capabilities. You need a flyway director...

Emitting Protocol Buffers with CockroachDB CDC Queries

Image
As of this writing, CockroachDB does not have official support for protobuf payload as part of change data capture. Today, I am going to demonstrate a feature that may or may not land in CockroachDB proper. The product team is looking into viability of the feature before we can officially support it. Previous articles on CockroachDB CDC Using CockroachDB CDC with Apache Pulsar Using CockroachDB CDC with Azure Event Hubs Using CockroachDB CDC with Confluent Cloud Kafka and Schema Registry SaaS Galore: Integrating CockroachDB with Confluent Kafka, FiveTran and Snowflake CockroachDB CDC using Minio as cloud storage sink CockroachDB CDC using Hadoop Ozone S3 Gateway as cloud storage sink Motivation Protocol Buffers are language-neutral, platform-neutral extensible mechanisms for serializing structured data. It's a common choice for platforms needing to pass messages between systems. CockroachDB is a distributed SQL database built on a transactional and strongly-consi...

CockroachDB TIL: Volume 13

Image
This is my series of articles covering short "Today I learned" topics as I work with CockroachDB. Today, we're diagnosing cert issues, looking at client verification of server certificates differences in the cockroach and the psql clients, and checking the node and the CA certificate expiration programmatically. Previous articles Volume 1 Volume 2 Volume 3 Volume 4 Volume 5 Volume 6 Volume 7 Volume 8 Volume 9 Volume 10 Volume 11 Volume 12 Topics Topic 1: Diagnose certificate based authentication Topic 2: Differences between cockroach and psql clients for client verification of server certificates Topic 3: Capture the node and the CA certificate expiration programmatically Topic 4: Check the client certificate expiration Topic 1: Diagnose certificate based authentication I was using CockroachDB Serverless with a product called PolyScale.ai for an article I was writing and I've run into a strange issue with certificate-based authN. ...