review of networking and design concepts (ii): architecture & evolution

42
Review of Networking and Design Concepts (II): Architecture & Evolution Two ways of constructing a software design: 1) make it so simple that there are obviously no deficiencies, and 2) make it so complicated that there are no obvious deficiencies --- C.A.R. Hoare

Upload: havard

Post on 24-Feb-2016

27 views

Category:

Documents


0 download

DESCRIPTION

Review of Networking and Design Concepts (II): Architecture & Evolution. Two ways of constructing a software design: make it so simple that there are obviously no deficiencies , and make it so complicated that there are no obvious deficiencies --- C.A.R. Hoare. Overview. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Review of Networking and Design Concepts (II):  Architecture & Evolution

Review of Networking and Design Concepts (II): Architecture & Evolution

Two ways of constructing a software design:

1)make it so simple that there are obviously no deficiencies, and

2)make it so complicated that there are no obvious deficiencies

--- C.A.R. Hoare

Page 2: Review of Networking and Design Concepts (II):  Architecture & Evolution

Protocols, layering, encapsulation Interface design: functionality, technology, performance System design: technological building blocks, Amdahl’s law,

exponential trends Function-placement: End-to-end principle Implementation: App-layer framing, ILF, cross-layer design New directions: middleboxes, tussle, layered naming, overlays Chap 1-6 (Kurose book), Chapter 1,2,3, 10 in Doug Comer book Reading: Saltzer, Reed, Clark: "End-to-End arguments in System Design" Reading: Clark: "The Design Philosophy of the DARPA Internet Protocols": Reading: RFC 2775: Internet Transparency: In HTML Reference: Clark et al, "Tussle in Cyberspace: Defining Tomorrow's Internet" Reading: Balakrishnan et al:

"A Layered Naming Architecture for the Internet":

Overview

Page 3: Review of Networking and Design Concepts (II):  Architecture & Evolution

Part I: Architectural Concepts, Guidelines

Page 4: Review of Networking and Design Concepts (II):  Architecture & Evolution

Why Layering?

No layering: each new application has to be re-implemented for every network technology!

Capture common functions in intermediate layer. Convert O(N^2) mapping problem to O(N)

Telnet FTP NFS

Packetradio

Coaxial cable

Fiberoptic

Application

TransmissionMedia

HTTP

(FTP – File Transfer Protocol, NFS – Network File Transfer, HTTP – World Wide Web protocol)

Page 5: Review of Networking and Design Concepts (II):  Architecture & Evolution

Why Layering? Solution: introduce an intermediate layer that

provides a unique abstraction for various network technologies

Telnet FTP NFS

Packetradio

Coaxial cable

Fiberoptic

Application

TransmissionMedia

HTTP

Intermediate layer

Page 6: Review of Networking and Design Concepts (II):  Architecture & Evolution

What is Layering? A technique to organize a network

system into a succession of logically distinct entities, such that the service provided by one entity is solely based on the service provided by the previous (lower level) entity

Page 7: Review of Networking and Design Concepts (II):  Architecture & Evolution

Layering Advantages

Modularity – protocols easier to manage and maintain

Abstract functionality –lower layers can be changed without affecting the upper layers

Reuse – upper layers can reuse the functionality provided by lower layers

DisadvantagesInformation hiding – inefficient implementations; Invariant APIs (interfaces) => may not leverage new

capabilities available at lower layers

Page 8: Review of Networking and Design Concepts (II):  Architecture & Evolution

Layered Protocols Building blocks of a network architecture Each protocol object has two different

interfacesservice interface: defines operations on this

protocolpeer-to-peer interface: defines messages

exchanged with peer

service interface

peer interface

Li+1 Li+1

LiLi

Page 9: Review of Networking and Design Concepts (II):  Architecture & Evolution

Example: Transport Protocol(Logical Communication)

take data from app add addressing,

reliability check info to form “datagram”

send datagram to peer

wait for peer to ack receipt

analogy: post office

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical application

transportnetwork

linkphysical

applicationtransportnetwork

linkphysical

networklink

physical

data

data

data

transport

transport

ack

(Source: Kurose & Ross)

