[N ETWORKING ] Lugging a torrent of bits From here to there And - - PDF document

n etworking
SMART_READER_LITE
LIVE PREVIEW

[N ETWORKING ] Lugging a torrent of bits From here to there And - - PDF document

CS455: Introduction to Distributed Systems Dept. Of Computer Science , Colorado State University CS 455: I NTRODUCTION T O D ISTRIBUTED S YSTEMS [N ETWORKING ] Lugging a torrent of bits From here to there And through thin air With fidelity ...


slide-1
SLIDE 1

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.1

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS

[NETWORKING]

Shrideep Pallickara Computer Science Colorado State University

Lugging a torrent of bits From here to there And through thin air With fidelity ... for an error begets a retransmission and then another What's done to a bit, is done to the next Be it a blockchain or a simple text

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Frequently asked questions from the previous class survey

¨ Do sockets act like threads to take bytes from stream? ¨ How are regular sockets created? ¨ Ports vs sockets? ¨ Number of connections: ¤ Connection is refused when the number of connections exceeds threshold ¨ Do we use serverSocket and sockets for our peer-to-peer assignment? ¨ Several on port numbers, why the limit, MapReduce/Spark, BitCoin ¤ Please hold on … we will get there

slide-2
SLIDE 2

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.2

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Topics covered in this lecture

¨ Encoding ¨ Bandwidth and Latency ¨ Multiplexing ¨ Network Architecture ¨ Encapsulation

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Communications & Networking: Topics that we will cover

¨ Data transmission ¨ Switched Networks ¨ Bandwidth and Latency ¨ Multiplexing ¨ Internet Architecture ¨ IP routing ¨ The TCP and UDP protocols

slide-3
SLIDE 3

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.3

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

COMMUNICATIONS & NETWORKING {HOW DATA IS SENT}

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

How is the data sent?

¨ Are we sending 1’s and 0’s? ¨ Whatever the physical medium, we use signals ¤ Electromagnetic waves traveling at the speed of light n Speed of light is different in different mediums

slide-4
SLIDE 4

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.4

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Components of encoding binary data in a signal

¨ Modulation ¨ Duplexity

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Encoding binary data: Modulation

  • Objective is to send a pair of distinguishable signals

¨ Vary frequency, amplitude, or phase of the signal to transmit

information

§ E.g. vary the power (amplitude) of signal

§ x(t) =A sin(2πft + θ)

slide-5
SLIDE 5

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.5

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Encoding binary data: Duplexity

¨ How many bit streams can be encoded on a link at a time? ¤ If it is one: nodes must share access to link ¨ Can data flow in both directions at the same time? ¤ Yes è full-duplex ¤ No è half-duplex

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

For our purposes, let’s ignore details of modulation

¨ Assume we are working with two signals ¤ High and low ¨ In practice: ¤ Different voltages on a copper-based link ¤ Different power-levels on an optical link

slide-6
SLIDE 6

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.6

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Let’s do the obvious thing

¨ Map 1 to a high signal ¨ Map 0 to a low signal

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Non-return to zero (NRZ)

1 1 1 1 1 1 1

slide-7
SLIDE 7

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.7

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Problems with NRZ because of consecutive 1’s and 0’s: BASELINE WANDER

¨ Receiver keeps average of the signal seen so far ¨ Average is used to distinguish between low and high ¨ Lots of consecutive 1/0’s will make it difficult to detect a significant

change

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Problems with NRZ because of consecutive 1’s and 0’s: CLOCK RECOVERY

¨ Every clock cycle, sender transmits and the receiver receives ¨ Sender and receiver’s clocks must be perfectly synchronized ¤ Otherwise, it is not possible to decode the signal

slide-8
SLIDE 8

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.8

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Manchester encoding

¨ 0 is a low-to-high transition ¨ 1 is a high-to-low transition

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Manchester encoding and NRZ

1 1 1 1 1 1 1

Manchester Encoding Manchester Encoding

NRZ NRZ

slide-9
SLIDE 9

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.9

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Some more about Manchester encoding

