SlideShare a Scribd company logo
Apache Performance Tuning

        Part 2: Scaling Out

  Sander Temme <sander@temme.net>
Agenda
•   Introduction
•   Redundancy in Hardware
•   Building Out: Separate Tiers
•   Building Out: Load Balancing
•   Caching Content
•   Conclusion
Introduction
• Why do This?
  – Scalability (Oh my gosh, I’m so popular!)
  – Reliability (We need five nines!)
• Why NOT do This?
  – It costs money
Redundancy in Hardware
• Moving Parts Break
  –   Hard Disks
  –   Power Supplies
  –   Hard Disks
  –   Fans
  –   Hard Disks
• Buy High Quality Disks
  – Refurbished, OEM, Brand Name
  – Which has longer warranty?
  – Which is more reliable?

Recommended for you

Tomcat next
Tomcat nextTomcat next
Tomcat next

The document provides an overview and progress report on Apache Tomcat NEXT. It discusses new features required by specifications like Java EE 8 and Servlet 4.0. Key changes include full support for HTTP/2, TLS improvements like SNI and multiple certificates, and removal of outdated features. Internal changes improved connectors and refactored WebSocket handling. The rationale for Apache Tomcat 8.5 was to provide new features sooner than waiting for Java EE 8's delayed release. HTTP/2, OpenSSL encryption, and TLS virtual hosting are highlighted.

tomcatjava opensslhttp2
How to monitor and manage Apache Tomcat
How to monitor and manage Apache TomcatHow to monitor and manage Apache Tomcat
How to monitor and manage Apache Tomcat

The document describes how to monitor Apache Tomcat application instances using Verax NMS monitoring software. It includes adding the Tomcat application to the device inventory in Verax NMS, configuring availability sensors and performance counters, and an overview of the features provided by the Verax NMS Apache Tomcat plugin for monitoring things like general information, applications, request processors, connectors and thread pools.

apache tomcat monitoringapache tomcatapplication monitoring
Fastest Servlets in the West
Fastest Servlets in the WestFastest Servlets in the West
Fastest Servlets in the West

The venerable Servlet Container still has some performance tricks up its sleeve - this talk will demonstrate Apache Tomcat's stability under high load, describe some do's (and some don'ts!), explain how to performance test a Servlet-based application, troubleshoot and tune the container and your application and compare the performance characteristics of the different Tomcat connectors. The presenters will share their combined experience supporting real Tomcat applications for over 20 years and show how a few small changes can make a big, big difference.

apache tomcatjavatomcat
Server Configuration
• Mirror those Disks
  – Install the RAID utility
  – Have it warn you
  – RAID is no good if you don’t learn of
    failures!
• Redundant Power Supplies
  – On different circuits
Scaling Vertically
Scaling Vertically
• Move Services to Other Hosts
• Pros:
  – Less resource contention
  – Specialized hardware
  – Scale out tiers individually
• Cons:
  – Development/Deployment harder
  – More hosts to manage
Scaling Horizontally

Recommended for you

Apache TomEE - Tomcat with a kick
Apache TomEE  - Tomcat with a kickApache TomEE  - Tomcat with a kick
Apache TomEE - Tomcat with a kick

An OpenEJB presentation on "Apache TomEE" TomEE aims to provide a fully certified Java EE 6 Web profile stack based on Tomcat, allowing you to use Java EE features in your lightweight Tomcat applications. A stack that's assembled and maintained by the Apache OpenEJB project

tomeeejbopenejb
[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo

In this talk, Damien describes the infrastructure Nuxeo has built around Docker containers, which is mainly based on CoreOS and Docker, and how it provides a way to generically run applications not only on a single host, but across a whole cluster of hosts. The resulting architecture can be used to implement a PaaS approach for any application.

Performance all teh things
Performance all teh thingsPerformance all teh things
Performance all teh things

This document discusses benchmarking Drupal performance and optimizing it with APC caching. It finds that a plain HTML page serves 1000 requests 32 times faster than Drupal. Installing the APC opcode cache speeds up Drupal significantly by caching compiled PHP files in memory. The document provides instructions for installing APC on Linux and verifying its setup. Other caching techniques like Varnish, Memcache and database tuning are also mentioned as ways to improve Drupal performance.

drupalesiperformance
Scaling Horizontally
•   Multiple servers per tier
•   All receive requests
•   All serve same content
•   Some arbitration scheme
Load Balancing Schemes
• DNS Tricks
• Peer Server Pools
  – Network Load Balancing (Win2k3)
  – Wackamole
• Load Balancing Appliance
  – Box from F5, Juniper, Cisco, Foundry, …
  – Linux Virtual Server
DNS Round-Robin
• Easy!
• Multiple A Records in DNS Zone File
• Not Smart:
  – DNS Lookups are cached
  – Load on Server
  – Server Outage
Example Zone File
scalingout.org. 86400   IN SOA ns.scalingout.org. sctemme.scalingout.org. (
           2006051401   ; Serial
           86400        ; refresh (1 day)
           7200         ; retry (2 hours)
           8640000      ; expire (10 days)
           86400 )      ; minimum (1 day)

scalingout.org.        IN       NS      bagheera.scalingout.org.

gw                IN        A        10.11.0.1
bagheera          IN        A        10.11.0.2

; ...

mail              IN        CNAME    bagheera
ns                IN        CNAME    bagheera

www               IN        A        10.11.0.113
                  IN        A        10.11.0.114
                  IN        A        10.11.0.115

Recommended for you

CRX2Oak - all the secrets of repository migration
CRX2Oak - all the secrets of repository migrationCRX2Oak - all the secrets of repository migration
CRX2Oak - all the secrets of repository migration

CRX2Oak is an official migration tool that allows to migrate data between different repository types. The most common use-case is upgrading an old, CQ 5.x repository to the AEM 6.x format. This session will cover the basic CRX2Oak usage, describe it's more advanced options and also share some real-world cases of large-scale (hundreds of GBs) data migration cases.

aem6 adobe crx2oak evolve 2016
Aem maintenance
Aem maintenanceAem maintenance
Aem maintenance

The document discusses key maintenance activities for an AEM implementation including backup, compaction, purging, cloning, and other approaches. It provides details on planning and executing online and offline backups, online and offline compaction, version purging, workflow purging, audit log purging, and cloning publish instances. The document emphasizes the importance of backups, compaction, and purging to optimize storage usage, improve performance, and maintain an optimal AEM instance.

compcationmaintenancepurging
Auxiliary : Tomcat
Auxiliary : TomcatAuxiliary : Tomcat
Auxiliary : Tomcat

Tomcat is an open source servlet container that is used to run Java servlets and JSP pages to build web applications. It originated from a combination of the JServ and Sun Microsystems servlet engines. Tomcat adheres closely to Java servlet and JSP specifications, is highly customizable, and provides features like automatic reloading for development and thread pooling for production performance. It is installed by extracting binary files, setting environment variables, and can be started or stopped using scripts.

apache
Peer-based: NLB
• Windows 2000 Server Enterprise Ed.,
  Windows Server 2003
• Up to 32 hosts in cluster
• All hosts assume cluster IP, MAC
• NLB makes LB decision
  – Only one host gets to answer TCP
    handshake
• Should be application independent
Peer-based: Wackamole
• High Availability Solution
• When Host Fails
  – Other hosts take over its IP addresses
  – Distribute IP addresses among cluster
  – Every IP address reliably available
• No Load Balancing!
  – Use with RR DNS (or something)

      http://www.backhand.org/wackamole/
Load Balancing Device




Client      Internet
Load Balancing
• One Load Balancer
• Many Web Servers
• Choice of Balancing Schemes
  – Round-robin, Least Used, …
• Reliability
  – Heartbeats, unavailable servers don’t
    receive requests
• Feature War

Recommended for you

Tomcat configuration
Tomcat configurationTomcat configuration
Tomcat configuration

Tomcat is an open-source Java Servlet container developed by the Apache Software Foundation that implements the Java Servlet and JavaServer Pages specifications from Sun Microsystems. It is written in Java, so it is platform independent. Tomcat requires setting the JAVA_HOME and CATALINA_HOME environment variables and extracting the source files to a directory before starting the server on port 8080 and accessing the welcome page. The server.xml file can be configured to serve files from a custom webapps directory.

Apache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip HanikApache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip Hanik

Upgrading to Apache Tomcat 7 covers the key changes in upgrading from older versions of Tomcat to version 7, including specification changes to support Servlet 3.0 and new features like asynchronous servlets and annotations. It outlines new management, performance, security, deployment, and embedding capabilities in Tomcat 7. The presentation also provides an overview of WebSocket support in Tomcat 7 and future plans, as well as useful resources for more information.

tomcat7jug argentina
Tomcat New Evolution
Tomcat New EvolutionTomcat New Evolution
Tomcat New Evolution

Tomcat New Evolution discusses the new features introduced in Tomcat 6 and 7. Some key highlights include: - Tomcat 6 introduced features like memory leak prevention, CSRF protection, session fixation protection, NIO connector, Comet support, logging improvements, web services support, and clustering. - Tomcat 7 features included externalizing static resources, WebSocket support, easier embedded usage, and asynchronous logging. - Both versions aimed to improve performance, security, and scalability through these new capabilities. Tomcat continues evolving to support newer standards and address common issues.

tomcatj2eetutorial
Linux Virtual Server
• Free, Open Source, etc.
• IP Virtual Server module in kernel
• Lots of auxiliary modules
  – Like a box of Legos
  – May come with Your Distribution
• Do It Yourself

    http://www.linuxvirtualserver.org/
Example: mod_proxy_balancer
• New in Apache HTTP Server 2.2
• Part of mod_proxy
• Two Load Balancing Methods
  – By number of requests
  – By number of bytes
• Detects failed backends
Apache Configuration
Listen 80
LogLevel debug
TransferLog logs/access_log

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so

ProxyPass / balancer://mycluster/
ProxyPassReverse / http://1.2.3.4:80
ProxyPassReverse / http://1.2.3.5:80

<Proxy balancer://mycluster>
  BalancerMember http://1.2.3.4:80
  BalancerMember http://1.2.3.5:80
</Proxy>
Example: Tomcat, mod_jk
• Apache + mod_jk
• Multiple Tomcat servers
• Balancer Worker

Recommended for you

Introduction of Tomcat
Introduction of TomcatIntroduction of Tomcat
Introduction of Tomcat

This document provides an introduction and overview of the Apache Tomcat application server. It defines what an application server is and explains that Apache Tomcat is an open source implementation of Java Servlet, JSP, JSTL, and WebSocket technologies. It describes the key components of Tomcat, including Catalina, Coyote, Jasper, and how they enable Tomcat to function as a web and application server. It also provides basic installation instructions for setting up Tomcat on an Amazon EC2 instance.

Java troubleshooting thread dump
Java troubleshooting thread dumpJava troubleshooting thread dump
Java troubleshooting thread dump

This document discusses thread analysis and provides information on common thread problems, thread types, and how to analyze thread dumps. Some key points: - Common thread problems include app servers freezing, becoming unresponsive, crashing, or having high CPU usage. GC thrashing, slow performance, and hung threads are also issues. - A thread dump shows the state, stack trace and other details of active threads in the JVM. This can help identify problems like infinite loops, blocking/contention, or heavy GC. - Thread contention occurs when one thread waits for a lock held by another. Deadlock is a special form where threads are cyclically waiting on each other. - Analyzing thread dumps involves

javajvmperformance
ProxySQL - High Performance and HA Proxy for MySQL
ProxySQL - High Performance and HA Proxy for MySQLProxySQL - High Performance and HA Proxy for MySQL
ProxySQL - High Performance and HA Proxy for MySQL

High Availability proxy designed to solve real issues of MySQL setups from small to very large production environments. Presentation at Percona Live Amsterdam 2015

database mysql proxy ha performance
Apache Configuration
LoadModule jk_module /Volumes/Files/asf/httpd-r415210w/modules/mod_jk.so
JKMount /servlets-examples/* loadbalancer
JKMount /*.jsp loadbalancer
JkMount /jkmanager/* jkstatus
JKLogFile logs/jk_log
JKLogLevel debug
JKWorkerProperty worker.list=loadbalancer,jkstatus
JKWorkerProperty worker.tc1.port=15109
JKWorkerProperty worker.tc1.host=localhost
JKWorkerProperty worker.tc1.type=ajp13
JKWorkerProperty worker.tc1.lbfactor=1
JKWorkerProperty worker.tc2.port=15209
JKWorkerProperty worker.tc2.host=localhost
JKWorkerProperty worker.tc2.type=ajp13
JKWorkerProperty worker.tc2.lbfactor=1
JKWorkerProperty worker.tc3.port=15309
JKWorkerProperty worker.tc3.host=localhost
JKWorkerProperty worker.tc3.type=ajp13
JKWorkerProperty worker.tc3.lbfactor=1
JKWorkerProperty worker.loadbalancer.type=lb
JKWorkerProperty worker.loadbalancer.balance_workers=tc1, tc2, tc3
JKWorkerProperty worker.jkstatus.type=status
Tomcat Configuration
   • Put same content on all Tomcats
   • Edit conf/server.xml:
<Engine name="Catalina" defaultHost="localhost" jvmRoute="tc1">


   • jvmRoute must match jk worker
     name!
Problem: Session State
• HTTP is Stateless
• Apps use Sessions
  – Cookies
  – URL Encoding
• Session created on single server
  – Broken by Load Balancing
  – PHP: sessions stored on disk
Solutions: Session State
• “Sticky” routing on Load Balancer
• Store State in DB
• Put benign State in Cookie
  – But don’t trust the client too much
• Replicate Sessions on Back-end

Recommended for you

What's New in WildFly 9?
What's New in WildFly 9?What's New in WildFly 9?
What's New in WildFly 9?

This session covers new improvements that will be introduced in WildFly 9: • Wildfly-core will be extracted from the codebase and the ability to assemble a server on top of it will be introduced. WildFly 9 will be provided in two versions: Wildfly Web and Wildfly Full but users will be able to create their custom packaging of WildFly. • Users will be able to shutdown the application server in a graceful manner - after the shutdown command is executed server will reject new requests and allow existing requests to finish before it shuts down. • Support for HTTP/2, a new version of HTTP protocol based on SPDY, will be introduced. • Users will be able to use WildFly as a load balancer. Consequently, it will be possible to manage the balancer with the same tools that are used to manage the rest of the domain. What is more, users will be able to use more efficient protocols, such as HTTP/2, for communication between the balancer and backend servers. • An OpenShift cartridge, which will enable users to use WildFly 9 in cloud environment, will be provided. • WildFly 9 will use OpenJDK ORB library instead of JacORB.

jboss eapred hatjava ee
are available here
are available hereare available here
are available here

This document summarizes an instructor-led discussion on advanced Apache topics including virtual hosting, setting up name-based and IP-based virtual hosts, enabling server-side includes, and enabling CGI (Common Gateway Interface) scripts. Key points covered include configuring Apache for virtual hosting using the VirtualHost directive, enabling CGI scripts through ScriptAlias, Options ExecCGI, and AddHandler directives, and examples of simple CGI scripts.

host website
Performance out
Performance outPerformance out
Performance out

This document discusses techniques for scaling out Apache web servers to improve performance and reliability. It covers adding redundancy with hardware components like RAID disk mirroring and redundant power supplies. It also discusses scaling out the application tier vertically by moving services to separate hosts, and horizontally by load balancing traffic across multiple servers. Load balancing can be done with techniques like DNS round robin, network load balancers, and load balancing appliances. The document also addresses session state management across servers and caching static content to improve performance.

Tomcat Session Replication
• Share HttpSession objects across
  instances
• One instance dies, session lives on
• Apache will route requests to other
  instance
• Uses IP Multicast
Session Replication Config
• Uncomment <Cluster> element in
  server.xml
• Put empty <distributable /> element in
  <web-app> element in web.xml
Caching Content
• Dynamic Content is Expensive
• Static Content Relatively Cheap
• Several Approaches:
  – Dynamic caching
  – Pre-rendering popular pages
    (index.rss…)




                                    27
mod_cache Configuration
<IfModule mod_cache.c>
<IfModule mod_disk_cache.c>

      CacheRoot /raid1/cacheroot
      CacheEnable disk /

      # A page modified 100 min. ago will expire in 10 min.
      CacheLastModifiedFactor .1
      # Always check again after 6 hours
      CacheMaxExpire 21600
</IfModule>

</IfModule>




                                                        28

Recommended for you

Performance out
Performance outPerformance out
Performance out

This document discusses techniques for scaling out Apache web servers to improve performance and reliability. It covers adding redundancy with hardware components like RAID disk mirroring and redundant power supplies. It also discusses scaling out the application tier vertically by moving services to separate hosts, and horizontally by load balancing traffic across multiple servers. Load balancing can be done with techniques like DNS round robin, network load balancers, and load balancing appliances. The document also addresses session state management across servers and caching static content to improve performance.

Performance_Out.pptx
Performance_Out.pptxPerformance_Out.pptx
Performance_Out.pptx

This document discusses techniques for scaling out Apache web servers to improve performance and reliability. It covers adding redundancy with hardware components like RAID disk mirroring and redundant power supplies. It also discusses scaling out the application tier vertically by moving services to separate hosts, and horizontally by load balancing traffic across multiple servers. Load balancing can be done with techniques like DNS round robin, network load balancers, and load balancing appliances. The document also addresses session state management across servers and caching static content to improve performance.

2 7
2 72 7
2 7

This document discusses techniques for scaling out Apache web servers to improve performance and reliability. It covers adding redundancy with hardware components like RAID disk mirroring and redundant power supplies. It also discusses scaling out the application tier vertically by moving services to separate hosts, and horizontally by load balancing traffic across multiple servers. Load balancing can be done with techniques like DNS round robin, network load balancers, and load balancing appliances. The document also addresses session state management across servers and caching static content to improve performance.

Make Popular Pages Static
• RSS Feeds
• Popular catalog queries
• … (Check your access log)




                              29
Static Page Substitution
<Directory "/home/sctemme/inst/blog/httpd/htdocs">

    Options +Indexes

    Order allow,deny
    Allow from all

    RewriteEngine on

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /cgi-bin/blosxom.cgi/$1 [L,QSA]

</Directory>




                                                     30
Tuning the Database Tier
• Not my area (sorry)
• Give Money to Oracle Consultants
  – (or MySQL) (or …)
• Tip: Separate Read and Write
  Operations
  – Replicate from Write db to Read db
  – Read db data slightly stale
    • Does it matter?
Putting it All Together
                                Read-only




Internet




Client                         Write-only

Recommended for you

Performance out
Performance outPerformance out
Performance out

This document discusses techniques for scaling out Apache web servers to improve performance and reliability. It covers adding redundancy with hardware components like RAID disk mirroring and redundant power supplies. It also discusses scaling out the application tier vertically by moving services to separate hosts, and horizontally by load balancing traffic across multiple servers. Load balancing can be done with techniques like DNS round robin, network load balancers, and load balancing appliances. The document also addresses session state management across servers and caching static content to improve performance.

Performance out
Performance outPerformance out
Performance out

This document discusses techniques for scaling out Apache web servers to improve performance and reliability. It covers adding redundancy with hardware components like RAID disk mirroring and redundant power supplies. It also discusses scaling out the application tier vertically by moving services to separate hosts, and horizontally by load balancing traffic across multiple servers. Load balancing can be done with techniques like DNS round robin, network load balancers, and load balancing appliances. The document also addresses session state management across servers and caching static content to improve performance.

Performance out
Performance outPerformance out
Performance out

This document discusses techniques for scaling out Apache web servers to improve performance and reliability. It covers adding redundancy with hardware components like RAID disk mirroring and redundant power supplies. It also discusses scaling out the application tier vertically by moving services to separate hosts, and horizontally by load balancing traffic across multiple servers. Load balancing can be done with techniques like DNS round robin, network load balancers, and load balancing appliances. The document also addresses session state management across servers and caching static content to improve performance.

Monitoring the Farm
• Monitor for outages
  – More boxes, more failure
  – HA can mask failures
• Monitor for performance
  – Utilization
  – Trends
Monitoring Solutions
• Nagios
  – Check services, hosts for outage
  – Highly configurable, extendable
  – Worth your time investment
• Ganglia
  – Monitor for performance
  – See Brad Nicholes’s session
Monitoring Caveats
• Takes Time, Effort
  – Highly flexible products
• You can’t fix it
  – If you don’t know it’s broken
• You can’t tune it
  – If you don’t know the bottlenecks
Conference Roadmap
• Monitoring 2.0 - Zenoss, the next level of IT
  management (Training)
• Apache Performance Tuning Part 1:
  Scaling Up
• Load-balancing with Apache HTTPD 2.2
  and later
• Scaling the download infrastructure with
  your success
• Break My Site

Recommended for you

Performance out
Performance outPerformance out
Performance out

This document discusses techniques for scaling out Apache web servers to improve performance and reliability. It covers adding redundancy with hardware components like RAID disk mirroring and redundant power supplies. It also discusses scaling out the application tier vertically by moving services to separate hosts, and horizontally by load balancing traffic across multiple servers. Load balancing can be done with techniques like DNS round robin, network load balancers, and load balancing appliances. The document also addresses session state management across servers and caching static content to improve performance.

Performance out
Performance outPerformance out
Performance out

This document discusses techniques for scaling out Apache web servers to improve performance and reliability. It covers adding redundancy with hardware components like RAID disk mirroring and redundant power supplies. It also discusses scaling out the application tier vertically by moving services to separate hosts, and horizontally by load balancing traffic across multiple servers. Load balancing can be done with techniques like DNS round robin, network load balancers, and load balancing appliances. The document also addresses session state management across servers and caching static content to improve performance.

apache
title
titletitle
title

This document discusses techniques for scaling out Apache web servers to improve performance and reliability. It covers adding redundancy with hardware components like RAID disk mirroring and redundant power supplies. It also discusses scaling out the application tier vertically by moving services to separate hosts, and horizontally by load balancing traffic across multiple servers. Load balancing can be done with techniques like DNS round robin, network load balancers, and load balancing appliances. The document also addresses session state management across servers and caching static content to improve performance.

Current Version

http://people.apache.org/~sctemme/ApconEU2008/
Thank You

More Related Content

What's hot

Tomcat Server
Tomcat ServerTomcat Server
Tomcat Server
Anirban Majumdar
 
Apache Tomcat 8 Application Server
Apache Tomcat 8 Application ServerApache Tomcat 8 Application Server
Apache Tomcat 8 Application Server
mohamedmoharam
 
Introduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 PresentationIntroduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 Presentation
Tomcat Expert
 
Tomcat next
Tomcat nextTomcat next
Tomcat next
Jean-Frederic Clere
 
How to monitor and manage Apache Tomcat
How to monitor and manage Apache TomcatHow to monitor and manage Apache Tomcat
How to monitor and manage Apache Tomcat
Egnyte
 
Fastest Servlets in the West
Fastest Servlets in the WestFastest Servlets in the West
Fastest Servlets in the West
Stuart (Pid) Williams
 
Apache TomEE - Tomcat with a kick
Apache TomEE  - Tomcat with a kickApache TomEE  - Tomcat with a kick
Apache TomEE - Tomcat with a kick
Vishwanath Krishnamurthi
 
[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo
Nuxeo
 
Performance all teh things
Performance all teh thingsPerformance all teh things
Performance all teh things
Marcus Deglos
 
CRX2Oak - all the secrets of repository migration
CRX2Oak - all the secrets of repository migrationCRX2Oak - all the secrets of repository migration
CRX2Oak - all the secrets of repository migration
Tomasz Rękawek
 
Aem maintenance
Aem maintenanceAem maintenance
Aem maintenance
Ashokkumar T A
 
Auxiliary : Tomcat
Auxiliary : TomcatAuxiliary : Tomcat
Auxiliary : Tomcat
webhostingguy
 
Tomcat configuration
Tomcat configurationTomcat configuration
Tomcat configuration
Dima Gomaa
 
Apache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip HanikApache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip Hanik
Edgar Espina
 
Tomcat New Evolution
Tomcat New EvolutionTomcat New Evolution
Tomcat New Evolution
Allan Huang
 
Introduction of Tomcat
Introduction of TomcatIntroduction of Tomcat
Introduction of Tomcat
Debashis Nath
 
Java troubleshooting thread dump
Java troubleshooting thread dumpJava troubleshooting thread dump
Java troubleshooting thread dump
ejlp12
 
ProxySQL - High Performance and HA Proxy for MySQL
ProxySQL - High Performance and HA Proxy for MySQLProxySQL - High Performance and HA Proxy for MySQL
ProxySQL - High Performance and HA Proxy for MySQL
René Cannaò
 
What's New in WildFly 9?
What's New in WildFly 9?What's New in WildFly 9?
What's New in WildFly 9?
Virtual JBoss User Group
 
are available here
are available hereare available here
are available here
webhostingguy
 

What's hot (20)

Tomcat Server
Tomcat ServerTomcat Server
Tomcat Server
 
Apache Tomcat 8 Application Server
Apache Tomcat 8 Application ServerApache Tomcat 8 Application Server
Apache Tomcat 8 Application Server
 
Introduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 PresentationIntroduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 Presentation
 
Tomcat next
Tomcat nextTomcat next
Tomcat next
 
How to monitor and manage Apache Tomcat
How to monitor and manage Apache TomcatHow to monitor and manage Apache Tomcat
How to monitor and manage Apache Tomcat
 
Fastest Servlets in the West
Fastest Servlets in the WestFastest Servlets in the West
Fastest Servlets in the West
 
Apache TomEE - Tomcat with a kick
Apache TomEE  - Tomcat with a kickApache TomEE  - Tomcat with a kick
Apache TomEE - Tomcat with a kick
 
[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo
 
Performance all teh things
Performance all teh thingsPerformance all teh things
Performance all teh things
 
CRX2Oak - all the secrets of repository migration
CRX2Oak - all the secrets of repository migrationCRX2Oak - all the secrets of repository migration
CRX2Oak - all the secrets of repository migration
 
Aem maintenance
Aem maintenanceAem maintenance
Aem maintenance
 
Auxiliary : Tomcat
Auxiliary : TomcatAuxiliary : Tomcat
Auxiliary : Tomcat
 
Tomcat configuration
Tomcat configurationTomcat configuration
Tomcat configuration
 
Apache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip HanikApache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip Hanik
 
Tomcat New Evolution
Tomcat New EvolutionTomcat New Evolution
Tomcat New Evolution
 
Introduction of Tomcat
Introduction of TomcatIntroduction of Tomcat
Introduction of Tomcat
 
Java troubleshooting thread dump
Java troubleshooting thread dumpJava troubleshooting thread dump
Java troubleshooting thread dump
 
ProxySQL - High Performance and HA Proxy for MySQL
ProxySQL - High Performance and HA Proxy for MySQLProxySQL - High Performance and HA Proxy for MySQL
ProxySQL - High Performance and HA Proxy for MySQL
 
What's New in WildFly 9?
What's New in WildFly 9?What's New in WildFly 9?
What's New in WildFly 9?
 
are available here
are available hereare available here
are available here
 

Similar to Apache Performance Tuning: Scaling Out

Performance out
Performance outPerformance out
Performance out
Jack Huang
 
Performance out
Performance outPerformance out
Performance out
Jack Huang
 
Performance_Out.pptx
Performance_Out.pptxPerformance_Out.pptx
Performance_Out.pptx
sanjanabal
 
2 7
2 72 7
Performance out
Performance outPerformance out
Performance out
Sergey Bran
 
Performance out
Performance outPerformance out
Performance out
Jack Huang
 
Performance out
Performance outPerformance out
Performance out
Moderator_kursa
 
Performance out
Performance outPerformance out
Performance out
Jack Huang
 
Performance out
Performance outPerformance out
Performance out
test account
 
title
titletitle
title
michalsap
 
Performance out
Performance outPerformance out
Performance out
Jack Huang
 
Performance out
Performance outPerformance out
Performance out
Dragan Kolarevic
 
Performance out
Performance outPerformance out
Performance out
Andrea Martinez
 
Performance out
Performance outPerformance out
Performance out
Ramu Alagappan
 
Drupal performance
Drupal performanceDrupal performance
Drupal performance
Piyuesh Kumar
 
Pascal benois performance_troubleshooting-spsbe18
Pascal benois performance_troubleshooting-spsbe18Pascal benois performance_troubleshooting-spsbe18
Pascal benois performance_troubleshooting-spsbe18
BIWUG
 
Best And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM ConnectionsBest And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM Connections
LetsConnect
 
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld
 
VMworld 2014: Advanced SQL Server on vSphere Techniques and Best Practices
VMworld 2014: Advanced SQL Server on vSphere Techniques and Best PracticesVMworld 2014: Advanced SQL Server on vSphere Techniques and Best Practices
VMworld 2014: Advanced SQL Server on vSphere Techniques and Best Practices
VMworld
 
(ATS4-PLAT08) Server Pool Management
(ATS4-PLAT08) Server Pool Management(ATS4-PLAT08) Server Pool Management
(ATS4-PLAT08) Server Pool Management
BIOVIA
 

Similar to Apache Performance Tuning: Scaling Out (20)

Performance out
Performance outPerformance out
Performance out
 
Performance out
Performance outPerformance out
Performance out
 
Performance_Out.pptx
Performance_Out.pptxPerformance_Out.pptx
Performance_Out.pptx
 
2 7
2 72 7
2 7
 
Performance out
Performance outPerformance out
Performance out
 
Performance out
Performance outPerformance out
Performance out
 
Performance out
Performance outPerformance out
Performance out
 
Performance out
Performance outPerformance out
Performance out
 
Performance out
Performance outPerformance out
Performance out
 
title
titletitle
title
 
Performance out
Performance outPerformance out
Performance out
 
Performance out
Performance outPerformance out
Performance out
 
Performance out
Performance outPerformance out
Performance out
 
Performance out
Performance outPerformance out
Performance out
 
Drupal performance
Drupal performanceDrupal performance
Drupal performance
 
Pascal benois performance_troubleshooting-spsbe18
Pascal benois performance_troubleshooting-spsbe18Pascal benois performance_troubleshooting-spsbe18
Pascal benois performance_troubleshooting-spsbe18
 
Best And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM ConnectionsBest And Worst Practices Deploying IBM Connections
Best And Worst Practices Deploying IBM Connections
 
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
 
VMworld 2014: Advanced SQL Server on vSphere Techniques and Best Practices
VMworld 2014: Advanced SQL Server on vSphere Techniques and Best PracticesVMworld 2014: Advanced SQL Server on vSphere Techniques and Best Practices
VMworld 2014: Advanced SQL Server on vSphere Techniques and Best Practices
 
(ATS4-PLAT08) Server Pool Management
(ATS4-PLAT08) Server Pool Management(ATS4-PLAT08) Server Pool Management
(ATS4-PLAT08) Server Pool Management
 

Recently uploaded

Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
Vijayananda Mohire
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Erasmo Purificato
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
ScyllaDB
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
Safe Software
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
jackson110191
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
Larry Smarr
 
20240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 202420240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 2024
Matthew Sinclair
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
RaminGhanbari2
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
Mark Billinghurst
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
Toru Tamaki
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
shanthidl1
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
Stephanie Beckett
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
Awais Yaseen
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
Matthew Sinclair
 
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck
Lidia A.
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
KAMAL CHOUDHARY
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
Larry Smarr
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
huseindihon
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 

Recently uploaded (20)

Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
 
20240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 202420240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 2024
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
 
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 

Apache Performance Tuning: Scaling Out

  • 1. Apache Performance Tuning Part 2: Scaling Out Sander Temme <sander@temme.net>
  • 2. Agenda • Introduction • Redundancy in Hardware • Building Out: Separate Tiers • Building Out: Load Balancing • Caching Content • Conclusion
  • 3. Introduction • Why do This? – Scalability (Oh my gosh, I’m so popular!) – Reliability (We need five nines!) • Why NOT do This? – It costs money
  • 4. Redundancy in Hardware • Moving Parts Break – Hard Disks – Power Supplies – Hard Disks – Fans – Hard Disks • Buy High Quality Disks – Refurbished, OEM, Brand Name – Which has longer warranty? – Which is more reliable?
  • 5. Server Configuration • Mirror those Disks – Install the RAID utility – Have it warn you – RAID is no good if you don’t learn of failures! • Redundant Power Supplies – On different circuits
  • 7. Scaling Vertically • Move Services to Other Hosts • Pros: – Less resource contention – Specialized hardware – Scale out tiers individually • Cons: – Development/Deployment harder – More hosts to manage
  • 9. Scaling Horizontally • Multiple servers per tier • All receive requests • All serve same content • Some arbitration scheme
  • 10. Load Balancing Schemes • DNS Tricks • Peer Server Pools – Network Load Balancing (Win2k3) – Wackamole • Load Balancing Appliance – Box from F5, Juniper, Cisco, Foundry, … – Linux Virtual Server
  • 11. DNS Round-Robin • Easy! • Multiple A Records in DNS Zone File • Not Smart: – DNS Lookups are cached – Load on Server – Server Outage
  • 12. Example Zone File scalingout.org. 86400 IN SOA ns.scalingout.org. sctemme.scalingout.org. ( 2006051401 ; Serial 86400 ; refresh (1 day) 7200 ; retry (2 hours) 8640000 ; expire (10 days) 86400 ) ; minimum (1 day) scalingout.org. IN NS bagheera.scalingout.org. gw IN A 10.11.0.1 bagheera IN A 10.11.0.2 ; ... mail IN CNAME bagheera ns IN CNAME bagheera www IN A 10.11.0.113 IN A 10.11.0.114 IN A 10.11.0.115
  • 13. Peer-based: NLB • Windows 2000 Server Enterprise Ed., Windows Server 2003 • Up to 32 hosts in cluster • All hosts assume cluster IP, MAC • NLB makes LB decision – Only one host gets to answer TCP handshake • Should be application independent
  • 14. Peer-based: Wackamole • High Availability Solution • When Host Fails – Other hosts take over its IP addresses – Distribute IP addresses among cluster – Every IP address reliably available • No Load Balancing! – Use with RR DNS (or something) http://www.backhand.org/wackamole/
  • 16. Load Balancing • One Load Balancer • Many Web Servers • Choice of Balancing Schemes – Round-robin, Least Used, … • Reliability – Heartbeats, unavailable servers don’t receive requests • Feature War
  • 17. Linux Virtual Server • Free, Open Source, etc. • IP Virtual Server module in kernel • Lots of auxiliary modules – Like a box of Legos – May come with Your Distribution • Do It Yourself http://www.linuxvirtualserver.org/
  • 18. Example: mod_proxy_balancer • New in Apache HTTP Server 2.2 • Part of mod_proxy • Two Load Balancing Methods – By number of requests – By number of bytes • Detects failed backends
  • 19. Apache Configuration Listen 80 LogLevel debug TransferLog logs/access_log LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_balancer_module modules/mod_proxy_balancer.so ProxyPass / balancer://mycluster/ ProxyPassReverse / http://1.2.3.4:80 ProxyPassReverse / http://1.2.3.5:80 <Proxy balancer://mycluster> BalancerMember http://1.2.3.4:80 BalancerMember http://1.2.3.5:80 </Proxy>
  • 20. Example: Tomcat, mod_jk • Apache + mod_jk • Multiple Tomcat servers • Balancer Worker
  • 21. Apache Configuration LoadModule jk_module /Volumes/Files/asf/httpd-r415210w/modules/mod_jk.so JKMount /servlets-examples/* loadbalancer JKMount /*.jsp loadbalancer JkMount /jkmanager/* jkstatus JKLogFile logs/jk_log JKLogLevel debug JKWorkerProperty worker.list=loadbalancer,jkstatus JKWorkerProperty worker.tc1.port=15109 JKWorkerProperty worker.tc1.host=localhost JKWorkerProperty worker.tc1.type=ajp13 JKWorkerProperty worker.tc1.lbfactor=1 JKWorkerProperty worker.tc2.port=15209 JKWorkerProperty worker.tc2.host=localhost JKWorkerProperty worker.tc2.type=ajp13 JKWorkerProperty worker.tc2.lbfactor=1 JKWorkerProperty worker.tc3.port=15309 JKWorkerProperty worker.tc3.host=localhost JKWorkerProperty worker.tc3.type=ajp13 JKWorkerProperty worker.tc3.lbfactor=1 JKWorkerProperty worker.loadbalancer.type=lb JKWorkerProperty worker.loadbalancer.balance_workers=tc1, tc2, tc3 JKWorkerProperty worker.jkstatus.type=status
  • 22. Tomcat Configuration • Put same content on all Tomcats • Edit conf/server.xml: <Engine name="Catalina" defaultHost="localhost" jvmRoute="tc1"> • jvmRoute must match jk worker name!
  • 23. Problem: Session State • HTTP is Stateless • Apps use Sessions – Cookies – URL Encoding • Session created on single server – Broken by Load Balancing – PHP: sessions stored on disk
  • 24. Solutions: Session State • “Sticky” routing on Load Balancer • Store State in DB • Put benign State in Cookie – But don’t trust the client too much • Replicate Sessions on Back-end
  • 25. Tomcat Session Replication • Share HttpSession objects across instances • One instance dies, session lives on • Apache will route requests to other instance • Uses IP Multicast
  • 26. Session Replication Config • Uncomment <Cluster> element in server.xml • Put empty <distributable /> element in <web-app> element in web.xml
  • 27. Caching Content • Dynamic Content is Expensive • Static Content Relatively Cheap • Several Approaches: – Dynamic caching – Pre-rendering popular pages (index.rss…) 27
  • 28. mod_cache Configuration <IfModule mod_cache.c> <IfModule mod_disk_cache.c> CacheRoot /raid1/cacheroot CacheEnable disk / # A page modified 100 min. ago will expire in 10 min. CacheLastModifiedFactor .1 # Always check again after 6 hours CacheMaxExpire 21600 </IfModule> </IfModule> 28
  • 29. Make Popular Pages Static • RSS Feeds • Popular catalog queries • … (Check your access log) 29
  • 30. Static Page Substitution <Directory "/home/sctemme/inst/blog/httpd/htdocs"> Options +Indexes Order allow,deny Allow from all RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /cgi-bin/blosxom.cgi/$1 [L,QSA] </Directory> 30
  • 31. Tuning the Database Tier • Not my area (sorry) • Give Money to Oracle Consultants – (or MySQL) (or …) • Tip: Separate Read and Write Operations – Replicate from Write db to Read db – Read db data slightly stale • Does it matter?
  • 32. Putting it All Together Read-only Internet Client Write-only
  • 33. Monitoring the Farm • Monitor for outages – More boxes, more failure – HA can mask failures • Monitor for performance – Utilization – Trends
  • 34. Monitoring Solutions • Nagios – Check services, hosts for outage – Highly configurable, extendable – Worth your time investment • Ganglia – Monitor for performance – See Brad Nicholes’s session
  • 35. Monitoring Caveats • Takes Time, Effort – Highly flexible products • You can’t fix it – If you don’t know it’s broken • You can’t tune it – If you don’t know the bottlenecks
  • 36. Conference Roadmap • Monitoring 2.0 - Zenoss, the next level of IT management (Training) • Apache Performance Tuning Part 1: Scaling Up • Load-balancing with Apache HTTPD 2.2 and later • Scaling the download infrastructure with your success • Break My Site