Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AE1DE200AF7 for ; Tue, 14 Jun 2016 23:35:51 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id ACC10160A62; Tue, 14 Jun 2016 21:35:51 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6C6B6160A06 for ; Tue, 14 Jun 2016 23:35:49 +0200 (CEST) Received: (qmail 18072 invoked by uid 500); 14 Jun 2016 21:35:48 -0000 Mailing-List: contact commits-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aurora.apache.org Delivered-To: mailing list commits@aurora.apache.org Received: (qmail 18063 invoked by uid 99); 14 Jun 2016 21:35:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Jun 2016 21:35:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id EB937C0E1A for ; Tue, 14 Jun 2016 21:35:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.374 X-Spam-Level: X-Spam-Status: No, score=0.374 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id D-x9KxM0KQ_H for ; Tue, 14 Jun 2016 21:35:35 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTP id 36A095FB76 for ; Tue, 14 Jun 2016 21:35:35 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 70241E58EE for ; Tue, 14 Jun 2016 21:35:33 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 652153A039A for ; Tue, 14 Jun 2016 21:35:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1748470 [8/19] - in /aurora/site: data/ publish/ publish/blog/ publish/blog/aurora-0-14-0-released/ publish/documentation/0.10.0/ publish/documentation/0.10.0/build-system/ publish/documentation/0.10.0/client-cluster-configuration/ publish... Date: Tue, 14 Jun 2016 21:35:30 -0000 To: commits@aurora.apache.org From: serb@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160614213533.652153A039A@svn01-us-west.apache.org> archived-at: Tue, 14 Jun 2016 21:35:51 -0000 Added: aurora/site/publish/documentation/0.14.0/operations/storage/index.html URL: http://svn.apache.org/viewvc/aurora/site/publish/documentation/0.14.0/operations/storage/index.html?rev=1748470&view=auto ============================================================================== --- aurora/site/publish/documentation/0.14.0/operations/storage/index.html (added) +++ aurora/site/publish/documentation/0.14.0/operations/storage/index.html Tue Jun 14 21:35:25 2016 @@ -0,0 +1,222 @@ + + + + + + Apache Aurora + + + + + + +
+
+ +
+
+ +
+
+
+ +

Aurora Scheduler Storage

+ + + +

Overview

+ +

Aurora scheduler maintains data that need to be persisted to survive failovers and restarts. +For example:

+ +
    +
  • Task configurations and scheduled task instances
  • +
  • Job update configurations and update progress
  • +
  • Production resource quotas
  • +
  • Mesos resource offer host attributes
  • +
+ +

Aurora solves its persistence needs by leveraging the Mesos implementation of a Paxos replicated +log [1] +[2] with a key-value +LevelDB storage as persistence media.

+ +

Conceptually, it can be represented by the following major components:

+ +
    +
  • Volatile storage: in-memory cache of all available data. Implemented via in-memory +H2 Database and accessed via +MyBatis.
  • +
  • Log manager: interface between Aurora storage and Mesos replicated log. The default schema format +is thrift. Data is stored in serialized binary form.
  • +
  • Snapshot manager: all data is periodically persisted in Mesos replicated log in a single snapshot. +This helps establishing periodic recovery checkpoints and speeds up volatile storage recovery on +restart.
  • +
  • Backup manager: as a precaution, snapshots are periodically written out into backup files. +This solves a disaster recovery problem +in case of a complete loss or corruption of Mesos log files.
  • +
+ +

Storage hierarchy

+ +

Storage Semantics

+ +

Implementation details of the Aurora storage system. Understanding those can sometimes be useful +when investigating performance issues.

+ +

Reads, writes, modifications

+ +

All services in Aurora access data via a set of predefined store interfaces (aka stores) logically +grouped by the type of data they serve. Every interface defines a specific set of operations allowed +on the data thus abstracting out the storage access and the actual persistence implementation. The +latter is especially important in view of a general immutability of persisted data. With the Mesos +replicated log as the underlying persistence solution, data can be read and written easily but not +modified. All modifications are simulated by saving new versions of modified objects. This feature +and general performance considerations justify the existence of the volatile in-memory store.

+ +

Read lifecycle

+ +

There are two types of reads available in Aurora: consistent and weakly-consistent. The difference +is explained below.

+ +

All reads are served from the volatile storage making reads generally cheap storage operations +from the performance standpoint. The majority of the volatile stores are represented by the +in-memory H2 database. This allows for rich schema definitions, queries and relationships that +key-value storage is unable to match.

+ +

Write lifecycle

+ +

Writes are more involved operations since in addition to updating the volatile store data has to be +appended to the replicated log. Data is not available for reads until fully ack-ed by both +replicated log and volatile storage.

+ +

Atomicity, consistency and isolation

+ +

Aurora uses write-ahead logging to ensure +consistency between replicated and volatile storage. In Aurora, data is first written into the +replicated log and only then updated in the volatile store.

+ +

Aurora storage uses read-write locks to serialize data mutations and provide consistent view of the +available data. The available Storage interface exposes 3 major types of operations: +* consistentRead - access is locked using reader’s lock and provides consistent view on read +* weaklyConsistentRead - access is lock-less. Delivers best contention performance but may result +in stale reads +* write - access is fully serialized by using writer’s lock. Operation success requires both +volatile and replicated writes to succeed.

+ +

The consistency of the volatile store is enforced via H2 transactional isolation.

+ +

Population on restart

+ +

Any time a scheduler restarts, it restores its volatile state from the most recent position recorded +in the replicated log by restoring the snapshot and replaying individual log entries on top to fully +recover the state up to the last write.

+ +
+ +
+
+