How To Balance A Load Balancer On A Server On A Linux (Or Ipa) (Or Ahem) (For Ahem/Netnet) (On A Linux) (Permanent) (Netnet/Netlan) (Un



Similar documents
Load-Balancing Introduction (with examples...)

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

Availability Digest. Redundant Load Balancing for High Availability July 2013

Load Balancer Comparison: a quantitative approach. a call for researchers ;)

Networking and High Availability

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

Networking and High Availability

Load Balancing for Microsoft Office Communication Server 2007 Release 2

Load Balancing und Load Sharing

DEPLOYMENT GUIDE Version 1.2. Deploying F5 with Microsoft Exchange Server 2007

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

ENQUIRY NO.NIE/PS/ DATE: 02/09/2014

Introduction. Linux Virtual Server for Scalable Network Services. Linux Virtual Server. 3-tier architecture of LVS. Virtual Server via NAT

Load Balancing Web Applications

Application Note. Lync 2010 deployment guide. Document version: v1.2 Last update: 12th December 2013 Lync server: 2010 ALOHA version: 5.

DEPLOYMENT GUIDE Version 1.2. Deploying the BIG-IP System v10 with Microsoft IIS 7.0 and 7.5

Load Balancing McAfee Web Gateway. Deployment Guide

Intro to Load-Balancing Tomcat with httpd and mod_jk

vrealize Automation Load Balancing

IERG 4080 Building Scalable Internet-based Services

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

3/21/2011. Topics. What is load balancing? Load Balancing

ClusterLoad ESX Virtual Appliance quick start guide v6.3

Load Balancing Web Proxies Load Balancing Web Filters Load Balancing Web Gateways. Deployment Guide

How To Use The Cisco Ace Module For A Load Balancing System

Apache HTTP Server. Load-Balancing with Apache HTTPD 2.2 and later. Erik Abele

Scalable Internet Services and Load Balancing

High Availability Low Dollar Load Balancing

Oracle Collaboration Suite

Topics. 1. What is load balancing? 2. Load balancing techniques 3. Load balancing strategies 4. Sessions 5. Elastic load balancing

Smoothwall Web Filter Deployment Guide

BASICS OF SCALING: LOAD BALANCERS

Application Delivery Networking

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

How to Make the Client IP Address Available to the Back-end Server

A Standard Modest WebSite

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

VERITAS Cluster Server Traffic Director Option. Product Overview

LoadBalancer and Exchange 2013

Active-Active and High Availability

CumuLogic Load Balancer Overview Guide. March CumuLogic Load Balancer Overview Guide 1

Advanced SLB High Availability and Stateless SLB

2. Are explicit proxy connections also affected by the ARM config?

Implementing the Application Control Engine Service Module

WAN Optimization, Web Cache, Explicit Proxy, and WCCP. FortiOS Handbook v3 for FortiOS 4.0 MR3

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

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

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

Red Hat Enterprise Linux 7 Load Balancer Administration

DEPLOYMENT GUIDE Version 1.0. Deploying the BIG-IP LTM with the Zimbra Open Source and Collaboration Suite

Application Delivery Controller (ADC) Implementation Load Balancing Microsoft SharePoint Servers Solution Guide

Load Balancing Bloxx Web Filter. Deployment Guide

DEPLOYMENT GUIDE Version 1.0. Deploying the BIG-IP LTM with Apache Tomcat and Apache HTTP Server

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

DEPLOYMENT GUIDE Version 1.2. Deploying the BIG-IP system v10 with Microsoft Exchange Outlook Web Access 2007

F5 Configuring BIG-IP Local Traffic Manager (LTM) - V11. Description

Load Balancing Trend Micro InterScan Web Gateway

Exam F F5 BIG-IP V9.4 LTM Essentials Version: 5.0 [ Total Questions: 100 ]

IP Phone Presence Setup

Load Balancing Microsoft Terminal Services. Deployment Guide

INTRODUCTION TO FIREWALL SECURITY

Strategies for Getting Started with IPv6

Introducing the Microsoft IIS deployment guide

Load Balancing Microsoft Lync 2010 Load Balancing Microsoft Lync Deployment Guide

Load Balancer. Introduction. A guide to Load Balancing.

bbc Adobe LiveCycle Data Services Using the F5 BIG-IP LTM Introduction APPLIES TO CONTENTS

SSL Acceleration: A Technology Primer

Deploying the BIG-IP System with Microsoft IIS

Microsoft Exchange Server

Routing Security Server failure detection and recovery Protocol support Redundancy

DEPLOYMENT GUIDE Version 1.2. Deploying the BIG-IP System v9.x with Microsoft IIS 7.0 and 7.5

Microsoft Lync 2010 Deployment Guide

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

S y s t e m A r c h i t e c t u r e

Load Balancing Sophos Web Gateway. Deployment Guide

Managing Virtual Servers

Deploying the BIG-IP System v10 with SAP NetWeaver and Enterprise SOA: ERP Central Component (ECC)

Deploying the BIG-IP System v11 with Microsoft Exchange 2010 and 2013 Client Access Servers

CS514: Intermediate Course in Computer Systems

Microsoft Internet Information Services (IIS) Deployment Guide

Cisco ACE 4710 Application Control Engine

Securing Networks with PIX and ASA

Clustering and High Availability for Enterprise Tools 8.4x 8.5x

Formación en Tecnologías Avanzadas

Deploying F5 with Microsoft Active Directory Federation Services

Loadbalancer.org. Loadbalancer.org appliance quick setup guide. v6.6

Building a Systems Infrastructure to Support e- Business

Appliance Administration Manual. v7.2

Application Note. Active Directory Federation Services deployment guide

AppDirector Load balancing IBM Websphere and AppXcel

SoftLayer Fundamentals. Load Balancing. July, 2014

ALOHA Load-Balancer. Microsoft Exchange 2010 deployment guide. Document version: v1.4. ALOHA version concerned: v4.2 and above

DEPLOYMENT GUIDE Version 1.1. DNS Traffic Management using the BIG-IP Local Traffic Manager

Chapter 2 TOPOLOGY SELECTION. SYS-ED/ Computer Education Techniques, Inc.

TESTING & INTEGRATION GROUP SOLUTION GUIDE

Barracuda Load Balancer Online Demo Guide

Practical Load Balancing

FortiOS Handbook Load Balancing for FortiOS 5.0

Chapter 51 Server Load Balancing

Transcription:

Super/Ultra-Basic Load-Balancing Introduction For AFNOG 2012 Joel Jaeggli 1

What is Load-balancing The act of dividing a workload between N > 1 devices capable for performing a task. Multiple contexts in internet services where this concept occurs. DNS MX records Multiple links (L2 trunks, L3 ECMP) Multiple servers 2

Goals Greater scalability Higher availability Reduced cost 3

Examples L2 trunk or L3 ECMP Stateless per-flow-load balancing Per-packet causes reordering so... XOR 5-tuple 4

L3+L4 L4 or L7 Load-balancing IP+TCP or Application layer (http(s) imap etc) 5

Applications L2/L3 Switches L4+ LACP L3ECMP Haproxy (L4, L7) NGINX (L7) F5 LTM A10 Netscalar 6

So what does an L4 load Balancer do. Looks and the Destination IP and Port to determine which pool of servers a connections is mount for. Forwards the incoming connection to one pool member on the basis of policy. Could be one-sided e.g. Direct-Server-Return Or Source-NAT Keep the connection pinned to the particular pool member by tracking the connection. How do you track? 7

5-tuple What is a 5-tuple XOR hash of source/dest ip, source/dest port, protocol number. IP header 8

5-tuple continued TCP Headers x 9

