reliable distributed systems

44
Reliable Distributed Systems Astrolabe

Upload: feo

Post on 14-Jan-2016

40 views

Category:

Documents


0 download

DESCRIPTION

Reliable Distributed Systems. Astrolabe. The Internet. Massive scale. Constant flux. Source: Burch and Cheswick. Demand for more “autonomic”, intelligent behavior. Human beings constantly adapt as their environment changes - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Reliable Distributed Systems

Reliable Distributed Systems

Astrolabe

Page 2: Reliable Distributed Systems

Massive scale. Constant flux

Source: Burch and Cheswick

The Internet

Page 3: Reliable Distributed Systems

Demand for more “autonomic”, intelligent behavior Human beings constantly adapt as

their environment changes You bike up hill… start to breath hard

and sweat. At the top, cool off and catch your breath

It gets cold so you put on a sweater But computer systems tend to be

rigid and easily disabled by minor events

Page 4: Reliable Distributed Systems

Typical examples Customers find that many Web Services

systems are perceived as unreliable End-user gets erratic response time Client could be directed to the wrong server

site But the WS software isn’t at fault!

Usually these problems arise from other systems to which WS is connected

A snarl of spaghetti sits behind the front end

Page 5: Reliable Distributed Systems

A tale of woe Human operators lack tools to see

state of system Can’t easily figure out what may be

going wrong In fact operators cause as much as

70% of all Web-related downtime! And they directly trigger 35% of

crashes

Page 6: Reliable Distributed Systems

Sample tale of woe FlyHigh.com Airlines maintains the

“FlyHigh.com Nerve Center” in Omaha It has an old transactional mainframe

for most operations Connected to this are a dozen newer

relational database applications on clusters

These talk to ~250,000 client systems using a publish-subscribe system

Page 7: Reliable Distributed Systems

FlyHigh.com Architecture

Omaha

transactionalsystem

Enterprise clusters: flight plans, seat assignments, employee schedules, etc

Anchorage check-in

Seat request

Page 8: Reliable Distributed Systems

Anchorage goes down Problem starts in Omaha

System operator needs to move a key subsystem from computer A to B

But the DNS is slow to propagate the change (maybe 48 to 72 hours)

Anchorage still trying to talk to Omaha So a technician fixes the problem by

typing in the IP address of B Gets hired by United with a hefty raise

Page 9: Reliable Distributed Systems

FlyHigh.com Architecture

Omaha

A Btransactional

system

Enterprise clusters: flight plans, seat assignments, employee schedules, etc

Anchorage check-in

Seat request a.FlyHigh.com.com126.18.17.103

Page 10: Reliable Distributed Systems

Six months later… Time goes by and now we need to move

that service again Anchorage crashes again… But this time nobody can figure out why! Hunting for references to the service or

even to B won’t help Need to realize that the actual IP address of

B is wired into the application now Nobody remembers what the technician did

or why he did it!

Page 11: Reliable Distributed Systems

What about big data centers? Discussed early in the course Let’s have another look

Page 12: Reliable Distributed Systems

A glimpse inside eStuff.com

Pub-sub combined with point-to-pointcommunication technologies like TCP

LB

service

LB

service

LB

service

LB

service

LB

service

“front-end applications”

Legacy applicatio

ns

Page 13: Reliable Distributed Systems

Tracking down a problem Has the flavor of “data mining”

Perhaps, the “product popularity service” is timing out on the “availability” service

But this might not be something we routinely instrument

Need a way to “see” status and pose questions about things not normally instrumented

Page 14: Reliable Distributed Systems

Monitoring a hierarchy of sets A set of data centers, each having A set of services, each structured as A set of partitions, each consisting

of A set of programs running in a

clustered manner on A set of machines

Page 15: Reliable Distributed Systems

x y z

Jim Gray: “A RAPS of RACS” RAPS: A reliable array of

partitioned services RACS: A reliable array of cluster-

structured server processes

Ken Birman searching for “digital

camera”

Pmap “B-C”: {x, y, z} (equivalent replicas)

Here, y gets picked, perhaps based on load

A set of RACS

RAPS

Page 16: Reliable Distributed Systems

Jim Gray: “A RAPS of RACS”

Query source Update source

Services are hosted at data centers but accessible system-wide

pmap

pmap

pmap

Server pool

l2P map

Logical partitioning of services

Logical services map to a physical resource pool, perhaps many to one

Data center A Data center B

Operators can control pmap, l2P map, other parameters. Large-scale multicast used to

disseminate updates

Page 17: Reliable Distributed Systems

Homeland Defense and Military Data Mining Issue is even worse for a new

generation of “smart” data mining applications

Their role is to look for something on behalf of the good guys Look for images of tall thin guys with

long white beards on horseback

Page 18: Reliable Distributed Systems

Two options We could ship all the data to the

analyst’s workstation E.g. ship every image, in real-time If N machines gather I images per

second, and we have B bytes per image, the load on the center system grows with N*I*B. With A analysts the load on the network grows as N*I*B*A

Not very practical.

Page 19: Reliable Distributed Systems

Two options Or, we could ship the work to the

remote sensor systems They do all the work “out there”, so

each just searches the images it is capturing

Load is thus quite low Again, a kind of data mining and

monitoring problem… not so different from the one seen in data centers!

Page 20: Reliable Distributed Systems

Autonomic Distributed Systems Can we build a new generation of middleware

in support of these new adaptive systems? Middleware that perceives the state of the network It can represent this knowledge in a form smart

applications can exploit Although built from large numbers of rather dumb

components the emergent behavior is adaptive. These applications are more robust, more secure, more responsive than any individual component

When something unexpected occurs, they can diagnose the problem and trigger a coordinated distributed response

They repair themselves after damage

Page 21: Reliable Distributed Systems

Astrolabe

Astrolabe Intended as help for

applications adrift in a sea of information

Structure emerges from a randomized peer-to-peer protocol

This approach is robust and scalable even under extreme stress that cripples more traditional approaches

Developed at Cornell By Robbert van

Renesse, with many others helping…

Just an example of the kind of solutions we need

Astrolabe is a form of knowledge representation for self-managed networks

Page 22: Reliable Distributed Systems

Astrolabe: Distributed Monitoring

Name Load Weblogic?

SMTP?

Word Version

swift 2.0 0 1 6.2

falcon 1.5 1 0 4.1

cardinal 4.5 1 0 6.0

Row can have many columns Total size should be k-bytes, not megabytes Configuration certificate determines what

data is pulled into the table (and can change)

3.1

5.3

0.9

1.9

3.6

0.8

2.1

2.7

1.1

1.8

ACM TOCS 2003

Page 23: Reliable Distributed Systems

Astrolabe in a single domain Each node owns a single tuple, like the

management information base (MIB) Nodes discover one-another through a

simple broadcast scheme (“anyone out there?”) and gossip about membership Nodes also keep replicas of one-another’s

rows Periodically (uniformly at random) merge

your state with some else…

Page 24: Reliable Distributed Systems

State Merge: Core of Astrolabe epidemic

Name Time Load Weblogic?

SMTP? Word Version

swift 2003 .67 0 1 6.2

falcon 1976 2.7 1 0 4.1

cardinal 2201 3.5 1 1 6.0

Name Time Load Weblogic?

SMTP? Word Versi

on

swift 2011 2.0 0 1 6.2

falcon 1971 1.5 1 0 4.1

cardinal 2004 4.5 1 0 6.0

swift.cs.cornell.edu

cardinal.cs.cornell.edu

Page 25: Reliable Distributed Systems

State Merge: Core of Astrolabe epidemic

Name Time Load Weblogic?

SMTP? Word Version

swift 2003 .67 0 1 6.2

falcon 1976 2.7 1 0 4.1

cardinal 2201 3.5 1 1 6.0

Name Time Load Weblogic?

SMTP? Word Versi

on

swift 2011 2.0 0 1 6.2

falcon 1971 1.5 1 0 4.1

cardinal 2004 4.5 1 0 6.0

swift.cs.cornell.edu

cardinal.cs.cornell.edu

swift 2011 2.0

cardinal 2201 3.5

Page 26: Reliable Distributed Systems

State Merge: Core of Astrolabe epidemic

Name Time Load Weblogic?

SMTP? Word Version

swift 2011 2.0 0 1 6.2

falcon 1976 2.7 1 0 4.1

cardinal 2201 3.5 1 1 6.0

Name Time Load Weblogic?

