47
1 Migratory TCP and Smart Messages: Two Migration Architectures for High Availability Liviu Iftode Department of Computer Science University of Maryland

Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

Embed Size (px)

DESCRIPTION

Migratory TCP and Smart Messages: Two Migration Architectures for High Availability. Liviu Iftode Department of Computer Science University of Maryland. Relaxed Transport Protocols and Distributed Computing for Massive Networks of Embedded Systems. Liviu Iftode Department of Computer Science - PowerPoint PPT Presentation

Citation preview

Page 1: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

1

Migratory TCP and Smart Messages:

Two Migration Architectures for High Availability

Liviu IftodeDepartment of Computer Science

University of Maryland

Page 2: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

2

Relaxed Transport Protocols andDistributed Computing for Massive Networks of Embedded Systems

Liviu IftodeDepartment of Computer Science

University of Maryland

Page 3: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

3

Network-Centric Applications

Network Services services vs. servers clients expect service availability and quality internet protocol limitations

Massive Networks of Embedded Systems dynamic networks with volatile nodes and links applications to expect result availability and

quality traditional distributed computing inadequate

Page 4: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

4

Internet Protocol Limitations

Resource Location eager mapping of resources to hosts (IP

addresses) mapping assumed stable and available

Connection-Oriented Communication reliable end-to-end communication rigid end-point naming (hosts, not resources) service bound to server during connection

Page 5: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

5

The Distributed Computing Model

Networks of computers with relatively stable configuration and identical nodes

Distributed applications with message passing communication

Deterministic execution, always returns the expected result (100% quality)

Routing infrastructure Fault tolerance: node failures are exceptions

Page 6: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

6

Availability Issues

Service availability hard to achieve end-to-end: server availability not enough connectivity failures: switch to alternative servers mobile resources may change hosts

Result availability is even harder volatile nodes: dynamic configuration dynamic resources: content-based naming peer-to-peer communication: no routing

infrastructure

Page 7: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

7

Vision and Solutions

Relaxed Transport-Layer Protocols relax end-point naming and constraints Migratory TCP : server end-point migration for

live connections Cooperative Computing

distributed computing over dynamic networks of embedded systems

Smart-Messages : execution migration with self-routing

Page 8: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

8

Migratory TCP: A Relaxed Transport Protocolfor Network-based Services

Page 9: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

9

TCP-based Internet Services

Adverse conditions to affect service availability internetwork congestion or failure servers overloaded, failed or under DoS attack

TCP has one response network delays => packet loss => retransmission

TCP limitations early binding of service to a server client cannot dynamically switch to another server

for sustained service

Page 10: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

10

Migratory TCP: At a Glance

Migratory TCP offers another solution to network delays: connection migration to a “better” server

Migration mechanism is generic (not application specific) lightweight (fine-grain migration of a per-connection state) and low-latency (application not on critical path)

Requires changes to the server application but totally transparent to the client application

Interoperates with existing TCP

Page 11: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

11

The Migration Model

Client

Server 1

Server 2

Page 12: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

12

Architecture: Triggers and Initiators

Client

Server 1

Server 2

MIGRATE_TRIGGE

RMIGRATE_TRIGGE

RMIGRATE_INITIATE

MIGRATE_TRIGGER

Page 13: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

13

Per-connection State Transfer

Server 1 Server 2

Application

M-TCP

Connections Connections

Page 14: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

14

Application- M-TCP Contract

Server application Define per-connection application state During connection service, export snapshots of

per-connection application state when consistent Upon acceptance of a migrated connection,

import per-connection state and resume service Migratory TCP

Transfer per-connection application and protocol state consistent with the last export from the old to the new server

Page 15: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

15

Migration API

export_state(conn_id, state_snapshot) import_state(conn_id, state_snapshot)

Page 16: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

16

State Synchronization Problem

1

13 2

RE

CV

MTCP

2

13 2

Application

MTCP

2

23 2

ApplicationApplication

EX

PO

RT MTCP

Page 17: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

17

Log-Based State Synchronization

