Bigtable 是每一个操作还是批量写入日志?

Does Bigtable write operations to the log for every single operation or in batches?

我想知道 Google 的 Bigtable 如何保持持久性。当写入操作进来时,tablet 服务器更新内存中的 "hashmap" 并将其写入日志文件。这样,如果 tablet server 死了,一个新的 tablet server 可以读取所有最近的操作并且 "equal" 到死的 tablet。

这是有道理的,但是将每个操作写入日志服务器而不是批量写入(因为它被写入磁盘)不会减慢速度吗?

让我们依次回答这些问题。

Does Bigtable write operations to the log for every single operation or in batches?

Bigtable 在每个操作进入时将其写入持久日志,而不是批量写入。换句话说,它是同步的,而不是异步的:当服务器响应客户端时,数据已经写入日志(持久且可复制),而不仅仅是内存。

如果存储系统只写入内存,并分批写入日志,如果服务器在接受一些写入后崩溃,但在将它们刷新到日志之前,它将丢失仅在内存中的数据日志。

This makes sense, but doesn't it slow down to write every operation to a log server rather than in batch (because it is written to a disk)?

Bigtable(以前称为 Google File System, now Colossus)背后的分布式文件系统比典型的文件系统快得多,即使它是分布式的并且每次写入都会被复制。

在基准测试中使用 YCSB, Google Cloud Bigtable has demonstrated single-digit millisecond latency 读取和写入,甚至在尾部: