Advanced Computer Networks. Layer-7-Switching and Loadbalancing



Similar documents
CS514: Intermediate Course in Computer Systems

Advanced Computer Networks. Datacenter Network Fabric

Single Pass Load Balancing with Session Persistence in IPv6 Network. C. J. (Charlie) Liu Network Operations Charter Communications

Load Balancing and Sessions. C. Kopparapu, Load Balancing Servers, Firewalls and Caches. Wiley, 2002.

Advanced Computer Networks. Scheduling

CSE331: Introduction to Networks and Security. Lecture 12 Fall 2006

Network Security TCP/IP Refresher

Availability Digest. Redundant Load Balancing for High Availability July 2013

Outline VLAN. Inter-VLAN communication. Layer-3 Switches. Spanning Tree Protocol Recap

GLOBAL SERVER LOAD BALANCING WITH SERVERIRON

Managing Virtual Servers

Web Caching and CDNs. Aditya Akella

DATA COMMUNICATOIN NETWORKING

LESSON Networking Fundamentals. Understand TCP/IP

CS 188/219. Scalable Internet Services Andrew Mutz October 8, 2015

APV9650. Application Delivery Controller

Session Hijacking Exploiting TCP, UDP and HTTP Sessions

Transport and Network Layer

Final for ECE374 05/06/13 Solution!!

1. Comments on reviews a. Need to avoid just summarizing web page asks you for:

ZEN LOAD BALANCER EE v3.04 DATASHEET The Load Balancing made easy

Server Traffic Management. Jeff Chase Duke University, Department of Computer Science CPS 212: Distributed Information Systems

Layer 4-7 Server Load Balancing. Security, High-Availability and Scalability of Web and Application Servers

Deploying the Barracuda Load Balancer with Office Communications Server 2007 R2. Office Communications Server Overview.

SiteCelerate white paper

Load Balancing Microsoft Terminal Services. Deployment Guide

Chapter 8 Security Pt 2

Advanced Computer Networks. Introduction

Large-Scale Web Applications

Lecture 3: Scaling by Load Balancing 1. Comments on reviews i. 2. Topic 1: Scalability a. QUESTION: What are problems? i. These papers look at

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

Acquia Cloud Edge Protect Powered by CloudFlare

CloudFlare advanced DDoS protection

Computer Networks - CS132/EECS148 - Spring

How do I get to

Lab Exercise SSL/TLS. Objective. Step 1: Open a Trace. Step 2: Inspect the Trace

Accelerating Network Virtualization Overlays with QLogic Intelligent Ethernet Adapters

ClusterLoad ESX Virtual Appliance quick start guide v6.3

Building Nameserver Clusters with Free Software

Firewalls. Basic Firewall Concept. Why firewalls? Firewall goals. Two Separable Topics. Firewall Design & Architecture Issues

CLE202 Introduction to ServerIron ADX Application Switching and Load Balancing

Network Security. Chapter 3. Cornelius Diekmann. Version: October 21, Lehrstuhl für Netzarchitekturen und Netzdienste Institut für Informatik

Scalability of web applications. CSCI 470: Web Science Keith Vertanen

CS101 Lecture 19: Internetworking. What You ll Learn Today

High Availability HTTP/S. R.P. (Adi) Aditya Senior Network Architect

Load Balancing Bloxx Web Filter. Deployment Guide

Application Delivery Networking

We will give some overview of firewalls. Figure 1 explains the position of a firewall. Figure 1: A Firewall

OpenFlow Based Load Balancing

Load Balancing Sophos Web Gateway. Deployment Guide

UNIVERSITY OF OSLO Department of Informatics. Performance Measurement of Web Services Linux Virtual Server. Muhammad Ashfaq Oslo University College

21.4 Network Address Translation (NAT) NAT concept

SoftLayer Fundamentals. Load Balancing. July, 2014

A host-based firewall can be used in addition to a network-based firewall to provide multiple layers of protection.

Project 4: IP over DNS Due: 11:59 PM, Dec 14, 2015

Web Application Hosting Cloud Architecture

Content Distribution Networks (CDN)

Introduction to Network Operating Systems

CS155 - Firewalls. Simon Cooper <sc@sgi.com> CS155 Firewalls 22 May 2003

Multi-layer switch hardware commutation across various layers. Mario Baldi. Politecnico di Torino.

ExamPDF. Higher Quality,Better service!

Internet Protocol: IP packet headers. vendredi 18 octobre 13

Chapter 11 Cloud Application Development

Strategies for Getting Started with IPv6

Load Balancing Trend Micro InterScan Web Gateway

Life of a Packet CS 640,

Solution of Exercise Sheet 5

TCP/IP Fundamentals. OSI Seven Layer Model & Seminar Outline

Measuring the Web: Part I - - Content Delivery Networks. Prof. Anja Feldmann, Ph.D. Dr. Ramin Khalili Georgios Smaragdakis, PhD

