YugaByte DB

The YugaByte Database Blog

Thoughts on open source, cloud native and distributed databases

How Does the Raft Consensus-Based Replication Protocol Work in YugaByte DB?

As we saw in ”How Does Consensus-Based Replication Work in Distributed Databases?”, Raft has become the consensus replication algorithm of choice when it comes to building resilient, strongly consistent systems. The YugaByte DB database uses Raft for both leader election and data replication.Instead of having a single Raft group for the entire dataset in the cluster,

Read More

How Does Consensus-Based Replication Work in Distributed Databases?

Whether it be a WordPress website’s MySQL backend or Dropbox’s multi-exabyte storage system, data replication is at the heart of making data durable and available in the presence of hardware failures such as machine crashes, disk failures, network partitions and clock skews. The basic idea behind replication is very simple: keep multiple copies of data on physically isolated hardware so that the failure in one does not impact the others and as a result,

Read More

A Quick Guide to Secondary Indexes in YugaByte DB

When creating a Cassandra-compatible YCQL table in YugaByte DB, you are required to create a primary key consisting of one or more columns of the table. Primary key based retrievals are efficient because YugaByte DB automatically indexes/organizes the data by the primary key. However, there are many use-cases where you may need to retrieve data using columns that are not a part of the primary key.

Read More

6 Signs You Might be Misunderstanding ACID Transactions in Distributed Databases

As described in A Primer on ACID Transactions, first generation NoSQL databases dropped ACID guarantees with the rationale that such guarantees are needed only by old school enterprises running monolithic, relational applications in a single private datacenter. And the premise was that modern distributed apps should instead focus on linear database scalability along with low latency, mostly-accurate,

Read More

A Primer on ACID Transactions: The Basics Every Cloud App Developer Must Know

ACID transactions were a big deal when first introduced formally in the 1980s in monolithic SQL databases such as Oracle and IBM DB2. Popular distributed NoSQL databases of the past decade including Amazon DynamoDB and Apache Cassandra initially focused on “big data” use cases that did not require such guarantees and hence avoided implementing them altogether. However, ACID transactions are making a strong comeback in the last 2 years with the launch of next-generation distributed databases that have built-in support for them.

Read More

Polyglot Persistence vs. Multi-API/Multi-Model: Which One For Multi-Cloud?

Modern app architectures rely on data with different models and access patterns. Polyglot persistence, first introduced in 2011, states that each such data model should be powered by an independent database that is purpose-built for that model. The original intent was to look beyond relational/SQL databases to the emerging world of NoSQL.


Polyglot Persistence in Action at an E-Commerce App (Source: Martin Fowler)

The Messy Reality of Polyglot Persistence

Polyglot persistence is not free of costs — it leads to increased complexity across the board.

Read More

A Busy Developer’s Guide to Database Storage Engines — The Basics

When evaluating operational databases, developers building distributed cloud apps tend to focus on data modeling flexibility, consistency guarantees, linear scalability, fault tolerance, low latency, high throughput and easy manageability as high priority concerns. However, it is essential to have a good understanding of the underlying storage engine to reason about how the database actually delivers on these core promises.

Read More

A Busy Developer’s Guide to Database Storage Engines — Advanced Topics

In the first post of this series, we learnt about the B-Tree vs LSM approach to index management in operational databases. While the indexing algorithm plays a fundamental role in determining the type of storage engine needed, advanced considerations highlighted below are equally important to take into account.

Consistency, Transactions & Concurrency Control

Monolithic databases,

Read More

YugaByte DB 1.0 — A Peek Under The Hood

Modern user-facing apps, like E-Commerce and SaaS, frequently require features from multiple databases (broadly — SQL, NoSQL and a cache) to support their multi-workload needs. App developers are responsible for understanding and managing which pieces of data should be stored in which SQL and NoSQL database. Furthermore, the app is also responsible for moving data across the tiers (e.g.

Read More