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



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

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

DMZ Network Visibility with Wireshark June 15, 2010

INTRODUCTION TO FIREWALL SECURITY

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

Server Iron Hands-on Training

Availability Digest. Redundant Load Balancing for High Availability July 2013

Load Balancing Servers, Firewalls, and Caches

Load Balancing und Load Sharing

Load Balancing 101: Firewall Sandwiches

Load Balancing Web Applications

Session Hijacking Exploiting TCP, UDP and HTTP Sessions

Application Delivery Networking

Why SSL is better than IPsec for Fully Transparent Mobile Network Access

Understanding Slow Start

IP address format: Dotted decimal notation:

Load Balancing for Microsoft Office Communication Server 2007 Release 2

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

CLE202 Introduction to ServerIron ADX Application Switching and Load Balancing

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

Deployment Guide AX Series with Active Directory Federation Services 2.0 and Office 365

GLOBAL SERVER LOAD BALANCING WITH SERVERIRON

ClusterLoad ESX Virtual Appliance quick start guide v6.3

Content Delivery Networks

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

Chapter 8 Security Pt 2

Packet Matching. Paul Offord, Advance7

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

Scalable Linux Clusters with LVS

Virtual private network. Network security protocols VPN VPN. Instead of a dedicated data link Packets securely sent over a shared network Internet VPN

Alteon Web OS. Intelligent Internet. What s New in Alteon Web OS Alteon Web OS Benefits. Product Brief

Content Switching Module for the Catalyst 6500 and Cisco 7600 Internet Router

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

Building a Systems Infrastructure to Support e- Business

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

AppDirector Load balancing IBM Websphere and AppXcel

FortiOS Handbook - Load Balancing VERSION 5.2.2

Source-Connect Network Configuration Last updated May 2009

Advanced Computer Networks. Layer-7-Switching and Loadbalancing

PRODUCT VERSION: LYNC SERVER 2010, LYNC SERVER 2013, WINDOWS SERVER 2008

Firewall Defaults, Public Server Rule, and Secondary WAN IP Address

Repeater. BrowserStack Local. browserstack.com 1. BrowserStack Local makes a REST call using the user s access key to browserstack.

1 Data information is sent onto the network cable using which of the following? A Communication protocol B Data packet

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

Web Traffic Capture Butler Street, Suite 200 Pittsburgh, PA (412)

Firewall Load Balancing

Configuring Health Monitoring

Managing Virtual Servers

Microsoft Lync Server Overview

Deployment Guide AX Series with Citrix XenApp 6.5

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

White Paper. Resonate Central Dispatch. White Paper June 2013

Firewall Introduction Several Types of Firewall. Cisco PIX Firewall

How To Handle A Power Outage On A Server Farm (For A Small Business)

Improving DNS performance using Stateless TCP in FreeBSD 9

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

Solution of Exercise Sheet 5

LESSON Networking Fundamentals. Understand TCP/IP

Cape Girardeau Career Center CISCO Networking Academy Bill Link, Instructor. 2.,,,, and are key services that ISPs can provide to all customers.

Proxy Server, Network Address Translator, Firewall. Proxy Server

Radware s AppDirector and AppXcel An Application Delivery solution for applications developed over BEA s Weblogic

Chapter 4 Firewall Protection and Content Filtering

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

Firewall Firewall August, 2003

FIREWALL AND NAT Lecture 7a

Internet Protocol: IP packet headers. vendredi 18 octobre 13

Firewalls P+S Linux Router & Firewall 2013

Network Address Translation (NAT)

VLAN und MPLS, Firewall und NAT,

Microsoft Office Communications Server 2007 & Coyote Point Equalizer Deployment Guide DEPLOYMENT GUIDE

Network Security Topologies. Chapter 11

Firewalls. Chapter 3

1. The Web: HTTP; file transfer: FTP; remote login: Telnet; Network News: NNTP; SMTP.

Load Balancing. Final Network Exam LSNAT. Sommaire. How works a "traditional" NAT? Un article de Le wiki des TPs RSM.

Prerequisites. Creating Profiles

Chapter 8 Network Security

Final exam review, Fall 2005 FSU (CIS-5357) Network Security

APV9650. Application Delivery Controller

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

