An introduction to Apache Traffic Server. Leif Hedstrom December 2011



Similar documents
ATS for Systems Administrators. Apache Traffic Server. Basic configuration. For Systems Administrators. Notes

ATS Test Documentation

HAProxy 1.5 and beyond

Software Enabled Load Balancer by Introducing the Concept of Sub Servers

MAGENTO HOSTING Progressive Server Performance Improvements

Magento & Zend Benchmarks Version 1.2, 1.3 (with & without Flat Catalogs)

Practical Load Balancing

Online Help. Websense Content Gateway. v7.6

Agenda. Tomcat Versions Troubleshooting management Tomcat Connectors HTTP Protocal and Performance Log Tuning JVM Tuning Load balancing Tomcat

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

Online Help. Websense Content Gateway. v7.5

Tomcat Tuning. Mark Thomas April 2009

Question: 3 When using Application Intelligence, Server Time may be defined as.

Apache Tomcat. Load-balancing and Clustering. Mark Thomas, 20 November Pivotal Software, Inc. All rights reserved.

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

Introduction 1 Performance on Hosted Server 1. Benchmarks 2. System Requirements 7 Load Balancing 7

MEASURING WORKLOAD PERFORMANCE IS THE INFRASTRUCTURE A PROBLEM?

JBoss Seam Performance and Scalability on Dell PowerEdge 1855 Blade Servers

Common Server Setups For Your Web Application - Part II

Front-End Performance Testing and Optimization

Web Server Architectures

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

FortiOS Handbook WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 5.0

Architecting ColdFusion For Scalability And High Availability. Ryan Stewart Platform Evangelist

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

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

Volume SYSLOG JUNCTION. User s Guide. User s Guide

Zeus Traffic Manager VA Performance on vsphere 4

CHAPTER 3 PROBLEM STATEMENT AND RESEARCH METHODOLOGY

Rebasoft Auditor Quick Start Guide

Websense Content Gateway v7.x: Troubleshooting

Stateful Inspection Technology

TFE listener architecture. Matt Klein, Staff Software Engineer Twitter Front End

Implementing Reverse Proxy Using Squid. Prepared By Visolve Squid Team

PHP PERFORMANCE. Principles and Tools. By Kevin Schroeder Technical Consultant Zend Technologies. Copyright 2007, Zend Technologies Inc.

Apache Tomcat Tuning for Production

Apache Tomcat & Reverse Proxies

INTRODUCTION TO FIREWALL SECURITY

Apache Tomcat Clustering

Challenges of Sending Large Files Over Public Internet

IERG 4080 Building Scalable Internet-based Services

v7.8.2 Release Notes for Websense Content Gateway

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

FortiGate Multi-Threat Security Systems I

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

Web Caching and CDNs. Aditya Akella

Installing and Configuring Websense Content Gateway

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

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

Eloquence Training What s new in Eloquence B.08.00

CHAPTER 4 PERFORMANCE ANALYSIS OF CDN IN ACADEMICS

How Comcast Built An Open Source Content Delivery Network National Engineering & Technical Operations

4D WebSTAR 5.1: Performance Advantages

Internet Content Distribution

Hadoop: Embracing future hardware

Improving DNS performance using Stateless TCP in FreeBSD 9

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

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

Riverbed Stingray Traffic Manager VA Performance on vsphere 4 WHITE PAPER

Resource Containers: A new facility for resource management in server systems

Getting More Performance and Efficiency in the Application Delivery Network

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

Next Generation Open Source Messaging with Apache Apollo

Real-Time Analysis of CDN in an Academic Institute: A Simulation Study

Check Point FireWall-1 HTTP Security Server performance tuning

Load Balancing Web Applications

Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme. Firewall

Securing Networks with PIX and ASA

Configuring WCCP v2 with Websense Content Gateway the Web proxy for Web Security Gateway

Application Performance Testing Basics

Proxy Server, Network Address Translator, Firewall. Proxy Server

Firewall Firewall August, 2003

making drupal run fast

Stingray Traffic Manager Sizing Guide

Rproxy Servers and Caching - Explained

WordPress Optimization

Denial Of Service. Types of attacks

White paper. QNAP Turbo NAS with SSD Cache

CYAN SECURE WEB APPLIANCE. User interface manual

Hosting more than one FortiOS instance on. VLANs. 1. Network topology

INUVIKA OPEN VIRTUAL DESKTOP FOUNDATION SERVER

Distributed File System. MCSN N. Tonellotto Complements of Distributed Enabling Platforms

( ) ( ) TECHNOLOGY BRIEF. XTNDConnect Server: Scalability SCALABILITY REFERS TO HOW WELL THE SYSTEM ADAPTS TO INCREASED DEMANDS AND A GREATER

F-Secure Internet Gatekeeper Virtual Appliance

Understanding Slow Start

ios App Performance Things to Take Care

ExamPDF. Higher Quality,Better service!

Layers of Caching: Key to scaling your website. Lance Albertson -- Narayan Newton

SOFTWARE ENGINEERING 4C03. Computer Networks & Computer Security. Network Firewall

FortiOS Handbook - WAN Optimization, Web Cache, Explicit Proxy, and WCCP VERSION 5.2.4

FileMaker Server 15. Getting Started Guide

Agenda. Enterprise Application Performance Factors. Current form of Enterprise Applications. Factors to Application Performance.

CentOS Linux 5.2 and Apache 2.2 vs. Microsoft Windows Web Server 2008 and IIS 7.0 when Serving Static and PHP Content

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

ZingMe Practice For Building Scalable PHP Website. By Chau Nguyen Nhat Thanh ZingMe Technical Manager Web Technical - VNG

Tempesta FW. Alexander Krizhanovsky NatSys Lab.

Design and Implementation of an IP based authentication mechanism for Open Source Proxy Servers in Interception Mode

ArcGIS Server Security Threats & Best Practices David Cordes Michael Young

System Services. Engagent System Services 2.06

CS 665: Computer System Security. Network Security. Usage environment. Sources of vulnerabilities. Information Assurance Module

Transcription:

An introduction to Apache Traffic Server Leif Hedstrom December 2011

Who am I? One of the drivers to open source Traffic Server (at Yahoo) Committer for Apache Traffic Server VP of Apache Traffic Server PMC ASF member Go Daddy s Principal Architect for Hosting zwoop@apache.org @zwoop +zwoop

History of Traffic Server Inktomi Traffic Server Yahoo Traffic Server Apache Traffic Server 1995 2000 2005 2010

Plenty of FOSS Proxy Servers

Features ATS HAproxy nginx Squid Varnish mod_proxy Worker Threads Y N N N Y Y Multi-Process N Y Y N Y Y Event-driven Y Y Y Y sometimes Y Plugin APIs Y N Y part Y Y Forward Proxy Y N N Y N Y Reverse Proxy Y Y Y Y Y Y Transp. Proxy Y Y N Y N N Load Balancer weak Y Y Y Y Y Persistent Cache Y N Y Y sorta Y ESI Y N N Y kinda N ICP soon N N Y N N Keep-Alive Y N Y Y Y Y SSL Y N Y Y N Y Pipeline Y N Y Y N Y

Mandatory useless benchmark 120,000" 100,000" Throughput) 80,000" 60,000" 40,000" 20,000" 0" ATS"2.1.9" Nginx"0.8.53" Varnish"2.1.5" Req"/"sec"

Less useless benchmark Throughput% 120,000# 100,000# 80,000# 60,000# 40,000# 20,000# 0# ATS#2.1.9# Nginx#0.8.53# Varnish#2.1.5# 4.0# 3.5# 3.0# 2.5# 2.0# 1.5# 1.0# 0.5# 0.0# Time%to%first%response% Req#/#sec# Latency#(ms)#

Intermediaries - Forward Proxy The browser (UA) is explicitly configured to use the FP server as a proxy GET http://c.com/ HTTP/1.1 Web site A Browser Forward Proxy Web site B GET / HTTP/1.1 Host: c.com Web site C