¨ Doubles the rate at which signal transitions are made on the link ¤ Receiver has ½ the time to detect each pulse ¨ Rate of signal changes: baud rate ¨ Bit rate is ½ the baud rate ¤ Encoding is considered 50% efficient

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

NRZI (Non return to zero inverted)

¨ Make a transition from current signal to encode a 1 ¤ Stay at current signal to encode a 0 ¨ Solves the problem of consecutive 1’s ¤ But does nothing for consecutive 0’s

slide-10
SLIDE 10

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.10

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

4B/5B encoding

¨ Attempts to address inefficiencies in Manchester encoding ¤ Without suffering from problems due to extended high/low signals ¨ The crux here is to insert extra bits into bitstream ¤ Breakup long sequences of 1s or 0s ¤ 4 bits of actual data encoded in a 5-bit code ¤ 5-bit codes are carefully selected n No more than 1 leading 0 & no more than 2 trailing 0s

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

4B/5B encoding

4B 5B 0000 11110 0001 01001 0010 10100 0011 10101 0100 01010 0110 01110 0111 01111 1000 10010 1001 10011 1010 10110 1011 10111 1100 11010 1101 11011 1110 11100 1111 11101

slide-11
SLIDE 11

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.11

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

4B/5B: Rules for the conversion of 4-bit codes to 5- bit codes

¨ Objective is to ensure that in each translation there is: ¤ No more than one leading 0 ¤ No more than two trailing 0’s ¤ When sent back-to-back n No pair of 5-bit codes results in more than 3 consecutive 0’s being transmitted ¨ 5-bit codes are transmitted using NRZI ¤ This is why they are so concerned with consecutive 0’s

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

NETWORKING: EXPECTATIONS AND LINKS

slide-12
SLIDE 12

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.12

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Expectations that we have of a network

¨ Application programmer ¤ Error-free and timely delivery of messages ¨ Network designer ¤ Cost effective design ¤ Effective and fair allocation of resources ¨ Network provider ¤ Easy to administer and manage ¤ Isolate faults and account for usage

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

A network must provide connectivity among a set of computers

Physical medium: Link ... Nodes

Multiple-access

slide-13
SLIDE 13

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.13

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Multiple access links are limited in size

¨ Geographical distances that can be covered ¨ Number of nodes that can be connected

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Connectivity between nodes need not imply a direct physical

  • connection. Otherwise …

¨ Networks would be very limited in the number of nodes they could

connect

¨ Number of wires out the back of a node ¤ Unmanageable ¤ Very expensive

slide-14
SLIDE 14

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.14

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Switched networks: Indirect connectivity among cooperating nodes

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Switched networks: Indirect connectivity among cooperating nodes

¨ Nodes with at least two links ¤ Run software that forwards data on one link out on another ¨ Types ¤ Circuit switched ¤ Packet switched

slide-15
SLIDE 15

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.15

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Switched networks: Circuit switched networks

¨ Establish a dedicated circuit ¤ Across a set of links ¤ No one else can use this till termination ¨ Allows source to send a stream of bits ¤ Across circuit to the destination node ¨ Employed by the telephone system ¤ Also known as POTS (Plain Old Telephone System)

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Switched networks: Packet switched networks

¨ Nodes in the network send discrete data blocks to each other ¨ Use store-and-forward

① Receive complete packet over some link ② Store packet in internal memory ③ Forward complete packet to another node

¨ Used by the overwhelming majority of computer networks

slide-16
SLIDE 16

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.16

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Interconnection of networks

Cloud Cloud Cloud

Router/Gateway Router/Gateway forwards messages between networks

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Addressing: A node must be able to say which nodes it wishes to communicate with

¨ Assign an address (byte string) to each node ¤ Distinguish node from other nodes in the network ¨ Source specifies address of the destination node ¨ Switches and routers use address to forward messages towards the

destination node

¤ Routing

slide-17
SLIDE 17

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.17

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

COST EFFECTIVE RESOURCE SHARING

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

How do all hosts that want to communicate share the network …

¨ At the same time? ¨ How about sharing links? ¤ Hosts want to use it at the same time ¨ Multiplexing … ¤ ANALOGY: Sharing CPU among multiple processes