Securing Networks with PIX and ASA

Introduction to Computer Security Benoit Donnet Academic Year

Network Technologies

Load Balancing Microsoft Terminal Services. Deployment Guide

Content Delivery Networks

Computer Networks. Chapter 5 Transport Protocols

Load Balancing Oracle Application Server (Oracle HTTP Server) Quick Reference Guide

Chapter 1 Load Balancing 99

Transport and Network Layer

DEPLOYMENT GUIDE Version 1.0. Deploying the BIG-IP LTM with Microsoft Windows Server 2008 R2 Remote Desktop Services

Radware s AppDirector and Microsoft Windows Terminal Services 2008 Integration Guide

12/8/2015. Review. Final Exam. Network Basics. Network Basics. Network Basics. Network Basics. 12/10/2015 Thursday 5:30~6:30pm Science S-3-028

Deployment Guide Microsoft IIS 7.0

Table of Contents. 1 Overview 1-1 Introduction 1-1 Product Design 1-1 Appearance 1-2

Chapter 11 Cloud Application Development

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

Network Security TCP/IP Refresher

Chapter 4: Security of the architecture, and lower layer security (network security) 1

Transcription:

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

Scalability multiple servers Availability server fails Manageability Goals do not route to it take servers on/off line decouple application from server partition content across servers Security NAT & firewall functions QoS e.g. identify high priority clients

DNS Load Balancing Ordinary DNS Lookup

DNS Load Balancing Round-Robin DNS Lookup

DNS Load Balancing - Drawbacks DNS has no access to server state balances hits, not server load no fault tolerance DNS client behavior (caches)?

Dedicated Load Balancer - Basic Structure Clients Servers Network Load Balancer Server farm has a Virtual IP address (VIP) VIP is routed to load balancer Load balancer forwards to Real Servers

Which Layer to Switch? Layer 7 Layer 6 Layer 5 Layer 4 Layer 3 Layer 2 Layer 1 Application Presentation Session Transport Network Data Link Physical HTTP etc TCP/UDP IP MAC Switching can be done in layer 2, 2/3, 4/7

VIP to Real Server Mappings VIP=123.122.121.1 Load Balancer Servers RS1: 10.10.10.1 Web+FTP RS2: 10.10.10.2 Web+SMTP RS3: 10.10.10.2 SMTP VIP:80 (HTTP) VIP:21 (FTP ) VIP:82 (SMTP) RS1:80 + RS2:80 RS1:21 RS2:82 + RS3:82 NAT here is subtle here

NAT Issues VIP 10.10.10.1 A D NAT B C 10.10.10.2 A: ClientIP:ClientPort VIP:80 B: XXX 10.10.10.2:80 C: 10.10.10.2:80 10.10.10.1 D: VIP:80 ClientIP:ClientPort I don t care what XXX is, but... Client requires VIP:80 as source of packet D NAT (Load Balancer) must translate?

A E RIP Router [M1] B VIP[M2] Direct Server Return Balancer A: ClientIP:ClientPort VIP:80 B: ClientIP:ClientPort[M1] VIP:80[M2] C: ClientIP:ClientPort[M1] VIP:80[M3] D: VIP:80[M3] ClientIP:ClientPort[M1] D: VIP:80 ClientIP:ClientPort Configure VIP as loopback address on server Balancer translates MAC address but not IP Reply need not go through Balancer! reply is usually bigger than request D 10.10.10.1 C 10.10.10.2[M3] VIP is loopback (switched) local network

Port-Address Translation Map to multiple ports on same real server VIP:p RS1:p1 + RS1: p2 +... + RS1:p17 Run 17 instances of service on RS1 Some services work better that way!

Session Persistence Techniques They interaction with load balancing...

client SYN TCP Protocol server SYN ACK ACK Data Exchange FIN FIN ACK

HTTP Transaction client SYN SYN ACK ACK HTTP request HTTP response FIN FIN ACK server Newest version of HTTP allows (but does not require) clients to keep TCP connection open for multiple request/response. So session!= TCP connection No guarantee all TCP connections in a session will map to the same server.

Identifying Sessions Balancer has two kinds of information: server conditions - load, crashed,... client data - information in the SYN packet

