Lecture 12, 20-755: The Internet, Summer 1999 1 20-755: The Internet Lecture 12: Scalable services David O’Hallaron School of Computer Science and Department.

Slides:



Advertisements
Similar presentations
Welcome to Middleware Joseph Amrithraj
Advertisements

1 Content Delivery Networks iBAND2 May 24, 1999 Dave Farber CTO Sandpiper Networks, Inc.
1 11 Web Caching Web Protocols and Practice. 2 Topics Web Protocols and Practice WEB CACHING  Cache Definition  Goals of Web Caching  Motivations for.
1 Caching in HTTP Representation and Management of Data on the Internet.
Web Caching Schemes1 A Survey of Web Caching Schemes for the Internet Jia Wang.
Internet Networking Spring 2006 Tutorial 12 Web Caching Protocols ICP, CARP.
CSE 190: Internet E-Commerce Lecture 16: Performance.
The Internet Useful Definitions and Concepts About the Internet.
EEC-484/584 Computer Networks Discussion Session for HTTP and DNS Wenbing Zhao
Web Servers How do our requests for resources on the Internet get handled? Can they be located anywhere? Global?
What’s a Web Cache? Why do people use them? Web cache location Web cache purpose There are two main reasons that Web cache are used:  to reduce latency.
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #13 Web Caching Protocols ICP, CARP.
CDNs & Replication Prof. Vern Paxson EE122 Fall 2007 TAs: Lisa Fowler, Daniel Killebrew, Jorge Ortiz.
Internet Networking Spring 2002 Tutorial 13 Web Caching Protocols ICP, CARP.
Implementing ISA Server Caching. Caching Overview ISA Server supports caching as a way to improve the speed of retrieving information from the Internet.
Definitions, Definitions, Definitions Lead to Understanding.
1 Web Content Delivery Reading: Section and COS 461: Computer Networks Spring 2007 (MW 1:30-2:50 in Friend 004) Ioannis Avramopoulos Instructor:
Proxy Servers Dr. Ronald Bergmann, CIO, ISO. Proxy servers A proxy server is a machine which acts as an intermediary between the computers of a local.
Firewalls and VPNS Team 9 Keith Elliot David Snyder Matthew While.
Computer Networks IGCSE ICT Section 4.
Firewall and Proxy Server Director: Dr. Mort Anvari Name: Anan Chen Date: Summer 2000.
 Proxy Servers are software that act as intermediaries between client and servers on the Internet.  They help users on private networks get information.
