[关闭]
@xmruibi 2015-03-03T16:18:40.000000Z 字数 9584 阅读 837

Distributed FilealSystem and GFS/HDFS

cloud_computing


1. DFS

1. Architecture:

2. Attibutes List:

3. Attributes Detail

3.1 Process:

3.1.1 Stateless:
Simplicity(no need to enter a recovery phase if server crashed), but no gurantee to exeute request from;
3.1.2 Stateful:
widely used, achieve file lock, authentication, effective caches in WAN

3.2 Communication:

3.2.1 RPC (Remote Process Call)
NFS v3, NFS v4 difference: compound precedure. (lookup, open, read requests in a single PRC)
3.2.2 RPC2
- a. support for side effect: can communicate with using an application-specific protocol
- b. suport for multicasting: no need for sequential order for invalidate file, can be parallel sending

3.3 Naming

3.3.1 In NFS:
- complete transparent access to remote file system as maintained by server
- only explicity exported subdirectories can be mounted remotely
- path name depend on mount points

3.3.2 Name resolution: refer to the process of mapping a name to an object or multiple objects

3.3.3 Mount:
When to mount remote file system?
Boot time
+ Consistent view of FS
- May do unnecessary work
- Takes longer to boot
On explicit command by user
+ Give user control
- Require user to know & do things
Automount
+ “Subdirectories magically appear”
- “Subdirectories magically appear”

Automounting: Automount daemon always involved in every file operation!

Symbolic link

File Handle is a reference to file within a file system

3.3.4 Construct Global Name Space
- Similar to mount points, but deals with different file systems in WAN
- Explicitly separates resolution from file access
- Location service (per file system) handles mapping from name to location

3.4 Symchronization

3.4.1 Semantics of file sharing
On a single processor, when a read follows a write, the value returned by the read is the value just written.
In a distributed system with caching: there is only one file server and clients do not cache files, obsolete values may be returned.

3.4.2 File Locking:
Lock manager for stateless

3.4.3 Sharing Files in Coda:

3.5 Consistency and Replication

3.5.1 Client-side caching
each client can have a memory cache that contains data previously read from the server
file data, attributes, file handles, directories

Open delegation:
- Server delegate the opening of file to a client that requiested write permission.
- Server must can do callback to the client, when another client on different machine needs to obtain access right to the file.

3.5.2 Server-side replication
less common: file shariing is relativly rare; often only reading data; high degree of replication may lead to R/W ratio.

Two clients with a different Accessible Volume Storage Group (AVSG) for the same replicated file.
Coda takes optimistic approach for partition, uses Coda Version Vector (CVV) to resolve.

3.5.3 Replication in Peer-to-peer System

3.6 Fault Tolerance

3.6.1 Byzantine Failure

Client builds a quorum certificate from at least 2K replies from 3K others, with total order: (operation, view, number) of request

3.6.2 Fault Tolerance

Assumption: nodes fail independently with probability p
Replication (r extra copies) – can survive r failures:
Prob(accessible) = 1 - p^(r+1)
Storage increase = r+1 times more storage
Erasure Correction Coding (n,m) – can survive r=n-m failures:
Σ pn-i (1-p)i
Storage increase = n/m times more storage

3.7 Security

3.7.1 In NFS: RPC server stub(secure RPC)

2 HDFS

1 Basic Feature:

2 Fault Tolerance

3 Data Characterics

4. Architecture

4.1 Summary:

4.2 NameSpace

4.3 Name Node

4.4 Data Node

4.5 Data Replication

4.6 Replica Selection

4.7 Safemode Startup

4.8 Robustness

4.8.1 Objectives

4.8.2 DataNode failure and heartbeat

4.8.3 Re-replication

4.8.4 Data Integrity

3 GFS

1 Assumption of GFS Design

2 Architecture

2.1 Chunks

File -> chunks -> location of chunks (replicas)

2.2 Master server

Simplify design
Single point-of-failure
Limited number of files
Meta data kept in memory

Metadata:
    Metadata is stored in memory
    Namespaces
        Directory -> physical location
    Files -> chunks -> chunk locations
    Chunk locations
        Not stored by master, sent by chunk servers
    Operation log


Master Operation:
    All namespace operations
        Name lookup
        Create/remove directories/files, etc
    Manage chunk replicas
        Placement decision
        Create new chunks & replicas
        Balance load across all chunkservers
        Garbage claim 


    Rebalancing
        Redistribute replicas periodically 
            Better disk utilization
            Load balancing

2.3 Chunk servers

Multiple
Keep chunks of data
Accept requests on chunk data

Large chunk size: e.g., 64M
    Advantages
        Reduce client-master traffic
        Reduce network overhead – less network interactions
        Chunk index is smaller
    Disadvantages 
        Not favor small files
        hot spots  

2.4 Fault Tolerance

High availability 
    Fast recovery
    Chunk replication
    Master replication: inactive backup

Data integrity
    Checksumming 
    Incremental update checksum to improve performance
        A chunk is split into 64K-byte blocks
        Update checksum after adding a block 
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注