What does an L7 load balancer do? An L7 load balancer answers incoming connection requests. It understands the protocol being spoken across the connection (e.g. HTTP IMAP FTP etc). On the basis of either 5-tuple hash or some higher layer value, (example a URI or a cookie or both) the request is directed to a member of the appropriate pool. L7 is another word for proxy or ALG (Application Layer Gateway). 10

Isn't L7 going to be slower than L4? Probably but not always. Importantly there are optimizations that can reduce the expense. TCP syn-cookies Connection pooling Consider 3-way handshake 11

Applications - Cont Open source Apache mod_proxy_balance Haproxy NGNIX LVS 12

Applications Commercial Commercial F5 Netscalar A10 Benefits of a commercial approach Coordination of supporting elements Routing DNS Complex health checks HA Can have ASIC based acceleration. 13

High Availability Approaches Active-Passive VRRP State replication Active-Active State-replication considerations Horizontally scaled GTM DNS based approach L3ECMP (routed) 14

HA active/passive 15

HA active/passive - failover 16

HA active/passive failover with replication 17

Active / Passive Active-passive failover requires a mechanism Could use: VRRP (Virtual Router Redundancy Protocol) CARP (Common Address Redundancy Protocol) If failover is not coordinated with load-balancerhealth, a failed load-balancer may remain active (coordination problem). If state is not replicated between load balancers, failover will not account for existing connections (not a problem for short-lived connections with no affinity) 18

Active / Passive Cont Affinity can be preserved with a Cookie LVS (linux virtual server) can do statereplication (using a kernel module) State-replication doesn't help with scaling performance-wise (at all) 19

Active/Active 20

Active/Active How? Need a mechanism to distribute requests to multiple front end load-balancers. In effect, a load balancer for your load balancers. HOW? DNS e.g. each LB has a separate ip address associated with resources it's load-balancing Return one or more resource records either randomly or on some externally instrumented basis. Fail load balancers in or out using health check or manually L2 or L3 stateless plus sticky mechanism. 21

Active/Active Stateful vs Not Stateful is typically done by clusters of commercial loadbalancers. State replication can be expensive and imperfect. At scale, can be extremely expensive Memory on cluster members and bandwidth/cpu for replication is the limiting factor for state and connections per section. Stateless In the DNS case resource records for a failed LB have to time out of caches before that LB stops being used. In the L3-ECMP case a failure will cause some fraction of connections to rehash across other load-balancers anywhere from a quarter to half (they will then be rendered out of state and lost). 22

Our Exercise - HAProxy We're going to deploy HAProxy to load-balance connections to two http servers. HAProxy can do L4 (any TCP) or L7 (HTTP) load balancing We're going to do L7, this allows us to access http related features, including for example including a cookie. 23

HAProxy vs NGINX L4 vs L7 HAProxy can load balance anything over TCP or do L7. SSL NGINX is L7 only (HTTP(s) and IMAP/POP3). HAProxy doesn't support (can't only treat as TCP) NGINX does, so cookies for example can be parsed, can be used for SSL offload etc. Model HAProxy is threaded, effectively allowing it to engage multiple cpus in the activity. NGINX uses an event driven single threaded model. Both have merit, HAProxy is probably more scalable. 24

Goals 1)Install and perform a basic configuration of HAProxy. 2)Configure two additional webserver instances on alternate ports in Apache. 3)Demonstrate load-balanced-http connections between them. 4)Log X-Forwarded-For. 5)Bonus: use a cookie to pin a requesting host to one server or another. 25

Bibliography HAProxy - http://haproxy.1wt.eu/ NGNIX - http://wiki.nginx.org/main F5 LTM - http://www.f5.com/products/big-ip/local-traffic-manager.html A10 Networks - http://www.a10networks.com/ Apache mod_proxy_balance - http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html Linux virtual server - http://www.linuxvirtualserver.org/index.html Wikipedia CARP - http://en.wikipedia.org/wiki/common_address_redundancy_protocol Wikipedia VRRP - http://en.wikipedia.org/wiki/virtual_router_redundancy_protocol 26