Intermediaries - Reverse Proxy The reverse proxy has explicit rules for a.com, b.com and c.com. Other requests are (typically) denied GET / HTTP/1.1 Host: c.com Web site A Browser Reverse Proxy Web site B GET / HTTP/1.1 Host: c.com Web site C

Intermediaries - Intercepting Proxy There are no explicit configurations in browser of proxy. The transparent proxy intercepts HTTP requests, and proxies them to the destination. GET / HTTP/1.1 Host: c.com Web site A Browser Router or Firewall Intercepting Proxy GET / HTTP/1.1 Host: c.com Web site B Web site C

Web Cash? h4p://www.flickr.com/photos/amagill/3366720659/

No, Web Cache! h4p://www.flickr.com/photos/dglazkov/287092560/

Common enemies of performance 3-Way handshake Congestion control DNS lookups

Common enemies of performance 3-Way handshake Congestion control DNS lookups

TCP 3-way Handshake SYN SYN ACK ACK Client Established Server

Common enemies of performance 3-Way handshake Congestion control DNS lookups

Congestion control #2 #1 #0 ACK 0-2... #8 #3 ACK 3-8 #21... #9 Client ACK 9-21 Server

Common enemies of performance 3-Way handshake Congestion control DNS lookups

http://news.example.com/ http://finance.example.com/ http://groups.example.com/

http://news.example.com/ http://finance.example.com/ http://groups.example.com/ vs http://www.example.com/news http://www.example.com/finance http://www.example.com/groups

The concurrency problem

Solution 1: Multithreading Single CPU Dual CPU Thread 1 Thread 1 Thread 2 Thread 2 Thread 1 Thread 3 Thread 1 Thread 3 Thread 3 Thread 3 Time Time

Problems with multi-threading "When two trains approach each other at a crossing, both shall come to a full stop and neither shall start up again until the other has gone." From Wikipedia, Illogical statute passed by Kansas legislation.

Solution 2: Event Processing Scheduled events Network events Disk I/O events Queue Event Loop Disk handler HTTP state machine Accept handler Can generate new events

Problems with event processors

Traffic Server threads model n threads per core m threads per disk ~10 threads Asynchronous event processor Asynchronous event processor... Asynchronous event processor Disk I/O thread Disk I/O thread... Disk I/O thread Accept threads (per port) Logging threads Various "admin" threads Shared Resources RAM cache Disk cache Reloadable Configs Stats, logs etc.

http://www.flickr.com/photos/stuartpilbrow/3345896050/

plugin.config records.config partition.config hosting.config cache.config update.config ip_allow.config storage.config logs_xml.config parent.config remap.config icp.config

records.config for reverse proxy CONFIG proxy.config.http.server_port INT 80 CONFIG proxy.config.cache.ram_cache.size INT 1G CONFIG proxy.config.cache.ram_cache_cutoff INT 1M CONFIG proxy.config.reverse_proxy.enabled INT 1 CONFIG proxy.config.url_remap.remap_required INT 1 CONFIG proxy.config.url_remap.pristine_host_hdr INT 0 CONFIG proxy.config.http.negative_caching_enabled INT 1 CONFIG proxy.config.http.negative_caching_lifetime INT 120 CONFIG proxy.config.http.cache.ignore_client_cc_max_age INT 1 CONFIG proxy.config.http.normalize_ae_gzip INT 1

records.config for reverse proxy CONFIG proxy.config.http.server_port INT 80 CONFIG proxy.config.cache.ram_cache.size INT 1G CONFIG proxy.config.cache.ram_cache_cutoff INT 1M CONFIG proxy.config.reverse_proxy.enabled INT 1 CONFIG proxy.config.url_remap.remap_required INT 1 CONFIG proxy.config.url_remap.pristine_host_hdr INT 0 CONFIG proxy.config.http.negative_caching_enabled INT 1 CONFIG proxy.config.http.negative_caching_lifetime INT 120 CONFIG proxy.config.http.cache.ignore_client_cc_max_age INT 1 CONFIG proxy.config.http.normalize_ae_gzip INT 1