APV x600 Series. Application Delivery Controller APV1600, APV2600, APV4600, APV5600, APV6600, APV8600, APV9600

LinkProof DNS Quick Start Guide

How To Understand The Power Of A Content Delivery Network (Cdn)

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

Understanding Slow Start

Duet: Cloud Scale Load Balancing with Hardware and Software

Network Fundamentals Carnegie Mellon University

Creating Web Farms with Linux (Linux High Availability and Scalability)

Stateful Firewalls. Hank and Foo

1. Introduction. 2. DoS/DDoS. MilsVPN DoS/DDoS and ISP. 2.1 What is DoS/DDoS? 2.2 What is SYN Flooding?

ZEN LOAD BALANCER EE v3.02 DATASHEET The Load Balancing made easy

VLAN und MPLS, Firewall und NAT,

Outline. CSc 466/566. Computer Security. 18 : Network Security Introduction. Network Topology. Network Topology. Christian Collberg

Application Note. Onsight Connect Network Requirements v6.3

Lab 5 Explicit Proxy Performance, Load Balancing & Redundancy

FortiOS Handbook - Load Balancing VERSION 5.2.2

Cisco AnyConnect Secure Mobility Solution Guide

Server Iron Hands-on Training

Chapter 51 Server Load Balancing

Firewalls. Firewalls. Idea: separate local network from the Internet 2/24/15. Intranet DMZ. Trusted hosts and networks. Firewall.

OVERLAYING VIRTUALIZED LAYER 2 NETWORKS OVER LAYER 3 NETWORKS

DEPLOYMENT GUIDE Version 1.2. Deploying the BIG-IP LTM for SIP Traffic Management

Exam : EE : F5 BIG-IP V9 Local traffic Management. Title. Ver :

Exam Name: Foundry Networks Certified Layer4-7 Professional Exam Type: Foundry Exam Code: FN0-240 Total Questions: 267

DDoS attacks on electronic payment systems. Sean Rijs and Joris Claassen Supervisor: Stefan Dusée

Transcription:

Oriana Riva, Department of Computer Science ETH Zürich Advanced Computer Networks 263-3501-00 Layer-7-Switching and Loadbalancing Patrick Stuedi, Qin Yin and Timothy Roscoe Spring Semester 2015

Outline Last time Virtual machine networking Para-virtualization SR-IOV IOMMU Today Load balancing TCP Splicing Distributed load balancing 2

Challenge: accessing services Datacenters are designed to be scalable Datacenters are replicated Each has lots of machines Service span (and share) data centers So: What address does, e.g. www.search.ch resolve to? What entity does this address refer to? What does this entity do? 3

Requirements Close by datacenter Load balance across machines in a center Target machines where the user s state is kept Accessed using TCP (HTTP, SSL, ) 4

Option 1: IP Anycast One IP address refers to multiple destinations BGP advertizes multiple destinations Packets end up at nearest destination to source. Problems: IP layer only reliable for stateless protocols (UDP) All packets of a TCP flow must go to the same machine Service location pushed into BGP couples routing with end-system provision 5

Option 1: IP Anycast One IP address refers to multiple destinations BGP advertizes multiple destinations Packets end up at nearest destination to source. Problems: IP layer only reliable for stateless protocols (UDP) Service location pushed into BGP couples routing with end-system provision Used for DNS root server location 6

Requirements Close by datacenter Load balance across machines in a center Target machines where the user s state is kept Accessed using TCP (HTTP, SSL, ) All packets of a TCP flow must go to the same machine 7

Recall DNS lookup 8

Option 2: DNS Insight: who says the answer is always the same? Idea: smart DNS server authoritative for service Query for, e.g.. www.google.com or www.bing.com returns a different A record depending on: Source address of browser machine Current state of the service Load Failures A random number 9

DNS tricks One-level of indirection Single DNS server returns different Arecs Additional level of indirection First service resolver returns CNAME Regional service resolver can be more specific Used for finding the nearest datacenter for a service 10

Using CNAMEs timeouts 11

DNS does not solve the problem Need IP address for every instance of the service 100,000 machines 100,000 globally routable IP addresses expensive! Machine fails need to update DNS state DNS state changes rapidly short TTL on queries even higher load on DNS servers Slow to react to hot spots or other load skews Selection of machine can only be made based on address of client's primary resolver don't know which client this is 12

Next step: use 1 IP address Use Network Address Translation Hash source addresses to server machines

TCP three-way handshake

TCP three-way handshake

Stateless hashing Hash(Source IP) Completely static No dynamic load balancing Hash(Source IP, Source TCP port) Better, but still static Limited to 64k destinations per client machine Known as a Layer-4 load balancer 16

