Mapping Technology Trends to Enterprise Product Innovation

Scope: Focusses on enterprise platform software: Big Data, Cloud platforms, software-defined, micro-services, DevOps.
Why: We are living in an era of continuous change, and a low barrier to entry. Net result: Lot of noise!
What: Sharing my expertise gained over nearly two decades in the skill of extracting the signal from the noise! More precisely, identifying shifts in ground realities before they become cited trends and pain-points.
How: NOT based on reading tea leaves! Instead synthesizing technical and business understanding of the domain at 500 ft. 5000 ft., and 50K ft.

(Disclaimer: Personal views not representing my employer)

Wednesday, November 12, 2014

Part III: Nuts-and-bolts of a Scale-out Distributed Storage System

This post covers Data Consistency.

Broadly speaking, Data Consistency represents an agreement between the application developer and the persistence layer. The purpose of this post is to map the observable behavior of consistency to the underlying building blocks/services.

 The granularity of guarantees can be on a per-object basis or at a broader namespace granularity e.g., objects within the same container/directory. Our focus in this post is on independent updates on objects. We deal with transactions as a separate topic, which consists of dependent updates on objects.

There are different models for consistency. The POSIX model requires that reads reflect any data previously written, and that writes are atomic (i. e. the result of overlapping, concurrent writes will reflect a particular order of occurrence).  In an eventually consistent system, the applications can relax the POSIX constraints and can settle for read-your-writes or monotonic reads.

The key building blocks are:
  • Read-Write Serialization (Single node): This is a single node perspective for read-write operations on the same object (also referred to as coherence model). This is analogous to memory coherence models that aim to define the order in which updates will be visible during read-write operations to a given register – there is a vast body of work defining coherence models such as MESI, Java Memory model, etc. A commonly used model in storage system is the taxonomy defined by Lamport (Safe, Regular, and Atomic). POSIX defines read-write exclusion, and roughly translates to Atomic in Lamport’s taxonomy. 
  • Write-Write Serialization (Single node): Defines how concurrent update to the same object are handled. The easiest model from an implementation standpoint is LWW (Last Writer Wins), but is the most non-deterministic from the application developer’s perspective, given the asynchrony in message delivery.
  • Serialization of writes across replicas: This captures how the replicas reflect the updates:
    • Scheduling of writes to replicas
    • Ordering of writes to replica (including byte order fidelity in the replica copies)
    • Handling of partial failures during replica update
  • Serialization of reads across replicas:
    • Read access protocol across replicas
    • Read-write exclusion guarantee on replica 




Part II: Nuts-and-bolts of a Scale-out Distributed Storage System

This post covers Data Durability.

Data Durability ensures minimal data loss in the event of hardware failures, component corruption, software bugs. The most common approach for data durability is to create multiple copies of data. Both of them have pros and cons. Replication imposes overheads w.r.t. space usage (e.g., 3X the capacity), but is cheaper w.r.t. partial update overheads and the amount of data required to be read during recovery. Erasure coding across nodes has the inverse pros/cons compared to replication.
With the adoption of All-Flash environments, erasure coding is getting lot of attention in recent research.


The key building services are:

•       Replica Placement: Replica placement needs to take into account:
–      Fault domain-awareness for namespace and replica distribution
–      Replica Server Allocation: Deciding the replica servers for namespace
•       Replication Orchestration: Deals with the actual mechanism for the actual data replication process. There are overlapping aspects with data consistency
–      Read-write protocol for replicas
–      Coordination (serialization and ordering) of updates to replicas
–      State versus operation-based replication
•       Replica repair: While a writes are committed across a quorum of replicas, a replica can get out-of-sync and needs repair under the following scenarios:
–      Offline replica connects back
–      Conflict in replica updates especially in AP systems (i.e., any replica update model without quorum consensus).
•       Data Integrity/Scrubbing: This involves storing checksums and accessing the disk blocks in the background thread to guarantee data correctness.  
•       Geo-redundancy service: Replication across sites. The aspects are similar to replication with data center, with the additional aspect of network optimization techniques.




Part I: Nuts-and-bolts of a Scale-out Distributed Storage System

In this post, we cover Core Services.


These represent the bare-bones services for a distributed management framework.


·      Cluster Management: Responsible for tracking the state and membership of the nodes within the cluster. It involves the following aspects:
  •  Tracking cluster membership: This could be centralized or distributed, and responsible to track the state (up, failed, partitioned) and membership of nodes within the cluster.
  • Role Selection process: Depending on the cluster taxonomy  (symmetric versus asymmetric), the service needs to decide how the data and metadata coordination tasks are distributed among the nodes. The service could trigger a re-assignment of namespace or election of a new master/coordinator using a consensus protocol among the cluster components.
  •  Communication middleware between cluster components: This is the middleware by which components communicate within the cluster. Ideally, the middleware should provide in-order, guaranteed delivery of messages.



·      Namespace Metadata Management: Responsible for tracking the namespace exported to applications, and the persistence and consistency of the metadata.
•       Sharding: Dividing the namespace serving responsibility among the nodes.
•       Deciding the Namespace-to-Resource Mapping
•       Object lookup strategies: How the client accesses the object
•       Handling heterogeneous HW: Accounting for different hardware capabilities
•       Metadata persistence and durability: Division of responsibility among cluster components in maintaining metadata: a) Metadata structures for tracking (superblock, inode, dentry, fd); b) Free space tracking and allocation (Ensuring space allocation in parallel, Book-keeping of free-space); C) Operation log structure. This also includes metadata durability i.e., how metadata is replicated within the system.
•       Metadata serialization: Deals with coordination of metadata updates across multiple concurrent updates.
•       Metadata Crash Recovery: Ensuring consistent state of metadata after a crash: a) Transactional updates across md components; b) Rollback for failed updates.