SMTP? Word Versi

on

swift 2011 2.0 0 1 6.2

falcon 1971 1.5 1 0 4.1

cardinal 2201 3.5 1 0 6.0

swift.cs.cornell.edu

cardinal.cs.cornell.edu

Page 27: Reliable Distributed Systems

Observations Merge protocol has constant cost

One message sent, received (on avg) per unit time.

The data changes slowly, so no need to run it quickly – we usually run it every five seconds or so

Information spreads in O(log N) time But this assumes bounded region size

In Astrolabe, we limit them to 50-100 rows

Page 28: Reliable Distributed Systems

Big system will have many regions Astrolabe usually configured by a

manager who places each node in some region, but we are also playing with ways to discover structure automatically

A big system could have many regions Looks like a pile of spreadsheets A node only replicates data from its

neighbors within its own region

Page 29: Reliable Distributed Systems

Scaling up… and up…

With a stack of domains, we don’t want every system to “see” every domain Cost would be huge

So instead, we’ll see a summaryName Time Load Weblogic?

SMTP? Word Version

swift 2011 2.0 0 1 6.2

falcon 1976 2.7 1 0 4.1

cardinal 2201 3.5 1 1 6.0

cardinal.cs.cornell.edu

Name Time Load Weblogic?

SMTP? Word Version

swift 2011 2.0 0 1 6.2

falcon 1976 2.7 1 0 4.1

cardinal 2201 3.5 1 1 6.0

Name Time Load Weblogic?

SMTP? Word Version

swift 2011 2.0 0 1 6.2

falcon 1976 2.7 1 0 4.1

cardinal 2201 3.5 1 1 6.0

Name Time Load Weblogic?

SMTP? Word Version

swift 2011 2.0 0 1 6.2

falcon 1976 2.7 1 0 4.1

cardinal 2201 3.5 1 1 6.0

Name Time Load Weblogic?

SMTP? Word Version

swift 2011 2.0 0 1 6.2

falcon 1976 2.7 1 0 4.1

cardinal 2201 3.5 1 1 6.0

Name Time Load Weblogic?

SMTP? Word Version

swift 2011 2.0 0 1 6.2

falcon 1976 2.7 1 0 4.1

cardinal 2201 3.5 1 1 6.0

Name Time Load Weblogic?

SMTP? Word Version

swift 2011 2.0 0 1 6.2

falcon 1976 2.7 1 0 4.1

cardinal 2201 3.5 1 1 6.0

Page 30: Reliable Distributed Systems

Astrolabe builds a monitoring hierarchy

Name Load Weblogic? SMTP? Word Version

swift 2.0 0 1 6.2

falcon 1.5 1 0 4.1

cardinal 4.5 1 0 6.0

Name Load Weblogic? SMTP? Word Version

gazelle 1.7 0 0 4.5

zebra 3.2 0 1 6.2

gnu .5 1 0 6.2

Name Avg Load

WL contact SMTP contact

SF 2.6 123.45.61.3

123.45.61.17

NJ 1.8 127.16.77.6

127.16.77.11

Paris 3.1 14.66.71.8 14.66.71.12

San Francisco

New Jersey

SQL query “summarizes”

data

Dynamically changing query output is visible system-wide

Page 31: Reliable Distributed Systems

Large scale: “fake” regions These are

Computed by queries that summarize a whole region as a single row

Gossiped in a read-only manner within a leaf region

But who runs the gossip? Each region elects “k” members to run

gossip at the next level up. Can play with selection criteria and “k”

Page 32: Reliable Distributed Systems

Hierarchy is virtual… data is replicated

Name Load Weblogic? SMTP? Word Version

swift 2.0 0 1 6.2

falcon 1.5 1 0 4.1

cardinal 4.5 1 0 6.0

Name Load Weblogic? SMTP? Word Version

gazelle 1.7 0 0 4.5

zebra 3.2 0 1 6.2

gnu .5 1 0 6.2

Name Avg Load

WL contact SMTP contact

SF 2.6 123.45.61.3

123.45.61.17

NJ 1.8 127.16.77.6

127.16.77.11

Paris 3.1 14.66.71.8 14.66.71.12

San Francisco

New Jersey

Page 33: Reliable Distributed Systems

Hierarchy is virtual… data is replicated