Web Proxy Server Anagh Pathak Jesus Cervantes Henry Tjhen Luis Luna.
Web Cache. Introduction what is web cache?  Introducing proxy servers at certain points in the network that serve in caching Web documents for faster.
1 Caching  Temporary storage of frequently accessed data (duplicating original data stored somewhere else)  Reduces access time/latency for clients 
1 Networks, advantages & types of What is a network? Two or more computers that are interconnected so they can exchange data, information & resources.
Web Servers Web server software is a product that works with the operating system The server computer can run more than one software product such as .
1 3 Web Proxies Web Protocols and Practice. 2 Topics Web Protocols and Practice WEB PROXIES  Web Proxy Definition  Three of the Most Common Intermediaries.
Krerk Piromsopa. Web Caching Krerk Piromsopa. Department of Computer Engineering. Chulalongkorn University.
Web Caching: Replication on the World Wide Web Jonathan Bulava CSC8530 – Distributed Systems Dr. Paul Schragger.
Design and Implement an Efficient Web Application Server Presented by Tai-Lin Han Date: 11/28/2000.
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
1 Computer Communication & Networks Lecture 28 Application Layer: HTTP & WWW p Waleed Ejaz
Implementing ISA Server Publishing. Introduction What Are Web Publishing Rules? ISA Server uses Web publishing rules to make Web sites on protected networks.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
Infrastructure for Better Quality Internet Access & Web Publishing without Increasing Bandwidth Prof. Chi Chi Hung School of Computing, National University.
2: Application Layer1 Chapter 2 outline r 2.1 Principles of app layer protocols r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail r 2.5 DNS r 2.6 Socket.
Scalable Web Server on Heterogeneous Cluster CHEN Ge.
1 Welcome to CSC 301 Web Programming Charles Frank.
Web Hosting Herng-Yow Chen. Outline How different web site can be “ virtually hosted ” on the same server, and how this affects HTTP How to make web sites.
Kiew-Hong Chua a.k.a Francis Computer Network Presentation 12/5/00.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 8 Omar Meqdadi Department of Computer Science and Software Engineering University of.
Proxy Servers.
CIS679: Lecture 13 r Review of Last Lecture r More on HTTP.
The Intranet.
2007cs Servers on the Web. The World-Wide Web 2007 cs CSS JS HTML Server Browser JS CSS HTML Transfer of resources using HTTP.
Implementing ISA Server Caching
ITGS Network Architecture. ITGS Network architecture –The way computers are logically organized on a network, and the role each takes. Client/server network.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 4 Computer Systems Review.
EE 122: Lecture 21 (HyperText Transfer Protocol - HTTP) Ion Stoica Nov 20, 2001 (*)
1 COMP 431 Internet Services & Protocols HTTP Persistence & Web Caching Jasleen Kaur February 11, 2016.
Overview on Web Caching COSC 513 Class Presentation Instructor: Prof. M. Anvari Student name: Wei Wei ID:
Web Cache. What is Cache? Cache is the storing of data temporarily to improve performance. Cache exist in a variety of areas such as your CPU, Hard Disk.
Presented by Michael Rainey South Mississippi Linux Users Group
Web and Proxy Server.
The Intranet.
WWW and HTTP King Fahd University of Petroleum & Minerals
Web Development Web Servers.
Caching Temporary storage of frequently accessed data (duplicating original data stored somewhere else) Reduces access time/latency for clients Reduces.
LINUX ADMINISTRATION 1
E-commerce | WWW World Wide Web - Concepts
E-commerce | WWW World Wide Web - Concepts
Web Caching? Web Caching:.
Utilization of Azure CDN for the large file distribution
Internet Networking recitation #12
Internet Applications
ECE 671 – Lecture 16 Content Distribution Networks
CSE 461 HTTP and the Web.
EE 122: HyperText Transfer Protocol (HTTP)
Cache Memory and Performance
Presentation transcript:

Lecture 12, : The Internet, Summer : The Internet Lecture 12: Scalable services David O’Hallaron School of Computer Science and Department of Electrical and Computer Engineering Carnegie Mellon University Institute for eCommerce, Summer 1999

Lecture 12, : The Internet, Summer Today’s lecture Speeding up servers (30 min) Break (10 min) Caching (50 min)

Lecture 12, : The Internet, Summer Scalable servers Question: How do we provide services that scale well with the number of requests? Goals for high-volume sites: –Minimize request latency (response time) for our clients. »want to avoid the dreaded hourglass –Minimize the amount of traffic over our high-speed Internet connection. »Many ISPs charge monthly rates based on actual bandwidth usage. »Recall MCI T1 and T3 pricing from Lecture 6 (programming the Internet).

Lecture 12, : The Internet, Summer Scalability approaches Speed up the servers –Use multiple processes to handle requests »concurrent servers »pre-forking servers (not covered here) –Use multiple computers to process requests. »clustering (not covered here) –e.g., Microsoft cluster, HotBot cluster »distributed servers (not covered here) –use DNS to send requests to geographically distributed mirror sites. Move the content closer to the clients. –Caching –Crucial concept (and big business)

Lecture 12, : The Internet, Summer Iterative servers An iterative server processes one connection at a time. # simple iterative server while (1) { connfd = accept(); }

Lecture 12, : The Internet, Summer Iterative servers client A connection request server listen socket client B Step 1: server accepts connect request from client A.

Lecture 12, : The Internet, Summer Iterative servers Step 2: Server processes request from client A (using A’s connection socket) Client B initiates connection request and waits for server to accept it. client A process request server listen socket client A’s connection socket client B connection request

Lecture 12, : The Internet, Summer Iterative servers Step 3: Server finishes processing request from Client A. Accepts connection request from Client B. client A server listen socket client B connection request

Lecture 12, : The Internet, Summer Iterative servers Step 4: Server processes request from client B (using B’s connection socket) client A process request server listen socket client B’s connection socket client B

