Failure detection The design of fault-tolerant systems will be easier if failures can be detected. Depends on the 1. System model, and 2. The type of failures.

Slides:



Advertisements
Similar presentations
The Transmission Control Protocol (TCP) carries most Internet traffic, so performance of the Internet depends to a great extent on how well TCP works.
Advertisements

1 CS 194: Distributed Systems Process resilience, Reliable Group Communication Scott Shenker and Ion Stoica Computer Science Division Department of Electrical.
DISTRIBUTED SYSTEMS II FAULT-TOLERANT BROADCAST Prof Philippas Tsigas Distributed Computing and Systems Research Group.
Computer Networks Transport Layer. Topics F Introduction (6.1)  F Connection Issues ( ) F TCP (6.4)
CSCI 4550/8556 Computer Networks
Intermediate TCP/IP TCP Operation.
CISCO NETWORKING ACADEMY PROGRAM (CNAP)
IS333, Ch. 26: TCP Victor Norman Calvin College 1.
Sliding window protocol The sender continues the send action without receiving the acknowledgements of at most w messages (w > 0), w is called the window.
Go-Back-N Improve Stop-and-Wait by not waiting!
Faults and fault-tolerance One of the selling points of a distributed system is that the system will continue to perform even if some components / processes.
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
Networking. Protocol Stack Generally speaking, sending an message is equivalent to copying a file from sender to receiver.
Error Checking continued. Network Layers in Action Each layer in the OSI Model will add header information that pertains to that specific protocol. On.
Gursharan Singh Tatla Transport Layer 16-May
Ch 3. Transport Layer Myungchul Kim
Distributed Systems – CS425/CSE424/ECE428 – Fall Nikita Borisov — UIUC1.
1 Transport Layer Computer Networks. 2 Where are we?
CS3502: Data and Computer Networks DATA LINK LAYER - 2 WB version.
Faults and fault-tolerance
Go-Back-N ARQ  packets transmitted continuously (when available) without waiting for ACK, up to N outstanding, unACK’ed packets  a logically different.
ARQ Mechanisms Rudra Dutta ECE/CSC Fall 2010, Section 001, 601.
Wireless TCP Prasun Dewan Department of Computer Science University of North Carolina
CS332, Ch. 26: TCP Victor Norman Calvin College 1.
3: Transport Layer 3a-1 8: Principles of Reliable Data Transfer Last Modified: 10/15/2015 7:04:07 PM Slides adapted from: J.F Kurose and K.W. Ross,
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
Group Communication A group is a collection of users sharing some common interest.Group-based activities are steadily increasing. There are many types.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
Transport Control Protocol (TCP) Features of TCP, packet loss and retransmission, adaptive retransmission, flow control, three way handshake, congestion.
Group Communication Group oriented activities are steadily increasing. There are many types of groups:  Open and Closed groups  Peer-to-peer and hierarchical.
CS3505: DATA LINK LAYER. data link layer  phys. layer subject to errors; not reliable; and only moves information as bits, which alone are not meaningful.
CSE 461 University of Washington1 Where we are in the Course Finishing off the Link Layer! – Builds on the physical layer to transfer frames over connected.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
CS603 Fault Tolerance - Communication April 17, 2002.
Sliding window protocol The sender continues the send action without receiving the acknowledgements of at most w messages (w > 0), w is called the window.
Hwajung Lee. One of the selling points of a distributed system is that the system will continue to perform even if some components / processes fail.
Review of key networking techniques: –Reliable communication over unreliable channels –Error detection and correction –Medium access control –routing –Congestion.
5. The Transport Layer 5.1 Role of Transport Layer It bridge the gab between applications and the network layer. Provides reliable cost-effective data.
Transport Layer: Sliding Window Reliability
ITEC452 Distributed Computing Lecture 2 – Part 2 Models in Distributed Systems Hwajung Lee.
Alternating Bit Protocol S R ABP is a link layer protocol. Works on FIFO channels only. Guarantees reliable message delivery with a 1-bit sequence number.
1 Version 3.1 Module 10 Intermediate TCP/IP (Layer 4)
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 3: Transport.
1 The utopia protocol  Unrealistic assumptions: –processing time ignored –infinite buffer space available –simplex: data transmitted in one direction.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
Classifying fault-tolerance Masking tolerance. Application runs as it is. The failure does not have a visible impact. All properties (both liveness & safety)
DATA LINK CONTROL. DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL.
Computer Networking Lecture 16 – Reliable Transport.
Ch 3. Transport Layer Myungchul Kim
Group Communication A group is a collection of users sharing some common interest.Group-based activities are steadily increasing. There are many types.
Chapter 3: The Data Link Layer –to achieve reliable, efficient communication between two physically connected machines. –Design issues: services interface.
Go-Back-N ARQ packets transmitted continuously (when available) without waiting for ACK, up to N outstanding, unACK’ed packets a logically different sender.
Data Link Layer - 3 Dr. Sanjay P. Ahuja, Ph.D.
Faults and fault-tolerance
Chapter 6: Transport Layer (Part I)
Precept 2: TCP Congestion Control Review
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Alternating Bit Protocol
Faults and fault-tolerance
The Transport Layer Reliability
Error Checking continued
M. Mock and E. Nett and S. Schemmer
Presentation transcript:

Failure detection The design of fault-tolerant systems will be easier if failures can be detected. Depends on the 1. System model, and 2. The type of failures. Asynchronous systems are more tricky. We first focus on synchronous systems only

Detection of crash failures Failure can be detected using heartbeat messages (periodic “I am alive” broadcast) and timeout - if processors speed has a known lower bound - channel delays have a known upper bound.

