CSE 599c Hot Topics in Data Management Systems

Lecture 16: Federated Systems.

Fault-Tolerance

Magdalena Balazinska

Winter 2006

Today's Paper

R. Barga, D. Lomet, G. Shegalov, and G. Weikum. Recovery Guarantees for Internet Applications. ACM Trans. on Internet Technology. 2004.

Outline

Problem: fault-tolerance in multitier apps

Existing techniques for application recovery

Phoenix approach

Interaction contracts

Different types of contracts

Logging requirements

Fault-Tolerance Problem

Figure 1 from [barga2004]

Any one of these components can fail

Apps must include logic to handle failures of other components

Fault-Tolerance Problem

Goal 1: mask failures from user

User enters input once

User's request is carried out exactly once

No output to user is duplicated

Goal 2: generic failure handling infrastructure outside of application logic

Challenges

Many components involved in request proc.

Transactions ensure atomicity not exactly-once

Existing Techniques

Distributed transactions

Only ensure consistency of data at the backend

Transactional queues

Enqueue and dequeue ops are transactions

As a single distributed transaction (with 2PC)

Step 1: Read an input message from a queue

Step 2: Process message, query databases

Step 3: Place a reply message in output queue

So, 3 transactions per request

And applications must be “stateless”

Transactional Queues

Figure 3 from [barga2004]

Proposed Technique

Use logging and recovery

Focus on minimizing logging requirements

Distinguish different types of components

Component type corresponds to a guarantee

Determines behavior upon failure and recovery

Establish interaction contracts

Different contracts for different components

An interaction contract specifies joint behavior of two interacting components

Component Guarantees

Xcom

Pcom

Pcom

Pcom

Pcom

Tcom

Tcom

Tcom

Guarantees persistent state and persistent messages

No guarantees

Guarantees persistence if transaction commits

Pcom

Tcom

Types of Contracts

Pcom/Pcom

Committed Interaction Contract (CIC)

Immediately Committed Interaction Contract (ICIC)

Pcom/Xcom

External Interaction Contract (XIC)

Pcom/Tcom

Transactional Interaction Contract (TIC)

Logging Requirements

Pcom (CIC)

Log info about msg received without forcing

Force-log all non-deterministic events (including input msg interleaving) before sending a msg

Pcom (XIC and ICIC)

Also force log all messages received

Logging Requirements

Pcom (TIC)

Before commit msg, force-log msgs from Tcom

Tcom

Already support logging for transactions

Extra forced log: final commit reply message

Message lookup table simplifies msg replay

Conclusion

Goals achieved

Mask most failures from the user

Decouple failure handling form app. prog.

Approach

Break problem down into pairwise interactions

Components provide unilateral guarantees

Try to minimize force-writes for performance

2006-01-01T23:16:26