records.config for forward proxy CONFIG proxy.config.http.server_port INT 8080 CONFIG proxy.config.cache.ram_cache.size INT 1G CONFIG proxy.config.cache.ram_cache_cutoff INT 1M CONFIG proxy.config.reverse_proxy.enabled INT 0 CONFIG proxy.config.url_remap.remap_required INT 0 CONFIG proxy.config.url_remap.pristine_host_hdr INT 0 CONFIG proxy.config.http.negative_caching_enabled INT 1 CONFIG proxy.config.http.negative_caching_lifetime INT 120 CONFIG proxy.config.http.cache.ignore_client_cc_max_age INT 1 CONFIG proxy.config.http.normalize_ae_gzip INT 1

remap.config examples map http://www.example.com/css http://css.example.com map http://www.example.com http://real.example.com reverse_map http://real.example.com http://www.example.com redirect http://example.com http://www.example.com regex_map http://(.*)\.example.com http://o.example.com/$1 map / http://kitchensink.example.com

remap.config examples map http://www.example.com/css http://css.example.com map http://www.example.com http://real.example.com reverse_map http://real.example.com http://www.example.com redirect http://example.com http://www.example.com regex_map http://(.*)\.example.com http://o.example.com/$1 map / http://kitchensink.example.com

remap.config examples map http://www.example.com/css http://css.example.com map http://www.example.com http://real.example.com reverse_map http://real.example.com http://www.example.com redirect http://example.com http://www.example.com regex_map http://(.*)\.example.com http://o.example.com/$1 map / http://kitchensink.example.com

remap.config examples map http://www.example.com/css http://css.example.com map http://www.example.com http://real.example.com reverse_map http://r.example.com http://www.example.com redirect http://example.com http://www.example.com regex_map http://(.*)\.example.com http://o.example.com/$1 map / http://kitchensink.example.com

remap.config examples map http://www.example.com/css http://css.example.com map http://www.example.com http://real.example.com reverse_map http://r.example.com http://www.example.com redirect http://example.com http://www.example.com regex_map http://(.*)\.example.com http://o.example.com/$1 map / http://kitchensink.example.com

Some interesting features RAM: Optional compression Various compression levels supported Very fast (virtually no overhead using the faster algo) RAM: Several cache eviction algorithms CLFUS algorithm avoids the classic problem on an LRU during scans Disk: Supports various block sizes (SSD) Disk: Can be tuned for various object sizes Disk: No file system overhead (RAW disks)

Future directions Release early, and often Full IPv6 support NPN, SNI and other SSL improvements Improved memory management, support debug features in e.g. jemalloc and tcmalloc Optimizations for SSD ( stacked caches) More focus on plugins, and plugin APIs Hopefully a real load balancer plugin!

Was this a huge waste of time, or? h4p://www.flickr.com/photos/simpologist/16734948/

A versatile tool h4p://www.flickr.com/photos/airosan/2232394342/ 41

Yes, it s fast, ridiculously fast 42

A vibrant community! The Apache Software Foundation http://www.apache.org/ 43

Artur Bergman tells us if we re not using SSD drives, we re wasting our lives.

Artur Bergman tells us if we re not using SSD drives, we re wasting our lives. I d say, if you are not using a caching proxy, you re wasting your SSDs!

46

Contact me 47

records.config for reverse proxy CONFIG proxy.config.http.server_port INT 80 CONFIG proxy.config.cache.ram_cache.size INT 1G CONFIG proxy.config.cache.ram_cache_cutoff INT 1M CONFIG proxy.config.reverse_proxy.enabled INT 1 CONFIG proxy.config.url_remap.remap_required INT 1 CONFIG proxy.config.url_remap.pristine_host_hdr INT 0 CONFIG proxy.config.http.negative_caching_enabled INT 1 CONFIG proxy.config.http.negative_caching_lifetime INT 120 CONFIG proxy.config.http.cache.ignore_client_cc_max_age INT 1 CONFIG proxy.config.http.normalize_ae_gzip INT 1

Four Horseman of Bad Performance Data copies Context Switches Memory allocation Lock contention Avoid these! http://pl.atyp.us/content/tech/servers.html

Disk cache: Cyclone