Explore YugabyteDB’s key capabilities including distributed SQL, horizontal scalability, and high availability
YugabyteDB delivers powerful distributed database capabilities that combine the best of traditional RDBMS with modern NoSQL systems. This page explores the core features that make YugabyteDB an ideal choice for cloud-native applications.
The strongest isolation level, preventing all concurrency anomalies.
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; -- All reads see a consistent snapshot -- Writes are serialized globally UPDATE accounts SET balance = balance - 100 WHERE id = 1; UPDATE accounts SET balance = balance + 100 WHERE id = 2;COMMIT;
Use when: Absolute correctness is required (financial transactions, inventory management)
Provides a consistent snapshot for all reads in the transaction.
BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ; -- All reads see the same snapshot SELECT SUM(balance) FROM accounts; -- No other transaction can modify these rowsCOMMIT;
Use when: You need consistent reads without write conflicts (reporting, analytics)
Each statement sees a consistent snapshot as of the statement start.
BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED; -- Each statement sees latest committed data SELECT * FROM products WHERE id = 1; UPDATE products SET stock = stock - 1 WHERE id = 1;COMMIT;
Use when: PostgreSQL compatibility is important, moderate concurrency needed
Read Committed is enabled by default in v2025.2+ for PostgreSQL compatibility.
BEGIN; -- Debit from one account UPDATE accounts SET balance = balance - 500 WHERE account_id = 'acc_001'; -- Credit to another account UPDATE accounts SET balance = balance + 500 WHERE account_id = 'acc_002'; -- Both updates succeed or both failCOMMIT;
-- Range-sharded tableCREATE TABLE timeseries_data ( timestamp TIMESTAMP, sensor_id INT, value FLOAT, PRIMARY KEY (timestamp, sensor_id)) SPLIT INTO 10 TABLETS;
How it works:
Data sorted by primary key
Split into contiguous ranges
Each range stored in a tablet
Best for:
Time-series data
Range queries on primary key
Ordered data access
Place data in specific geographic regions:
-- Create tablespaces for different regionsCREATE TABLESPACE us_west_tsWITH (replica_placement='{"num_replicas": 3, "placement_blocks": [{"cloud":"aws","region":"us-west-2"}]}');CREATE TABLESPACE eu_tsWITH (replica_placement='{"num_replicas": 3, "placement_blocks": [{"cloud":"aws","region":"eu-central-1"}]}');-- Partition table by regionCREATE TABLE users ( user_id UUID, region VARCHAR(20), data JSONB) PARTITION BY LIST (region);CREATE TABLE users_us PARTITION OF users FOR VALUES IN ('us-west', 'us-east') TABLESPACE us_west_ts;CREATE TABLE users_eu PARTITION OF users FOR VALUES IN ('eu-west', 'eu-central') TABLESPACE eu_ts;
Impact: No downtime, writes continue with 2 replicas
Recovery: Automatic re-replication to maintain 3 copies
Multi-zone deployment:Zone A: Node 1 [Leader]Zone B: Node 2 [Follower] Zone C: Node 3 [Follower]Zone A fails:❌ Zone A: Node 1Zone B: Node 2 [NEW LEADER]Zone C: Node 3 [Follower]
Tolerates: Loss of any single availability zone
Requires: Deployment across 3+ zones
For fault tolerance, you need at least 3 nodes with replication factor 3. With RF=3, you can tolerate 1 node failure. With RF=5, you can tolerate 2 node failures.
-- Create indexesCREATE INDEX idx_category ON products(category);CREATE INDEX idx_price ON products(price);-- Query uses both indexes via bitmap scanSELECT * FROM productsWHERE category = 'electronics' AND price < 1000;