Name Load Weblogic? SMTP? Word Version

swift 2.0 0 1 6.2

falcon 1.5 1 0 4.1

cardinal 4.5 1 0 6.0

Name Load Weblogic? SMTP? Word Version

gazelle 1.7 0 0 4.5

zebra 3.2 0 1 6.2

gnu .5 1 0 6.2

Name Avg Load

WL contact SMTP contact

SF 2.6 123.45.61.3

123.45.61.17

NJ 1.8 127.16.77.6

127.16.77.11

Paris 3.1 14.66.71.8 14.66.71.12

San Francisco

New Jersey

Page 34: Reliable Distributed Systems

What makes Astrolabe a good fit Notice how hierarchical database

abstraction “emerges” without ever being physically represented on any single machine Moreover, this abstraction is very robust It scales well… localized disruptions won’t

disrupt the system state… consistent in eyes of varied beholders

Yet individual participant runs a nearly trivial peer-to-peer protocol

Supports distributed data aggregation, data mining. Adaptive and self-repairing…

Page 35: Reliable Distributed Systems

Worst case load? A small number of nodes end up

participating in O(logfanoutN) epidemics Here the fanout is something like 50 In each epidemic, a message is sent and

received roughly every 5 seconds We limit message size so even during

periods of turbulence, no message can become huge. Instead, data would just propagate slowly Haven’t really looked hard at this case

Page 36: Reliable Distributed Systems

Data Mining In client-server systems we usually

Collect the data at the server Send queries to it

With Astrolabe Send query (and configuration

certificate) to edge nodes They pull in desired data and query it User sees a sort of materialized result

Page 37: Reliable Distributed Systems

Pros and Cons Pros:

As you look “up” the hierarchy the answer you see can differ for different users (“where can I get some gas?”)

Parallelism makes search fast Cons:

Need to have agreement on what to put into the aggregations

Everyone sees the same hierarchy

Page 38: Reliable Distributed Systems

Our platform in a datacenter

Query source Update source

Services are hosted at data centers but accessible system-wide

pmap

pmap

pmap

Server pool

l2P map

Logical partitioning of services

Logical services map to a physical resource pool, perhaps many to one

Data center A Data center B

One application can be a source of both queries and updates.

Two Astrolabe Hierarchies monitor the system: one tracks logical services, and the other tracks the physical server pool

Operators can control pmap, l2P map, other parameters. Large-scale multicast used to

disseminate updates

Page 39: Reliable Distributed Systems

Dealing with legacy apps? Many advocate use of a wrapper

Take the old crufty program… now it looks “data center enabled” (e.g. it might connect to Astrolabe or other tools)

Page 40: Reliable Distributed Systems

We’ve seen several P2P tools Scalable probabilistically reliable multicast

based on P2P (peer-to-peer) epidemics We could use this for the large multicast

fanouts Replication with strong properties

Could use it within the RACS DHTs or other content indexing systems Perhaps, gossip repair mechanism to

detect and eliminate inconsistencies

Page 41: Reliable Distributed Systems

Solutions that share properties Scalable Robust against localized disruption Have emergent behavior we can

reason about, exploit in the application layer

Think of the way a hive of insects organizes itself or reacts to stimuli. There are many similarities

Page 42: Reliable Distributed Systems

Revisit our goals Are these potential components for autonomic

systems? Middleware that perceives the state of the network It represent this knowledge in a form smart

applications can exploit Although built from large numbers of rather dumb

components the emergent behavior is adaptive. These applications are more robust, more secure, more responsive than any individual component

When something unexpected occurs, they can diagnose the problem and trigger a coordinated distributed response

They repair themselves after damage We seem to have the basis from which to work!

Page 43: Reliable Distributed Systems

Brings us full circle Our goal should be a new form of very

stable “autonomic middleware” Have we accomplished this goal?

Probabilistically reliable, scalable primitives They solve many problems Gaining much attention now from industry,

academic research community Fundamental issue is skepticism about

peer-to-peer as a computing model

Page 44: Reliable Distributed Systems

Conclusions? We’re at the verge of a breakthrough –

networks that behave like autonomic infrastructure on behalf of smart applications

Could open the door to big advances But industry has yet to deploy these

ideas and may think about them for a long time before doing so