YugaByteDB tablet implementation

38 Views Asked by At

Reading this doc: https://docs.yugabyte.com/preview/architecture/core-functions/write-path/

Question 1: Can I think a node in yugabytedb is a machine with IP/port? Or a node can be multiple machines?

Question 2: Can I think a tablet as a service running in Linux that handles read/write for the given shard? How many tablets one machine can hold?

Thanks!

1

There are 1 best solutions below

0
dh YB On

Question 1: Can I think a node in yugabytedb is a machine with IP/port? Or a node can be multiple machines?

A node is a single machine/server/vps. At most, you want 1 yb-tserver & yb-master in a single server.

Question 2: Can I think a tablet as a service running in Linux that handles read/write for the given shard?

A tablet is a shard, think like a separate rocksdb database (actually a bit more complex). It's not a separate service.

1 yb-tserver process, is multi-threaded and hosts multiple tablets/shards.

How many tablets one machine can hold?

Tablet is the scaling unit. Each tablet can easily grow to 100GB+.

Each tablet has overhead. For a cluster with RF3, 1000 tablets have an overhead of 0.4vCPU for raft heartbeats (assuming 0.5s heartbeat interval), 300MB memory, 128GB disk-space for WAL (write-ahead log). See https://docs.yugabyte.com/preview/develop/best-practices-ysql/#tablets-per-server