Page 10: Review of Networking and Design Concepts (II):  Architecture & Evolution

Encapsulation A layer can use only the service provided by the

layer immediate below it Each layer may change and add a header to

data packetdata

data

data

data

data

data

data

data

data

data

data

data

data

data

Page 11: Review of Networking and Design Concepts (II):  Architecture & Evolution

Example: Transport Protocol(Physical Communication)

(Source: Kurose & Ross)

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical application

transportnetwork

linkphysical

applicationtransportnetwork

linkphysical

networklink

physical

data

data

Page 12: Review of Networking and Design Concepts (II):  Architecture & Evolution

OSI vs. TCP/IP OSI: conceptually define services, interfaces,

protocols Internet: provide a successful implementation

ApplicationPresentation

SessionTransportNetworkDatalinkPhysical

InternetHost-to-network

Transport

Application

IP

LAN Packetradio

TCP UDP

Telnet FTP DNS

OSI TCP

Page 13: Review of Networking and Design Concepts (II):  Architecture & Evolution

Interface Design Driven by three factors:

Functionality: what features the customer wants, and is placed at a level due to e2e principle etc

Technology: what’s possible. Building blocks and techniques. Improvement trends in technology.

Performance: How fast etc… User, Designer, Operator views of performance ..

Interface design crucial because interface outlives the technology used to implement the interface.

Page 14: Review of Networking and Design Concepts (II):  Architecture & Evolution

Perspectives on Interface Design Network users: services and performance

that their applications need,

Network designers: cost-effective design

Network providers: system that is easy to administer and manage

Need to balance these three needs

Page 15: Review of Networking and Design Concepts (II):  Architecture & Evolution

System Design

Tradeoff (waste) cheap resources …and

… optimize expensive resources

[to achieve a given functionality]

Page 16: Review of Networking and Design Concepts (II):  Architecture & Evolution

Performance Performance questions:

Absolute: How fast … Relative: Is A faster than B and how much faster?

Define system as a black box.Parameters: input; Metrics: output

Parameters: only those the system is sensitive to

Metrics: must reflect the system design tradeoff

SystemParameters Metrics

Page 17: Review of Networking and Design Concepts (II):  Architecture & Evolution

What’s a performance tradeoff ?

Example moving from circuit-switching to packet switching

=> tradeoff delay, buffer space, packet loss, e2e complexity to optimize on capacity utilization and provisioning gains ($$)

• You cannot get something for nothing!• Also known as a zero-sum game or no-free-lunch.

(But…) Technology can reduce costs of components by leveraging fundamental laws of physics,

manufacturing economies of scale etc (Moore’s law)

Page 18: Review of Networking and Design Concepts (II):  Architecture & Evolution

100%

1000%

10000%

100000%

1996 1998 2000 2002

Relative preformance increaseDWDM Link speed

x2/8 months

Router capacityx2.2/18 months

Moore’s lawx2/18 m

DRAM access rate x1.1/18 m

Internetx2/yr

Impact of Technology Trends: What is expensive today may become cheap tomorrow.

Huge mismatches in technology trends (eg: DWDM vs DRAM)

must be planned for in modular designs!

Page 19: Review of Networking and Design Concepts (II):  Architecture & Evolution

Amdahl’s Law http://en.wikipedia.org/wiki/Amdahl's_law Guides the iterative design process. If design implies a set of tradeoffs, the question is how

to redesign components so that the system cost-performance (in terms of expensive resources) is improved.

Amdahl’s law talks about the maximum expected improvement to an overall system when only a part of the system is improved. Statement of “diminishing returns” when the focus is

on improving only a single componentSystem Speedup =

Page 20: Review of Networking and Design Concepts (II):  Architecture & Evolution

Amdahl’s Law (contd) If a part of a system accounts for 12% of

performance (P = 0.12) and You speed it up 100-fold (S = 100) The actual system speedup is only: 13.6% !!!!

Lesson #1: Optimize the common cases (accounting for a large fraction of system performance)

Lesson #2: Bottlenecks shift! If you optimize one component, another will become the new bottleneck!

Page 21: Review of Networking and Design Concepts (II):  Architecture & Evolution