Stateless hashing Hash(Source IP) Completely static No dynamic load balancing Hash(Source IP, Source TCP port) Better, but still static Limited to 64k destinations per client machine Known as a Layer-4 load balancer Basic problem: nothing else is known by the end of the handshake! 17

Why is static hashing bad? Machine failure/upgrade/provisioning Can t update hash function efficiently in switch Load balancing Can t avoid a heavily-loaded machine Lack of Locality Resource being accessed Client accessing the resource 18

What else might we want to hash on? 19

HTTP Host: header Introduced in HTTP/1.1 mandatory Hosting providers need to switch based on virtual host, not physical host Different services have different virtual host Avoids replicating all service state everywhere 20

Switching on URL Locality: Allows state to be partitioned across machines Isolation: Rare, computationally intensive URLs can be sequestered Sensitive data can be kept on more expensive, auditted machines 21

Hashing on cookies Enables partioning of servers by User state Session state Critical for scaling online services to billions of users No need to share state No need to synchronize state 22

How to do it? Problem: Don t know the hash key until after the HTTP request Typically the first segment after the 3WS Solution: Don t establish connection to server until client has sent HTTP request 23

Late-binding of TCP connection Client Switch Server Port = 3620 time 24

Late-binding of TCP connection Client Switch Server Port = 3620 TCP connection setup + HTTP GET time 25

Late-binding of TCP connection Client Switch Server Port = 3620 TCP connection setup + HTTP GET TCP connection setup + HTTP GET time 26

Late-binding of TCP connection Client Switch Server Port = 3620 TCP connection setup + HTTP GET TCP connection setup + HTTP GET HTTP response (acks not shown) time 27

Late-binding of TCP connection Client Switch Server Port = 3620 TCP connection setup + HTTP GET TCP connection setup + HTTP GET HTTP response HTTP response (acks not shown) time 28

Late-binding: Naïve implementation (SOCKS protocol) 29

Late-binding: Naïve implementation (SOCKS protocol) Inefficient: switch needs to copy data between the connections! 30

TCP Splicing Proposed around 1997 by Maltz & Bhagwat at IBM Key idea: Take two established TCP connections and splice them Transfer segments unmodified between them Remap port numbers and segment numbers on the fly Advantages: Very simple calculation per packet Not much state to maintain per spliced connection No segmentation/reassembly No buffering/copying 31

Splicing pseudocode (from Maltz & Bhagwat) 32

Splicing in pseudo code queue packets received from server splice connections, but allow for final 'n' bytes to be transmitted to the client before splicing 'n' bytes message signaling the completion of the splicing operation 33

Splicing in pseudo code 34

What state is needed? For each packet, need to do the following: IP header operations: Rewrite source and destination IP addresses Update IP header checksum TCP header operations: Rewrite source and destination port numbers Apply fixed offset to sequence number Apply fixed offset to acknowledgement number Update TCP header checksum calculated from existing connection state when splice occurs 35

It s easy to do in hardware A10 AX Application Delivery Controller Advanced layer 4 / layer 7 server load balancing HTTP Proxy Layer 7 URL and URL hash switching Comprehensive Layer 7 application persistence support Load balancing methods: Round Robin, Least Connections, Weighted Round Robin, Weighted Least Connections, Fastest Response Aggregated throughput: up to 115 Gbps 36

Problems of single-box load balancing Expensive! Scale-up Buy bigger (more expensive) load balancer when reaching capacity 37

Ananta: Load balancing in Windows Azure Windows Azure: Microsoft's cloud computing platform Compute, Storage, Databases, etc. in the cloud Ananta: Distributed, scalable load balancing running on hosts in a datacenter Lower cost Scale on demand 38

Background: Windows Azure load balancing Clients connect to service using a virtual IP (VIP) Load balancer (LB) load balances traffic to specific server machines using a direct IP (DIP) 39

Background: Windows Azure load balancing (2) Load balancer is also used when two services communicate within the same data center 40

Ananta: Inbound traffic Ananta Manager 41

Ananta: Inbound traffic 1 Spread packet to MUX using ECMP 4 5 De-capsulate and forward to DIP 2 Lookup the VIP-to-DIP mapping 6 7 Encapsulate response 3 Tunnel packet to DIP 8 Forward to router (bypass MUX) 42

Summary IP Anycast: select a DNS root server Dynamic DNS: locate nearby data centers Layer-3-switching: balance connections across machines TCP splicing: seamlessly join two connections Layer-7-switching: use splicing to late-bind servers to HTTP connects Ananta: distributed load balancing 43

References Host Anycasting Service, C. Partridge, T. Mendez, W. Milliken, Internet RFC 1546, November 1993. TCP Splicing for Application Layer Proxy Performance, David A. Maltz, and Pravin Bhagwat. IBM Research Report 21139 (Computer Science/Mathematics), IBM Research Division, 1998. Ananta: Cloud Scale Load Balancing, SigComm 2013 44