Best Practices

Local vs remote SSDs

Kubernetes gives users the option of using remote disks using dynamic provisioning or local storage which has to be pre-provisioned.

Local storage gives great performance, but the data is not replicated, and can be lost if the node fails. This option is ideal for databases, like YugabyteDB, that manage their own replication and can guarantee high availability (HA).

Remote storage has slightly lower performance but the data is resilient to failures. This type of storage is absolutely essential for databases that do not offer HA (for example, traditional relational databases, like PostgreSQL and MySQL).

Below is a table that summarizes the features and when to use local or remote storage.

Local SSD storageRemote SSD storage
Provision large disk capacity per nodeDepends on cloud-providerYes
Ideal deployment strategy with YugabyteDBUse for latency sensitive apps Add remote storage to increase capacity / cost-efficient tieringUse for large disk capacity per node
Disk storage resilient to failuresNoYes
Performance - latencyLowerHigher
Performance - throughputHigherLower
Typical cost characteristicsLowerHigher
Kubernetes provisioning schemePre-provisionedDynamic provisioning

Thus, it is generally preferable to use local storage where possible for higher performance and lower costs. The GKE section shows how to deploy YugabyteDB on Kubernetes using local SSDs.