Implications on Server-Side Write Buffering

In this lesson, we look at a problem with server-side write buffering in a distributed file system.

We'll cover the following

Our focus so far has been on client caching, and that is where most of the interesting issues arise. However, NFS servers tend to be well-equipped machines with a lot of memory too, and thus they have caching concerns as well. When data (and metadata) is read from disk, NFS servers will keep it in memory, and subsequent reads of said data (and metadata) will not go to disk, a potential (small) boost in performance.

More intriguing is the case of write buffering. NFS servers absolutely may not return success on a WRITE protocol request until the write has been forced to stable storage (e.g., to disk or some other persistent device). While they can place a copy of the data in server memory, returning success to the client on a WRITE protocol request could result in incorrect behavior; can you figure out why?

Example

The answer lies in our assumptions about how clients handle server failure. Imagine the following sequence of writes as issued by a client:

Get hands-on with 1200+ tech skills courses.