·      Data Persistence: Deals with making sure that committed data is reliably persisted, with reasonable parallelism and latency (given that disks have traditionally been the slowest component in the IO path).
o   Write Buffering: Deferring updates to persistent media – essentially equivalent to group commit semantics in databases. In the era of hard-disk latencies, buffering was critical for application performance.  Buffering needs to be compliant with coherence semantics for read-write operations w.r.t. reflecting the updates.  
o   Caching: Maintaining commonly accessed data in memory to reduce traffic to the persistent storage. Caching typically refers to reads, while buffering refers to writes. The aspects involved in the caching design are:  
§  What: Data versus Metadata layout
§  Where: Clients, metadata nodes, Data nodes
§  When: Prefetching, on reads, on writes, -access,..
§  How:
·      Algorithms to cache the most active data;
·      In-memory layout
§  Invalidation protocol:
·      Handling Data updates
·      Handling Metadata changes (ACL, resource map,..)
§  Multi data-center caching coordination
§  Bolt-on caching models: Memcache, INDG,..
o   Persistence Storage Writer: This service is responsible for writing data to disk. There are multiple aspects involved:
§  Layout on disk: This involves the following:
·      On-disk format
·      Stripping data across disks and nodes
·      Tiering of data across memory/flash/disks
·      Resource allocation across resources via LVM or local FS
§  Data mutability model: Some of the aspects involved are: a) how new writes are persisted; b) tracking updates to existing data; c) tracking deletes in immutable storage
o   Garbage collection: For out-of-place updates, reclaiming the space for the original blocks

Part 0: Nuts-and-bolts of a Scale-out Distributed Storage System

I am starting a series to post to define the taxonomy of a scale-out distributed storage system. These systems were originally applied at scale in Web 2.0 companies namely Google, Facebook, LinkedIn, etc., and now are getting mainstream enterprise adoption in the form of Big Data Solutions, Cloud Provider backend, Appliances (VMW's EVO:RAIL, Nutanix, etc.), scale-out volume managers (VMW's vSAN), distributed filesystems (Isilon's OneFS, IBM's GPFS SNC, etc.).

A distributed data management system exposes interfaces such as blocks (volume managers), files (filesystems), tables, KV, tuples, etc. The interface typically supports standard data and metadata operations to create, read, write, delete, list. Under the covers, these systems implement multiple services to provide consistency, availability, fault tolerance, durability, performance, manageability. These services address the hard distributed problems for dealing with asynchrony, partial failures, unbounded component latencies. These services can be viewed as “micro services” (in cloud terminology), and implemented as stand-alone, stateless daemons, or in-line during read/write operations.

While there are different ways to slice-and-dice the internals of a distributed data management system, we propose an overlay taxonomy where the basic functionality is supported, and advanced capabilities can be added incrementally as overlays.  We divide into seven categories:

  • Core Operations (Part I): This represents the bare-bones services required for a distributed data management framework. In other words, it supports the interfaces for basic persistence and retrieval of data within a shared nothing scale-out environment. The key services are:
    • Cluster Management
    • Namespace Metadata Management
    • Data Persistence
  • Durability (Part II): This category of services is responsible to ensure near zero data loss despite hardware and component failures. Additionally, the reliable persistence needs to be accomplished with reasonable latency. The key services are:
    • Replica Placement
    • Replication/Redundancy Orchestration
    • Replica repair
    • Data Integrity/Scrubbing
    • Geo-redundancy service
  • Consistency (Part III): Broadly, this category of services ensures an understandable read-write coherence and concurrency model for the application developers A different flavor of consistency is crash consistency, where the system recovers from component failures. Additionally, functionality such as multi-object transactions falls in this category. The key services are:
    • Read-Write Serialization (Single node)
    • Write-Write Serialization (Single node)
    • Serialization of writes across replicas
    • Serialization of reads across replicas
  • HA/FT (Part IV): These services ensure that the system is always available to serve requests despite failures – this essentially translates to having enough redundancy, fault tolerance, and repair/failback capabilities. The key services are:
    • Data consistency during failures
    • Failure detection
    • Failover orchestration
    • Repair and failback
  • Elasticity (Part V): Self-balancing w.r.t. addition and removal of nodes, hot-spots and ability for dynamic traffic shaping across services and hardware resources.  Key services include:
    • Re-sharding
    • Re-mapping
    • Auto-scaling
  • Manageability: Broad category for ease of deployment, upgrade, maintenance, monitoring, policy-based differentiated QoS, security configuration.  
    • Upgrade/maintenance
    • Authentication/Authorization/Multi-tenancy
    • Policies for placement/Differentiated QoS
    • Monitoring/Diagnosis/Alerts/Events/Stats 
  • Enterprise Data Services: This category includes capabilities similar to enterprise storage controllers namely snapshots, backup, tiering (including the cloud), dedup, compression, encryption. This bucket also includes legacy support including ACL support, rename support, POSIX hard and soft links.

    • Snapshot/Clone
    • Dedup/compression
    • Access Control/Security/
    • Encryption (at rest/in motion)
    • POSIX Rename/Hard/Soft link