Key questions in architecture How to decompose the complex system

functionality into protocol layers? What functions to be placed at which

levels? Can a function be placed at multiple

levels ?

Page 22: Review of Networking and Design Concepts (II):  Architecture & Evolution

Common View of the Telco Network

Brick

Page 23: Review of Networking and Design Concepts (II):  Architecture & Evolution

Common View of the IP Network

Page 24: Review of Networking and Design Concepts (II):  Architecture & Evolution

End-to-End Argument “…functions placed at the lower levels may be

redundant or of little value when compared to the cost of providing them at the lower level…”

“…sometimes an incomplete version of the function provided by the communication system (lower levels) may be useful as a performance enhancement…”

This leads to a philosophy diametrically opposite to the telephone world which sports dumb end-systems (the telephone) and intelligent networks.

Page 25: Review of Networking and Design Concepts (II):  Architecture & Evolution

Example: Reliable File Transfer

Solution 1: make each step reliable, and then concatenate them

Solution 2: end-to-end check and retry

OS

Appl.

OS

Appl.

Host A Host B

OK

Page 26: Review of Networking and Design Concepts (II):  Architecture & Evolution

Discussion Solution 1 not complete

What happens if the sender or/and receiver misbehave?

The receiver has to do the check anyway! Thus, full functionality can be entirely

implemented at application layer; no need for reliability from lower layers

Is there any need to implement reliability at lower layers?

Page 27: Review of Networking and Design Concepts (II):  Architecture & Evolution

Discussion Yes, but only to improve performance Example:

assume a high error rate on communication network

then, a reliable communication service at datalink layer might help

Page 28: Review of Networking and Design Concepts (II):  Architecture & Evolution

Trade-offs Application has more information about the

data and the semantic of the service it requires (e.g., can check only at the end of each data unit)

A lower layer has more information about constraints in data transmission (e.g., packet size, error rate)

Note: these trade-offs are a direct result of layering!

Page 29: Review of Networking and Design Concepts (II):  Architecture & Evolution

Internet & End-to-End Argument At network layer provides one simple

service: best effort datagram (packet) delivery

Only one higher level service implemented at transport layer: reliable data delivery (TCP)performance enhancement; used by a large

variety of applications (Telnet, FTP, HTTP)does not impact other applications (can use UDP)

Everything else implemented at application level

Page 30: Review of Networking and Design Concepts (II):  Architecture & Evolution

Key Advantages The IP service can be implemented on

top of a large variety of network technologies

Does not require routers to maintain any fined grained state about traffic. Thus, network architecture is RobustScalable

Page 31: Review of Networking and Design Concepts (II):  Architecture & Evolution

What is a “level” of a system? Protocol “layer” = “level” Within a single layer, closer to the core

=> “lower” levelEg: Edge-boxes of a domain implementing

functions like firewalls, address translation, QoS functions are at a “lower” level compared to other boxes in the domain

Core router is “lower” level compared to an “edge router”

In hierarchical routing, use of smaller prefixes correspond to lower levels of the system.

Page 32: Review of Networking and Design Concepts (II):  Architecture & Evolution

E2E Argument: Interpretations One interpretation: (limited in my opinion…)

A function can only be completely and correctly implemented with the knowledge and help of the applications standing at the communication endpoints

Another: (more precise…)a system (or subsystem level) should consider only

functions that can be completely and correctly implemented within it.

Alternative interpretation: (also correct …)Think twice before implementing a functionality that

you believe that is useful to an application at a lower layer

If the application can implement a functionality correctly, implement it a lower layer only as a performance enhancement

Page 33: Review of Networking and Design Concepts (II):  Architecture & Evolution

End-to-End Argument: Critical Issues The end-to-end principle emphasizes:

function placement correctness completeness and overall system costs.

It allows a cost-performance tradeoff If implementation of function in higher

levels is not possible due to technological/economic reasons (eg: telephone network in early 1900s), then it may be placed at lower levels

Page 34: Review of Networking and Design Concepts (II):  Architecture & Evolution

Summary: End-to-End Arguments If the application can do it, don’t do it at

a lower layer -- anyway the application knows the best what it needsadd functionality in lower layers if it is