Lecture 12, : The Internet, Summer Iterative servers Step 5: Server finishes process client B’s request. Server waits for connection request from next client. client A server listen socket client B

Lecture 12, : The Internet, Summer Iterative servers Pros –Simple –Minimizes latency of short requests. Cons –Higher latencies and lower throughput (requests/sec) for large requests »large response bodies that must be served off disk »long running CGI scripts that access disk files or databases. »no other requests can be served while other work is being done.

Lecture 12, : The Internet, Summer Concurrent servers A concurrent server accepts connections from a parent process and creates children to process the requests. # concurrent server while (1) { connfd = accept(); pid = fork(); if (pid == 0) { # child process exit(); }

Lecture 12, : The Internet, Summer Concurrent servers client A connection request server listen socket client B Step 1: server accepts connect request from client A.

Lecture 12, : The Internet, Summer child Concurrent servers Step 2: Server creates child process to handle request. Client B initiates connection request and waits for server to accept it. client A process request server listen socket client A’s connection socket client B connection request

Lecture 12, : The Internet, Summer Concurrent servers Step 3: Server accepts connection request from client B and creates child process to handle request. child A client A process request server listen socket client A’s connection socket client B client B’s connection socket child B process request

Lecture 12, : The Internet, Summer Concurrent servers Step 4: Server’s children finish processing requests from clients A and B. Server waits for next connection request. client A server listen socket client B

Lecture 12, : The Internet, Summer Concurrent servers Pros –Can decrease latency for large requests (decreases time waiting for connection request to be accepted) –Can increase overall server throughput (requests/sec). Cons –More complex –Potential for “fork bombs” »must limit number of active children Variant: Pre-forking servers –Create a fixed number of children to handle requests ahead of time –Approach used by Apache.

Lecture 12, : The Internet, Summer Break time!

Lecture 12, : The Internet, Summer Today’s lecture Speeding up servers (30 min) Break (10 min) Caching (50 min)

Lecture 12, : The Internet, Summer Caching A cache is a storage area (either in memory or on disk) that holds copies of frequently accessed data. –Typically smaller than primary storage area, but cheaper and faster to access. Fundamental computer systems technique –Memory systems (register files, L1, L2, and L3 caches) –File and database systems (OS I/O buffers) –Internet systems (Web caches)

Lecture 12, : The Internet, Summer Accessing objects from a cache Initially, the remote storage holds objects (data items) and associated keys that identify the objects. Program wants to fetch A, B, then A again A, key(A) B, key(B) C, key(C) “far away” remote storage “nearby” cache storage program

Lecture 12, : The Internet, Summer Accessing objects from a cache Program fetches object A by passing key(A) to the cache. A, key(A) B, key(B) C, key(C) “far away” remote storage “nearby” cache storage program key(A)

Lecture 12, : The Internet, Summer Accessing objects from a cache Object A is not in cache, so cache retrieves a copy of A from primary storage and returns it to program. Cache keeps a copy of A and its key in its storage area A, key(A) B, key(B) C, key(C) “far away” remote storage A, key(A) “nearby” cache storage program key(A) A A

