Apache Performance Tuning Part 2: Scaling Out Sander Temme.

Slides:



Advertisements
Similar presentations
Apache Performance Tuning Part 2: Scaling Out Sander Temme.
Advertisements

ITIS 3110 Jason Watson. Replication methods o Primary/Backup o Master/Slave o Multi-master Load-balancing methods o DNS Round-Robin o Reverse Proxy.
SQL Server 2000 Clustering Dave Fackler. Agenda Windows 2000 Clustering SQL Server 2000 Clustering Implementation Tips.
June 23rd, 2009Inflectra Proprietary InformationPage: 1 SpiraTest/Plan/Team Deployment Considerations How to deploy for high-availability and strategies.
Cold Fusion High Availability “Taking It To The Next Level” Presenter: Jason Baker, Digital North Date:
1 DNS. 2 BIND DNS –Resolve names to IP address –Resolve IP address to names (reverse DNS) BIND –Berkeley Internet Name Domain system Version 4 is still.
Apache Performance Tuning Part 2: Scaling Out Sander Temme.
Dr. Zahid Anwar. Simplified Architecture of Linux Cluster Simplified Architecture of a Single Computer Simplified architecture of an enterprise cluster.
Module 8: Concepts of a Network Load Balancing Cluster
Load Balance of Tomcat with Apache by George Fu, UCCS CS 526 Semester Project Spring 2009.
Web Servers How do our requests for resources on the Internet get handled? Can they be located anywhere? Global?
1 Controlling Access to Your Web Content IS/CS 698 Min Song.
Chris Shuster 4/29/2009 1Chris Shuster.  Application Servers ◦ Backend processing platform. ◦ Multiple platforms, operating system and architecture.
Lesson 1: Configuring Network Load Balancing
Load Sharing and Balancing - Saravanan Mathialagan Masters in Computer Science Georgia State University.
Presented by Jacob Wilson SharePoint Practice Lead Bross Group 1.
11 SERVER CLUSTERING Chapter 6. Chapter 6: SERVER CLUSTERING2 OVERVIEW  List the types of server clusters.  Determine which type of cluster to use for.
Copyright © 2002 Wensong Zhang. Page 1 Free Software Symposium 2002 Linux Virtual Server: Linux Server Clusters for Scalable Network Services Wensong Zhang.
MCTS Guide to Microsoft Windows Server 2008 Applications Infrastructure Configuration (Exam # ) Chapter Ten Configuring Windows Server 2008 for High.
Microsoft Load Balancing and Clustering. Outline Introduction Load balancing Clustering.
Shoehorning Apache Onto Your Box System Sizing Tips Sander Temme.
Fronting Tomcat with Apache Httpd Mladen Turk Red Hat, Inc.
10/02/2004ELFms meeting1 Linux Virtual Server Miroslav Siket FIO-FS.
Additional SugarCRM details for complete, functional, and portable deployment.
1 Oracle 9i AS Availability and Scalability Margaret H. Mei Senior Product Manager, ST.
1 Distributed DNS best practices to build redundant, reliable architecture By Ladislav Vobr SE/SOP/I&eS, Etisalat.
Server Load Balancing. Introduction Why is load balancing of servers needed? If there is only one web server responding to all the incoming HTTP requests.
Deploying on Windows (it’s actually possible!) Brian Hogan New Auburn Personal Computer Services LLC Contents copyright © 2007 Brian P. Hogan. Do not reproduce.
Module 13: Network Load Balancing Fundamentals. Server Availability and Scalability Overview Windows Network Load Balancing Configuring Windows Network.
1 Shoehorning Apache Onto Your Box System Sizing Tips Sander Temme.
Windows 2000 Advanced Server and Clustering Prepared by: Tetsu Nagayama Russ Smith Dale Pena.
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network Chapter 7: Domain Name System.
APEX power! Alan Arentsen brought to you by GlassFish.
INSTALLING MICROSOFT EXCHANGE SERVER 2003 CLUSTERS AND FRONT-END AND BACK ‑ END SERVERS Chapter 4.
Shoehorning Apache Onto Your Box System Sizing tips Sander Temme.
Windows Azure Conference 2014 Deploy your Java workloads on Windows Azure.
INTRODUCTION TO SERVERS & INSTALLATION OF WINDOWS SERVER 2008 R2 Network Administration and Maintenance.
Apache Performance Tuning Part 2: Scaling Out Sander Temme.
Module 11: Implementing ISA Server 2004 Enterprise Edition.
The mod_proxy_balancer Cookbook A module overview with practical solutions to common problems Daniel Ruggeri.
Server Performance, Scaling, Reliability and Configuration Norman White.
11 CLUSTERING AND AVAILABILITY Chapter 11. Chapter 11: CLUSTERING AND AVAILABILITY2 OVERVIEW  Describe the clustering capabilities of Microsoft Windows.
DYNAMIC LOAD BALANCING ON WEB-SERVER SYSTEMS by Valeria Cardellini Michele Colajanni Philip S. Yu.
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 12: Planning and Implementing Server Availability and Scalability.
Windows Azure Conference 2014 LAMP on Windows Azure.
Clustering Servers Chapter Seven. Exam Objectives in this Chapter:  Plan services for high availability Plan a high availability solution that uses clustering.
© 2002 Global Knowledge Network, Inc. All rights reserved. Windows Server 2003 MCSA and MCSE Upgrade Clustering Servers.
70-412: Configuring Advanced Windows Server 2012 services
Linux Operations and Administration
NETWORK LOAD BALANCING (NLB) Microsoft Windows Server 2003 By Mohammad Alsawwaf ITEC452 Supervised By: Dr. Lee RADFORD UNIVERSITY.
Data Communications and Networks Chapter 9 – Distributed Systems ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
Copyright 2007, Information Builders. Slide 1 Performance, Scalability, and Reliability With iWay Software Mark Nesson June, 2008.
JBOSS Online Training. Introduction to JBOSS Red Hat JBoss Middleware leverages community powered enlighten innovation and standalone open source application.
Red Hat Enterprise Linux Presenter name Title, Red Hat Date.
SQL Server High Availability Introduction to SQL Server high availability solutions.
Configuring SQL Server for a successful SharePoint Server Deployment Haaron Gonzalez Solution Architect & Consultant Microsoft MVP SharePoint Server
Cofax Scalability Document Version Scaling Cofax in General The scalability of Cofax is directly related to the system software, hardware and network.
Andrew Lahiff HEP SYSMAN June 2016 Hiding infrastructure problems from users: load balancers at the RAL Tier-1 1.
1 Super/Ultra-Basic Load-Balancing Introduction For AFNOG 2012 Joel Jaeggli.
High Availability Clusters in Linux Sulamita Garcia EDS Unix Specialist
1 Distributed DNS best practices to build redundant, reliable & scalable DNS architecture By Ladislav Vobr SE/SOP/I&eS Etisalat, UAE.
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 12: Planning and Implementing Server Availability and Scalability.
Understanding Solutions
REPLICATION & LOAD BALANCING
Apache web server Quick overview.
Shoehorning Apache Onto Your Box
Network Load Balancing
Apache Performance Tuning
SpiraTest/Plan/Team Deployment Considerations
Apache Performance Tuning
Presentation transcript:

Apache Performance Tuning Part 2: Scaling Out Sander Temme

Agenda Introduction Redundancy in Hardware Building Out: Separate Tiers Building Out: Load Balancing Putting it All Together 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?

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

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

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) –Whackamole 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 IN SOA ns.scalingout.org. sctemme.scalingout.org. ( ; Serial ; refresh (1 day) 7200 ; retry (2 hours) ; expire (10 days) ) ; minimum (1 day) scalingout.org. IN NS bagheera.scalingout.org. gw IN A bagheera IN A ;... mail IN CNAME bagheera ns IN CNAME bagheera www IN A IN A IN A

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: Whackamole 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)

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

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

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 / ProxyPassReverse / BalancerMember BalancerMember

Example: Tomcat, mod_jk Apache + mod_jk Multiple Tomcat servers Balancer Worker

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: jvmRoute must match jk worker name!

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 element in server.xml Put empty element in element in web.xml

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 Client Internet Read-only Write-only

Monitoring the Farm

Conference Roadmap Apache Web Server Cookbook Apache Performance Tuning Part 1: Scaling Up Fronting Apache Tomcat with Apache Httpd Apache MINA - The high-performance protocol construction toolkit

Current Version

Thank You