Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google File System Consistency Model

I was reading about GFS and its consistency model but I'm failing to grasp some of it. In particular, can someone provide me with a specific example scenario (or an explanation of why it cannot happen) of:

  • concurrent record append that could result in record duplication
  • concurrent record append that could result in undefined regions
  • concurrent writes (on a single chunk) that could result in undefined regions
like image 264
Simone Avatar asked Jan 09 '15 16:01

Simone


People also ask

Does Google still use GFS?

More than a decade ago, Google built a new foundation for its search engine. It was called the Google File System — GFS, for short. But Google no longer uses GFS.

What filesystem does Google use?

Like any well-designed software system, all of Google is layered with a common set of scalable services. There are three main building blocks used by each of our storage services: Colossus is our cluster-level file system, successor to the Google File System (GFS).

What is Google file system GFS explain?

Google File System (GFS or GoogleFS, not to be confused with the GFS Linux file system) is a proprietary distributed file system developed by Google to provide efficient, reliable access to data using large clusters of commodity hardware.

What does consistency mean for replicated data in GFS?

Consistent: All clients will always see same data regardless of which replicas. • Defined: Consistent AND clients will see what a mutation. writes in its entirety. ● Guarantees by GFS.

What is global consistency in Google Cloud Storage?

Cloud Storage provides strong global consistency for the following operations, including both data and metadata: When you upload an object to Cloud Storage, and you receive a success response, the object is immediately available for download and metadata operations from any location where Google offers service.

What is the Google File System?

The Google File System, developed in late 1990s, uses thousands of storage systems built from inexpensive commodity components to provide petabytes of storage to a large user community with diverse needs [193].

What is the difference between consistent and inconsistent file regions?

→ A file region can be: + consistent: if clients see same data regardless of which replica they read from + defined: consistent, when a mutation succeeds without interference from concurrent writers + undifined :Concurrent successful Mutations + inconsistent: failed mutation GFS Design Overview: Consistency Model

What is Google File System (GFS)?

Early on when Google was facing the problems of storage and analysis of large numbers of Web pages, it developed Google File System (GFS) [22] and the MapReduce distributed computing and analysis model [23–25] based on GFS.


2 Answers

I'm quoting from http://research.google.com/archive/gfs.html. Check out Table 1, which is a summary of the possible outcomes for writes/appends:

Table 1 from GFS whitepaper

  1. "If a record append fails at any replica, the client retries the operation. As a result, replicas of the same chunk may contain different data possibly including duplicates of the same record in whole or in part." So any failure on a replica (e.g. timeout) will cause a duplicate record at least on the other replicas. This can happen without concurrent writes.

  2. The same situation that causes a duplicate record also causes an inconsistent (and hence undefined) region. If a replica failed to acknowledge the mutation, it may not have performed it. In that case when the client retries the append this replica will have to add padding in place of the missing data, so that the record can be written at the right offset. So one replica will have padding while other will have the previously written record in this region.

  3. A failed write can cause an inconsistent (hence undefined) region as well. More interestingly, successful concurrent writes can cause consistent but undefined regions. "If a write by the application is large or straddles a chunk boundary, GFS client code breaks it down into multiple write operations. They [...] may be interleaved with and overwritten by concurrent operations from other clients. Therefore, the shared file region may end up containing fragments from different clients, although the replicas will be identical because the individual operations are completed successfully in the same order on all replicas. This leaves the file region in consistent but undefined state [...]."

like image 89
Daniel Darabos Avatar answered Sep 18 '22 20:09

Daniel Darabos


I don't think it really has to do with concurrent append but wih the at least once semantics of their system.

Failure is a fundamental problem of large distributed systems. In the presence of failure a sender may not know if the computer on the other end of the network fully received its message.

For such occasions distributed systems guarantee that a message is either delivered either at most once or delivered at least once.

In this case, it appears GFS decided upon at least once delivery to the storage nodes.

like image 20
Michael Deardeuff Avatar answered Sep 20 '22 20:09

Michael Deardeuff