Lecture 12, : The Internet, Summer Accessing objects from a cache Program accesses object B. Cache keeps a copy of B and its key in its storage area. A, key(A) B, key(B) C, key(C) “far away” remote storage A, key(A B, key(B) “nearby” cache storage program key(B) B B

Lecture 12, : The Internet, Summer Accessing objects from a cache Program accesses object A. Cache returns object directly without accessing remote storage A, key(A) B, key(B) C, key(C) “far away” remote storage A, key(A B, key(B) “nearby” cache storage program A key(A)

Lecture 12, : The Internet, Summer Impact of caching Reduces latency of cached objects –e.g., we can access object A from nearby storage rather than faraway storage. Reduces load on remote storage area –Remote storage area never sees requests satisfied by cache.

Lecture 12, : The Internet, Summer Web caching Objects are web pages, keys are URLs Browser caches –One client, multiple servers Proxy caches –Multiple clients, multiple servers –Examples: Squid, Harvest, Apache, every major vendor. –Based on proxy servers Reverse proxy caches –Multiple clients, one server –Example: Inktomi TrafficServer –Based on proxy servers –Also called inverse caches or http accelerators

Lecture 12, : The Internet, Summer Browser caches One client - many servers –Caches objects that come from requests of a single client to many servers Browser caches are located on the disk and in the memory of a local machine. browser disk browser cache client machine server

Lecture 12, : The Internet, Summer Proxy servers A proxy server (or proxy) acts as an intermediary between clients and origin servers –Acts as a server to the client... –Acts as a client to the origin server... proxy origin server request client forwarded request responsefowarded response

Lecture 12, : The Internet, Summer Applications of proxy servers Allow users on secure nets behind firewalls to access Internet services –Original motivating application (Luotonen and Altis, 1994) clients inside the firewall Secure subnet inside firewall HTTP remote HTTP server remote FTP server remote news server remote mail server proxy server on firewall machine HTTP FTP NNTP SNMP

Lecture 12, : The Internet, Summer A proxied HTTP transaction GET HTTP/1.0 client GET /index.html HTTP/1.0 origin server HTTP/ OK complete URLpartial URL proxy

Lecture 12, : The Internet, Summer Motivation for proxy servers Lightweight client machines. –Only need to support HTTP –Local machines with DNS can still use Internet » only needs to know IP address of proxy Centralized logging of all HTTP requests. Centralized filtering and access control of client requests. Centralized authentication site. Facilitates caching.

Lecture 12, : The Internet, Summer Web proxy caches Multiple clients - multiple servers –Typically installed on the border of an organization’s internal network and the Internet. –Motivation: »decrease request latency for the clients on the organization’s network. »decrease traffic on the organization’s connection to the Internet The organization can be on the scale of a university department, company, ISP, or country. –Important for overseas sites because most content is in US and connections between most countries and US is slow.

Lecture 12, : The Internet, Summer Web proxy caches client proxy server proxy cache request forwarded request origin server response The requested object is stored locally (along with any cache relevant response headers) in the proxy cache for later use. –Request can come from the same client or a different client

Lecture 12, : The Internet, Summer Web proxy caches client proxy server proxy cache request origin server response If an up-to-date object is in the cache, then the object can be served locally from the proxy cache.

Lecture 12, : The Internet, Summer Web proxy caches How does a proxy know that it’s local copy is up-to-date? An object is considered fresh (i.e., able to be sent to client without checking first with the origin server) if: –It’s origin server served it with an expiration controlling header and the current time precedes this expiration time. »Expires and Cache-Control response headers –The proxy cache has seen the object recently and it was modified relatively long ago. »Last-Modified response header.

Lecture 12, : The Internet, Summer Web proxy caches Objects that are not known to be fresh must be validated by querying the origin server for the time the object was last modified on the origin server. –Last-Modified response header in HEAD method – Compare with Last-Modified header of cached copy –E-tag is recomputed each object is changed. After validation, if the object is stale it must be fetched from the origin server. Otherwise, it is served directly from the proxy cache.

Lecture 12, : The Internet, Summer Reverse proxy caches Many clients - one server Reverse proxy caches are proxy caches that are located near high-volume servers. –Also called reverse proxies or httpd accellerators –Goal is to reduce server load. server revers e proxy cache large expensive high-latency database client Remote server site

Lecture 12, : The Internet, Summer Case study: The Akamai FreeFlow cache Source: akamai.com

Lecture 12, : The Internet, Summer Case study: The Akamai FreeFlow cache Web pages on this server were previously “Akamaized” offline by the “FreeFlow Launcher” tool [droh] The Akamai server is chosen dynamically to maximize some performance metric based on existing network conditions [droh]

Lecture 12, : The Internet, Summer The Akamai network (Aug 1999) Number of Servers900 Number of Networks25 Number of Countries15 Total Capacity12 Gigabits/second Average Load (at peak utilization)500 Megabits/second Average Network Utilization5% Average Hits Per Day¼ Billion Source: akamai.com

Lecture 12, : The Internet, Summer Example Akamaized page Dave O'Hallaron's Home Page <img src=" 3b3a087c3d0ea3/ align="left"> David O'Hallaron Associate Professor,... Questions: Authentication of requests to Akamai servers? Accurately monitoring a dynamic net?