MC714: Sistemas Distribu dos Prof. Lucas Wanner Instituto de - - PowerPoint PPT Presentation

mc714 sistemas distribu dos
SMART_READER_LITE
LIVE PREVIEW

MC714: Sistemas Distribu dos Prof. Lucas Wanner Instituto de - - PowerPoint PPT Presentation

MC714: Sistemas Distribu dos Prof. Lucas Wanner Instituto de Computac ao, Unicamp Aula 27: Sistemas Web Distribu dos Distributed Web-based systems Essence The WWW is a huge client-server system with millions of servers; each


slide-1
SLIDE 1

MC714: Sistemas Distribu´ ıdos

  • Prof. Lucas Wanner

Instituto de Computac ¸ ˜ ao, Unicamp

Aula 27: Sistemas Web Distribu´ ıdos

slide-2
SLIDE 2

Distributed Web-based systems

Essence The WWW is a huge client-server system with millions of servers; each server hosting thousands

  • f hyperlinked documents.

Documents are often represented in text (plain text, HTML, XML) Alternative types: images, audio, video, applications (PDF, PS) Documents may contain scripts, executed by client-side software

Client machine Browser OS Server machine Web server

  • 1. Get document request (HTTP)
  • 3. Response
  • 2. Server fetches

document from local file

Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 2 / 13

slide-3
SLIDE 3

Multi-tiered architectures

Observation Already very soon, Web sites were organized into three tiers.

Web server Database server CGI process CGI program

  • 1. Get request
  • 3. Start process to fetch document
  • 5. HTML document

created HTTP request handler

  • 6. Return result
  • 4. Database interaction

Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 3 / 13

slide-4
SLIDE 4

Web services

Observation At a certain point, people started recognizing that it is was more than just user ↔ site interaction: sites could offer services to other sites ⇒ standardization is then badly needed.

Service description (WSDL) Client machine Client application Stub Server application Stub Communication subsystem Communication subsystem SOAP Service description (WSDL) Service description (WSDL) Directory service (UDDI) Publish service Look up a service Generate stub from WSDL description Server machine Generate stub from WSDL description

Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 4 / 13

slide-5
SLIDE 5

Clients: Web browsers

Observation Browsers form the Web’s most important client-side sofware. They used to be simple, but that was long ago.

User interface Browser engine Rendering engine Network comm. HTML/XML parser Display back end Client-side script interpreter

Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 5 / 13

slide-6
SLIDE 6

Apache Web server

Observation: More than 46% of all ∼170 million active Web sites are Apache.

Hook Hook Hook Hook Function

... ... ...

Module Module Module Apache core Functions called per hook Link between function and hook Request Response

Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 6 / 13

slide-7
SLIDE 7

Server clusters

Essence To improve performance and availability, WWW servers are often clustered in a way that is transparent to clients.

Front end Web server Web server Web server Web server Request Response Front end handles all incoming requests and outgoing responses LAN

Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 7 / 13

slide-8
SLIDE 8

Server clusters

Problem The front end may easily get overloaded, so that special measures need to be taken. Transport-layer switching: Front end simply passes the TCP request to one of the servers, taking some performance metric into account. Content-aware distribution: Front end reads the content of the HTTP request and then selects the best server.

Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 8 / 13

slide-9
SLIDE 9

Server Clusters

Switch Client Web server Web server Distributor Distributor Dis- patcher

  • 1. Pass setup request

to a distributor

  • 2. Dispatcher selects

server

  • 3. Hand of

f TCP connection

  • 4. Inform

switch Setup request Other messages

  • 5. Forward
  • ther

messages

  • 6. Server responses

Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 9 / 13

slide-10
SLIDE 10

Web proxy caching

Basic idea (cnt’d) Cooperative caching, by which you first check your neighbors on a cache miss

Web proxy Web server Web proxy Web proxy Cache Cache Cache Client Client Client Client Client Client Client Client Client

  • 2. Ask neighboring proxy caches
  • 1. Look in

local cache HTTP Get request

  • 3. Forward request

to Web server

Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 10 / 13

slide-11
SLIDE 11

Replication in Web hosting systems

Observation By-and-large, Web hosting systems are adopting replication to increase performance. Much research is done to improve their organization. Follows the lines of self-managing systems.

Web hosting system Metric estimation Analysis +/- +/- +/- Reference input Initial configuration Uncontrollable parameters (disturbance / noise) Observed output Measured output Adjustment triggers Corrections Replica placement Consistency enforcement Request routing

Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 11 / 13

slide-12
SLIDE 12

Handling flash crowds

Observation We need dynamic adjustment to balance resource usage. Flash crowds introduce a serious problem.

(a) (b) (c) (d) 2 days 2 days 6 days 2.5 days Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 12 / 13

slide-13
SLIDE 13

Server replication

Content Delivery Network CDNs act as Web hosting services to replicate documents across the Internet providing their customers guarantees on high availability and performance (example: Akamai).

Origin server Client CDN server CDN DNS server Regular DNS system Cache

  • 1. Get base document
  • 2. Document with refs

to embedded documents

  • 6. Get embedded documents

(if not already cached)

  • 5. Get embedded

documents

  • 7. Embedded documents

Return IP address client-best server DNS lookups 3 4

Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 13 / 13