Logs are maintained by the protocol at server discarded at export_state time (state is

sync’ed) Logs are part of the connection state to be

transferred during migration Service resumes from the last exported

state snapshot and uses logs for execution replay

Page 18: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

18

Design Issues

Robustness to server failures: when to transfer the connection state? Eager vs. Lazy transfer

Trigger policies: when to initiate connection migration? policy = metric + trigger

M-TCP overhead vs. Migration Latency: When/how often to export the state snapshot?

Page 19: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

19

Prototype Implementation

Modified the TCP/IP stack in FreeBSD kernel Lazy connection migration Experimental setup

Two servers, one client: P II 400MHz, 128 MB RAM Servers connected by dedicated network link

Synthetic microbenchmark Real applications

PostgreSQL front-end Simple streaming server

Page 20: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

20

Lazy Connection Migration

C (0)

C’

< S

tat e

Requ

est

> (

2)

< S

tate

Reply

> (

3)

Client

Server 1

Server 2

<SYN C,…> (1)

<SYN + ACK> (4)

Page 21: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

21

Microbenchmark

Endpoint switching time vs. state size

Page 22: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

22

Streaming Server Experiment

Server streams data in 1 KB chunks Server performance degrades after sending

32 KB emulated by pacing sends in the server

Migration policy module in the client kernel Metric: inbound rate (smoothed estimator) Trigger: rate drops under 75% of max. observed

rate

Page 23: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

23

Stream Server Experiment

Effective throughput close to average rate seen before server performance degrades

Page 24: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

24

Protocol Utilization

For end-to-end availability applications with long-lived connections critical applications (banking, e-commerce, etc.)

For load balancing migration trigger: at server side, based on load

balancing policy For fault tolerance

eager transfer of connection state

Page 25: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

25

M-TCP Limitations

Requires TCP changes use existing multi-home protocols such as SCTP

Multiple server processes and/or connections recursive state migration: hard problem

Lazy transfer does not address server failure alternative state transfer mechanism (eager, at

the client)

Page 26: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

26

Relaxed Transport Protocols

Autonomous Transport Protocols content-based end-point naming lazy end-point to network address binding apply P2P techniques to (re)discover the end-

point location during connection Split Transport Protocols

split connection in the network involve intermediate nodes in recovery, flow and

congestion control packet replication to tolerate intermediate node

failures

Page 27: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

27

Smart Messages: A Software Architecture for

Cooperative Computing

Page 28: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

28

Distributed Embedded Systems

Massive ad-hoc networks of embedded systems dynamic configuration volatile nodes and links

Distributed collaborative applications multiple intelligent cameras “collaborate” to track a given

object same-model cars on a highway “collaborate” to adapt to

the road conditions How to program and execute collaborative

applications on networks of embedded systems ? IP addressing and routing does not work traditional distributed computing does not work

Page 29: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

29

Cooperative Computing

Distributed computing through execution migration Execution units: Smart Messages

Network memory: Tag Space

Smart Messages migrate through the network and execute on each hop

routing controlled by the application (self-routing)

Embedded nodes admit, execute and send smart messages

maintain local Tag Space

Page 30: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

30

Example of a Distributed Task

0 F

Determine average temperature in town

75 F

95 F

70 F

75 F

85 F

80 F

75 F

85 F

80 F80 F

75 F

Page 31: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

31

Smart Messages (SM)

Components (mobile) code and (mobile) data bricks a lightweight state of the execution

Smart Message life cycle: creation migration execution cached code

Distributed application: a collection of SMs

Page 32: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

32

Tag Space(SM)

Collection of named data persistent across SM executions SM can create, delete, read and write tags

protected using access rights (SM signatures) limited lifetime

I/O tags maintained by the system drivers: Temperature

Name Access Lifetime Data

Temperature any infinite 80

Route_to_Temp {SM sign} 4000 neighbor3

Page 33: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

33

Tag Space(SM) cont’d

What they are used for: content-based addressing: migrate ({tag1,tag2}) I/O port access : read (temperature) data storage: write (tag,value) inter SM communication synchronization on tag update:

block(tag,timeout) routing

Page 34: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

34

SM Execution

T2

Sm

T3

T1

T4

SmSm

SmSm

Tag Space

Ready

Blocked

SM Admission

Non-preemptive but time bounded Access SM data Access Tag Space Create new SM Migrate

Page 35: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

35

Smart Message Example 1

Tag Space Smart Messages

Light_switch block(light_sw)

Light_status

Three signal create(Three_sign)for(;;) block(Three_sig) for (0 to 2) write(Light_sw,1) block(Light_st) write(Light_sw,0) block(Light_st)

write (Three_sig)

SM 1

SM 2

LEDDevice

Light Signal Device

Page 36: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

36

Smart Message Example 2

Tag Space Smart Messages

Image write(Image)

for(;;) block(Image) if (Red) create (Fire) Loc=read(Location) write(Fire,Loc)

SM 1

IntelligentCameraDevicewith GPS

FireDetector

Location

Fire

Migrate(Fire) SM 2

Page 37: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

37

Smart Message Migration

migrate ({tag1,tag2,..},timeout)

• {tag1, tag2,…}: content-based destination address

timeout: abandon migration after timeout and return

content-based routing is implemented using additional smart messages and the Tag Space

1 4

Migrate(tag)

sm

tag32

sys_migrate(2) sys_migrate(3) sys_migrate(4)

Page 38: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

38

Self-Routing Example (step 1)

1 432

Migrate(tag,timeout) { do

if (!route_to_tag)create(Explore_SM)block(route_to_tag)

sys_migrate(route_to_tag) until tag;}

tagtag

route prevSM

Explore_SM {do sys_migrate(all_neighbors) write(previous_to_tag,previous())while !(tag || route_to_tag)do sys_migrate(previous_to_tag) write(route_to_tag,previous())while previous_to_tag

Expl

Page 39: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

39

Self-Routing Example (step 2)

1 432

Migrate(tag,timeout) { do

if (!route_to_tag)create(Explore_SM)block(route_to_tag)

sys_migrate(route_to_tag) until tag;}

tagtag

route prevSM

Explore_SM {do sys_migrate(all_neighbors) write(previous_to_tag,previous())while !(tag || route_to_tag)do sys_migrate(previous_to_tag) write(route_to_tag,previous())while previous_to_tag

Expl

route

Page 40: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

40

Self-Routing Example (step 3)

1 432

Migrate(tag,timeout) { do

if (!route_to_tag)create(Explore_SM)block(route_to_tag)

sys_migrate(route_to_tag) until tag;}

tagtag

route route

SM

route

Page 41: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

41

Status

Prototype implementation

hardware: iPAQs and Bluetooth

software: Java KVM and Linux

Self-Routing

“pull” routing info (similar to Directed Diffusion[Estrin’99]):

“push” routing info (similar to SPIN[Heinzelman’99])

Compare their performance using a SM network simulator

Security issues: not addressed yet

Page 42: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

42

Routing Informartion Flooding

Simulation result

Page 43: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

43

Cooperative Computing: Summary

Distributed computing expressed in terms of computation and migration phases

Content-based naming for target nodes

Application-controlled routing

Is cooperative computing a good programming model for networks of embedded systems ?

Page 44: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

44

In Search for a Good Metric

QoR

Network Adversity0 100%

100% ideal

real

better

Quality of Result (QoR) vs. Network Adversity

Page 45: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

45

Conclusions

Two ideas to improve availability for network-centric applications

Relaxed transport protocols: relax end-point naming and constraints

Cooperative computing: distributed computing with execution migration with application-controlled routing

Two solutions: Migratory TCP and Smart Messages

Page 46: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

46

Acknowledgements

My current and former students in Disco Lab, Rutgers

Cristian Borcea, Deepa Iyer, Porlin Kang, Akhilesh Saxena ,Kiran Srinivasan, Phillip Stanley-Marbell, Florin Sultan

NSF CISE grant 0121416

Page 47: Migratory TCP and Smart Messages: Two Migration Architectures for High Availability

47

Thank you.