Detection of omission failures For FIFO channels: Use sequence numbers with messages. (1, 2, 3, 5, 6 … ) ⇒ message 4 is missing Non-FIFO bounded delay channels delay - use timeout What about non-FIFO channels for which the upper bound of the delay is not known? Use unbounded sequence numbers and acknowledgments. But acknowledgments may be lost too! We will look at a real protocol deals with omission ….

Tolerating crash failures Triple modular redundancy (TMR) for masking any single failure. N-modular redundancy masks up to m failures, when N = 2m +1 In fact, to deal with crash only, two modules are adequate. The final recipient needs only one good data Take a vote What if the voting unit fails?

Tolerating omission failures A central issue in networking A B router Routers may drop messages, but reliable end-to-end transmission is an important requirement. If the sender does not receive an ack within a time period, it retransmits (it may so happen that the was not lost, so a duplicate is generated). This implies, the communication must tolerate Loss, Duplication, and Re-ordering of messages

Stenning’s protocol {program for process S} define ok : boolean; next : integer; initially next = 0, ok = true, both channels are empty; dook  send (m[next], next); ok:= false [](ack, next) is received  ok:= true; next := next + 1 [] timeout (R,S)  send (m[next], next) od {program for process R} define r : integer; initially r = 0; do(m[ ], s) is received  s = r  accept the message; send (ack, r); r:= r+1 [](m[ ], s) is received  s ≠ r  send (ack, r-1) od Sender S Receiver R m[0], 0 ack

Observations on Stenning’s protocol Both messages and acks may be lost Q. Why is the last ack reinforced by R when s≠r? A. Needed to guarantee progress. Progress is guaranteed, but the protocol is inefficient due to low throughput. Sender S Receiver R m[0], 0 ack

Observations on Stenning’s protocol Sender S (s =1) Receiver R m[1], 1 The ack of m[1] is lost. After timeout, S sends m[1] again. But R was expecting m[2], so does not send ack. And S keeps sending m[1] repeatedly. This affects progress. But it is lost ack (r=2) If the last ack is not reinforced by the receiver when s≠r, then the following scenario is possible

Sliding window protocol The sender continues the send action without receiving the acknowledgements of at most w messages (w > 0), w is called the window size.

Sliding window protocol {program for process S} define next, last, w : integer; initially next = 0, last = -1, w > 0 do last+1 ≤ next ≤ last + w  send (m[next], next); next := next + 1 [](ack, j) is received  if j > last  last := j [] j ≤ last  skip fi []timeout (R,S)  next := last+1 {retransmission begins} od {program for process R} define j : integer; initially j = 0; do(m[next], next) is received  if j = next  accept message; send (ack, j); j:= j+1 [] j ≠ next  send (ack, j-1) fi; od

Example SR Window size =5 4, 3, 2, 1, 0(2 is lost)4, 1, 3, 0 (next=5) (j=0) SR 4, 3, 2, 1, 0(2 is lost) 4, 1, 3 (next=5) (j=2) 0, 0, 1, 1 (last= -1) For message 0 For j ≠ next SR 6, 5, 4, 3, 2 (next=5) (j=2) (last= 1) timeout (m[0, m[1] accepted, but m[3]-m[4] are not)

Observations Lemma. Every message is accepted exactly once. (Note the difference between reception and acceptance) Lemma. Message m[k] is always accepted before m[k+1]. (Argue that these are true. Consider various scenarios of omission failure) Uses unbounded sequence number. This is bad. Can we avoid it?

Theorem If the communication channels are non-FIFO, and the message propagation delays are arbitrarily large, then using bounded sequence numbers, it is impossible to design a window protocol that can withstand the (1) loss, (2) duplication, and (3) reordering of messages.

Why unbounded sequence no? (m[k],k) ( m’, k) ( m’ ’,k) Retransmitted version of m New message using the same seq number k We want to accept m” but reject m’. How is that possible?

Alternating Bit Protocol S R ABP is a link layer protocol. Works on FIFO channels only. Guarantees reliable message delivery with a 1-bit sequence number ( this is the t raditional version with window size = 1). Study how this works. m[0],0 ack, 0 m[1],1

Alternating Bit Protocol program ABP; {program for process S} define sent, b : 0 or 1 ; next : integer ; initially next = 0, sent = 1, b = 0, and channels are empty ; do sent ≠ b  send (m[next], b); next := next+1; sent := b [] (ack, j) is received  if j = b  b := 1- b [] j ≠ b  skip fi [] timeout (R,S)  send (m[next-1], b) od {program for process R} define j : 0 or 1; {initially j = 0}; do (m[ ], b) is received  if j = b  accept the message; send (ack, j); j:= 1 - j [] j ≠ b  send (ack, 1-j) fi od S R m[1],1 m[0],0 a,0

How TCP works Supports end-to-end logical connection between any two computers on the Internet. Basic idea is the same as those of sliding window protocols. But TCP uses bounded sequence numbers! It is safe to re-use a sequence number when it is unique. With a high probability, a random 32 or 64-bit number is unique during the lifetime of the application. Also, current sequence numbers are flushed out of the system after a time = 2d, where d is the round trip delay. It is even more unlikely that the same sequence number is generated within a time interval of of 2d.

How TCP works

Three-way handshake. Sequence numbers are unique w.h.p. Why is the knowledge of roundtrip delay important? Timeout can be correctly chosen What if the timeout period is too small / too large? What if the window is too small / too large? Adaptive retransmission: receiver can throttle sender and control the window size to save its buffer space.