(1) used and improves performance of a large number of applications, and

(2) does not hurt other applications Success story: Internet

Page 35: Review of Networking and Design Concepts (II):  Architecture & Evolution

Architecture vs Implementation:

ALF Principle Architecture: decomposition into functional

modules, semantics of modules and syntax used There should be no a priori requirement that the

engineering design of a given system correspond to the architectural decompositionEg: layering may not be most effective

modularity for implementation Summary:

Flexible decompositionDefer engineering decisions to implementer. Avoid gratuitous implementation constraintsMaximize engineering options for

customization/optimization

Page 36: Review of Networking and Design Concepts (II):  Architecture & Evolution

Application Layer Framing (ALF) Several processing bottlenecks may lie at the

“presentation” layer which does not really exist in the TCP/IP stackThese functions are absorbed partially in the

transport layer and partly in the application layer. Principle: the application-layer should have control of

the syntax and semantics of the presentation conversions

Transport should provide only common functions

Generalization of ALF: look for elegant ways to allow application visibility/participation in lower-level activitiesEg: QoS – carry application intelligence to the point

of QoS enforcement

Page 37: Review of Networking and Design Concepts (II):  Architecture & Evolution

Eg: Real-Time Protocol RTP svcs: payload type identification, sequence

numbering, timestamping and delivery monitoring “RTP is intended to be malleable to provide the

information required by a particular application and will often be integrated into the application processing rather than being implemented as a separate layer.”

RTP is a protocol framework that is deliberately not complete and can be tailored modifications/additions to the headers.RTP specifies only common functions for its apps

Avoid taking on additional functions ○ making the protocol more general or○ Adding options requiring expensive parsing

Page 38: Review of Networking and Design Concepts (II):  Architecture & Evolution

Cross-Layer Design: Motivation

Efficiency & performance imperatives, with strict

limits on raw spectrum resource (no Moore’s law!)

Page 39: Review of Networking and Design Concepts (II):  Architecture & Evolution

Wireless Performance Gap

WIDE AREA CIRCUIT SWITCHING

User Bit-Rate (kbps)

14.4digitalcellular

28.8 modem

ISDN

ATM

9.6 modem

2.4 modem 2.4 cellular

32 kbps PCS

9.6 cellular

wired- wireless bit-rate "gap"

1970 200019901980YEAR

LOCAL AREA PACKET SWITCHING

User Bit-Rate (kbps)

EthernetFDDI

ATM100 M Ethernet

Polling

Packet Radio

1st genWLAN

2nd genWLAN

wired- wirelessbit-rate "gap"

1970 200019901980.01

.1

1

10

100

1000

10,000

100,000

YEAR.01

.1

1

10

100

1000

10,000

100,000

Efficiency & performance imperatives, with strict

limits on raw spectrum resource (no Moore’s law!)

Page 40: Review of Networking and Design Concepts (II):  Architecture & Evolution

Cross-layer Design For Wireless

Application Network

Access Link Hardware

Delay ConstraintsRate Constraints

Energy Constraints

Adapt across design layersReduce uncertainty through scheduling

Provide robustness via diversity

Page 41: Review of Networking and Design Concepts (II):  Architecture & Evolution

Cross-layer Techniques: Examples

Adaptive techniques Link, MAC, network, and application adaptation Resource management and allocation (power control)

Diversity techniques Link diversity (antennas, channels, etc.) Access diversity Route diversity Application diversity Content location/server diversity

Scheduling Application scheduling/data prioritization Resource reservation Access scheduling

Page 42: Review of Networking and Design Concepts (II):  Architecture & Evolution

A Cautionary Perspective Cross-layer design can limit the rate of architectural

evolution Moore’s law like efficiency benefits cant be easily

incorporated by multiple enterprises at different layers

Open problem: how to retain architectural flexibility, long-run contributions by multiple vendors, while meeting the short-run performance imperatives ?Maintain modularity and layering, but permit:

○ ALF-like flexible customization and ○ Information-sharing/statistical learning across

layers to facilitate multi-layer optimizations. Flexible header structures (floating headers) for

inter-layer information sharing