slide-18
SLIDE 18

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.18

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Data sent by multiple users can be multiplexed over the physical links

Switch 1 Switch 2

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Multiplexing data onto a physical link

¨ Synchronous time division multiplexing (STDM) ¤ Divide time into quanta ¤ Assign quanta in round-robin fashion ¨ Frequency division multiplexing (FDM) ¤ Transit data flows at different frequencies

slide-19
SLIDE 19

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.19

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Problems with STDM and FDM

¨ {Problem-1} Limited to specific situations ¤ Max number of flows is fixed ¤ Known ahead of time ¨ {Problem-2} If one of the flows does not have data? ¤ Its share of the physical link remains idle ¨ In computer communications:

① Amount of time a link is idle can be very large ② Data flows are fluid

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Statistical multiplexing

¨ Physical link is shared over time ¨ Data is transmitted from each flow on demand ¤ Not a predetermined slot ¤ When there is only one flow? n No need to wait for quantum to come around

slide-20
SLIDE 20

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.20

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Limiting transmissions so that other flows can have a turn

¨ Upper bound on size of data block that each flow is allowed to

transmit

¤ Packet ¨ Larger application messages ¤ Fragmented into several packets ¤ Receiver reassembles these ¨ Each flow sends packets over the link ¤ Decision made on a packet-by-packet basis

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Multiplexing packets from multiple sources onto a shared link

Switch 1

slide-21
SLIDE 21

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.21

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Deciding which packet to send over a shared link

¨ In some cases, decision is made by switches ¨ Service packets using ¤ FIFO ¤ Round robin n Ensure flows receive a certain share of the bandwidth n Maximum threshold for delays for certain packets ¨ Networks that allow special treatment of flows

¤ Quality of Service COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

BANDWIDTH AND LATENCY

slide-22
SLIDE 22

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.22

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Network performance is measured in two fundamental ways

¨ Bandwidth ¤ Number of bits transmitted over the network in a given time (e.g., 10 million

bits per seconds 10 Mbps)

¤ Also called throughput ¨ Latency ¤ How long it takes for message to go from one end of the network to

another?

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Components of latency

¨ Speed-of-light propagation delay ¤ 3 x 108 m/sec in vacuum ¤ 2.3 x 108 m/sec in cable ¨ Amount of time to transmit a unit of data ¨ Queuing delays

slide-23
SLIDE 23

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.23

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

The Delay x Bandwidth product

Delay Bandwidth

Viewing the Network as a pipe

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

The Delay x Bandwidth product

¨ The product gives us information about how many bits fit in the pipe ¨ Transcontinental channel ¤ 50 ms one-way latency ¤ Bandwidth: 45 Mbps ¤ Can hold: 50 x 10-3 seconds x 45 x 106 bits/second n 2.25 x 106 bits = 280 KB

slide-24
SLIDE 24

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.24

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

The Delay x Bandwidth product

¨ Corresponds to how many bits the sender must send ¤ Before first bit arrives at the receiver ¨ Bits in the pipe are said to be in flight

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Bandwidth and latency improvements are not in lockstep

¨ Over past 35-40 years approximately ¤ Bandwidth improvements: 220-1200 times ¤ Latency improvements: 4-20 times ¨ Ethernet 802.3 (1978) ¤ 10 Mbps ¤ Latency 3 millisecond ¨ Ethernet 802.3ae (2003) ¤ 10,000 Mbps (1000 times) ¤ Latency 0.19 millisecond (15 times)

slide-25
SLIDE 25

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.25

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

What does not change as the bandwidth increases?

¨ Speed of light ¨ High-speed does not mean that latency improves at the same rate as

bandwidth

¤ Transcontinental delays of 100 ms for n 1-Mbps/1-Gbps link

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Sending 1 MB data over a cross country link. Delay 100 ms

¨ 1 Mbps link ¤ Pipe: 100 x 10-3 x 106 = 100 Kb = 0.1 Mb ¤ So you need 80 pipes to transmit 1 MB n 8 Mb/0.1 Mb = 80 ¨ 1 Gbps ¤ Pipe: 100 x 10-3 x 109 = 100 Mb n So you need 8 Mb/100 Mb = approx 1/12th of the pipe is utilized