SYN Based Session Identification All connections with similar information in the SYN are part of same session, subject to session persistence timeout Source IP all activity from a given host Source IP + VIP + Port all activity from given host to given service Source IP + VIP allows switch HTTP to SSL

SYN Based Session Identification - II Port Grouping first connection to given VIP and port group choses based on server load subsequent connections to same VIP and port group respect existing session Concurrent connections e.g. passive FTP

Proxies Proxy servers introduce two problems: load balancing session persistence

Load Balancing with Proxies Clients Proxy Servers Network Load Balancer All client connections appear to come from the same host - the proxy server itself!

Session Maintenance with Proxies Clients Proxies Servers Network Load Balancer Client connections in same session may come from different proxy servers

How Serious is Proxy Problem? Requires many clients behind small number of proxies all accessing my site

Delayed Binding Suppose load balancer wants to use information from the data? e.g. the URL in the HTTP header Balancer must peek into the TCP data

TPC Sequence Numbers SYN [seq 100] SYN ACK [seq 500, ack 101] ACK [seq 101, ack 501] data [seq 102, ack 501] data [seq 501, ack 103] data [seq 103, ack 502] data [seq 502, ack 104] sequence number in one direction is initialized by the server so how can the Balancer look at the data before chosing the server?

TPC Sequence Numbers - II Balancer must adjust seq numbers in every TCP packet! SYN [seq 100] SYN ACK [seq 500, ack 101] ACK [seq 101, ack 501] data [seq 102, ack 501] data [seq 501, ack 103] data [seq 103, ack 502] data [seq 502, ack 104] SYN [seq 100] SYN ACK [seq 600, ack 101] ACK [seq 101, ack 601] data [seq 102, ack 601] data [seq 601, ack 103] data [seq 103, ack 602] data [seq 602, ack 104]

Cookies We all know what cookies are... HTTP GET request HTTP GET reply contains cookie (server=2) next HTTP GET request includes cookie (server=2)

Cookie-Read Technique Each server creates server=myid cookie at start of session Balancer uses delayed binding to read the cookies and respect existing sessions Note: this requires changes to the server apps!

Cookie-Insert Technique Balancer inserts a server=17 cookie in the reply stream when server 17 replies to a request that creates a new session Balancer uses delayed binding on reverse TCP connection Server applications completely unchanged! Disadvantage: Balancer must rewrite the TCP data stream, very expensive

Cookie-Rewrite Technique Each server creates server=xxx cookie at start of session Balancer uses delayed binding to XXX by actual server ID in reply Balancer uses delayed binding to read cookies in requests Minimal change to server application Balancer does not need to change length of the reply stream

Encryption? Must decrypt to interpret session data This requires a delayed binding implementation

Sessions and SSL SSL V 3.0 and above supports session IDs in the protocol SSL initiation request with optional SSL session ID Server response includes SSL session ID Encrypted HTTP request Encrypted HTTP reply But: there is no precise specification of how clients use the SSL session ID, when it expires,...

Sessions and Failures If an application server fails, how much session state will be lost? Obviously, we want to minimize this But at reasonable expense

Approach 0 - State in Cookies Pass cookies back and forth between client and server encoding all session state. Cookies can hold only a limited amount of information But this makes the sessions stateless at the application servers

Approach 1 - Brute Force Keep session state in the database... Commit frequently. Not widely used because of expense of storing session state to disk

Approach 2 - Group Communication Multicast session state to all (or a group of) application servers e.g. use Spread toolkit Can switch between application servers without loss of session state Application servers keep session state in volatile memory loss of all app servers results in loss of session data - unlikely

Approach 3 - Compromise Commit session state to the data base at the important points after significant changes HTTP to HTTPS change hope important is infrequent

URL Switching An obvious technique we should mention... Balancer can use delayed binding to examine the URL in an HTTP request header choose the server accordingly commercial products support patternmatching languages to specify this

URL Switching Caveat HTTP 1.1 protocol supports more than one request on same TCP connection... What if two successive HTTP requests on the same TCP connection should map to different servers? this gets real hard

Single Points of Failure Router here Load Balancer Load Balancer L2 switch here

Single Points of Failure Router Router Load Balancer Load Balancer L2 switch L2 switch