slide-26
SLIDE 26

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.26

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

SUPPORT FOR COMMON SERVICES

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

More accurate to think of network as allowing applications to communicate

¨ When 2 applications need to communicate ¤ Lot of things need to happen ¤ Beyond just sending messages between the hosts ¨ Build all functionality into each app? ¨ Identify and build right set of common services ¤ Hide complexity without constraining functionality

slide-27
SLIDE 27

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.27

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Processes communicating over an abstract channel

Host App Host App

Channel

Host Host

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Guarantees provisioned in the channel

¨ Guaranteed delivery? ¨ Ordered delivery? ¨ Thwart eavesdropping?

slide-28
SLIDE 28

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.28

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Not just which functionality, but where they will be provided

¨ View network as a bit pipe ¤ High-level communication semantics provided by end hosts ¤ Keeps switches in the middle very simple ¨ Alternative: Push functionality onto switches ¤ End hosts are dumb devices n Telephones

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Mask failures so that the network appears more reliable than it really is

¨ Bit errors ¨ Burst errors: Consecutive bits are corrupted ¨ Packet failures ¤ Discarded because the switch buffer is full n Congested ¤ Routing mistakes ¨ Node and link failures ¤ Route around failed nodes and links

slide-29
SLIDE 29

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.29

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

NETWORK ARCHITECTURE

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

All communications in distributed systems based on sending/receiving messages

¨ No shared memory ¨ Sending message from A to B ¤ Build message in A’s address space ¤ Send message over the network ¤ Reconstruct message at B

slide-30
SLIDE 30

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.30

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

But A and B must agree on the meaning of the bits

¨ Signaling 1’s and 0’s ¨ What is the last bit of the message? ¨ Detect if the message is lost or damaged ¤ Respond to problems ¨ Representation of data types

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Layering and Protocols

¨ Start with services provided by hardware ¨ Add a sequence of layers ¤ Each providing higher level of service ¨ Services at higher layers implemented in terms of lower layers

slide-31
SLIDE 31

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.31

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Advantages of layering

¨ Decomposes problem into manageable components ¨ Provides modular design ¤ Adding functionality may result only in minor modifications

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Advantages of layering

¨ Each layer can be changed independently of the other ¤ Change as technology improves

slide-32
SLIDE 32

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.32

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Layered Architectures: Requests go down the hierarchy; results flow upward

Layer N Layer N - 1 Layer 2 Layer 1

Request flow Response flow

Component at layer Li can call components at layer Li-1

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Example of a layered network system

Application programs Process-to-process channels Host-to-Host connectivity Hardware

slide-33
SLIDE 33

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.33

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Layered system with alternative abstractions at a given layer

Application programs Request/Reply channels Message stream channel Host-to-Host connectivity Hardware

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

Abstract objects that comprise layers of a network system are called protocols

¨ Provides a service interface to other objects on the same computer ¤ Wishing to use its communication services ¨ Defines the form and meaning of messages exchanged by protocol

peers

¨ Protocol also refers to modules that implement a specification

slide-34
SLIDE 34

SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.34

CS455: Introduction to Distributed Systems

  • Dept. Of Computer Science, Colorado State University

COM

OMPUTE TER SCI CIENCE NCE DEPAR EPARTMEN ENT

Professor: SHRIDEEP PALLICKARA CS455: Introduction to Distributed Systems ht http: p://www.cs. cs.co colost state.edu/~cs4 cs455

The contents of this slide-set are based on the following references

¨ Computer Networks: A Systems Approach. Larry Peterson and Bruce Davie. 4th edition.

Morgan Kaufmann. ISBN: 978-0-12-370548-8. [Chapters 1 and 2]

¨ Distributed Systems: Principles and Paradigms. Andrew S. Tanenbaum and Maarten Van

  • Steen. 2nd Edition. Prentice Hall. ISBN: 0132392275/978-0132392273. [Chapter 4]