Apache Performance Tuning Part 2: Scaling Out Sander Temme.

Slides:



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

Apache Performance Tuning Part 2: Scaling Out Sander Temme.
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.
Clustering and load balancing with Apache 2.2 mod_proxy
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.
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.
1 Controlling Access to Your Web Content IS/CS 698 Min Song.
SERVER LOAD BALANCING Presented By : Priya Palanivelu.
Chris Shuster 4/29/2009 1Chris Shuster.  Application Servers ◦ Backend processing platform. ◦ Multiple platforms, operating system and architecture.
Lesson 1: Configuring Network Load Balancing
Nikolay Tomitov Technical Trainer SoftAcad.bg.  What are Amazon Web services (AWS) ?  What’s cool when developing with AWS ?  Architecture of AWS 
Load Sharing and Balancing - Saravanan Mathialagan Masters in Computer Science Georgia State University.
IST346:  Web Services. Today’s Agenda  Learn the basics of how the Web works  Understand various web service architectures  Address scaling, security,
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.
Understanding and Managing WebSphere V5
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.
How WebMD Maintains Operational Flexibility with NoSQL Rajeev Borborah, Sr. Director, Engineering Matt Wilson – Director, Production Engineering – Consumer.
22-Aug-15 | 1 |1 | Help! I need more servers! What do I do? Scaling a PHP application.
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.
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.
The Power of mod_proxy Proxy servers, load balancers and how to implement with Apache HTTP Server.
1 Distributed Systems : Server Load Balancing Dr. Sunny Jeong. Mr. Colin Zhang With Thanks to Prof. G. Coulouris,
Submitted by: Shailendra Kumar Sharma 06EYTCS049.
Apache Performance Tuning Part 2: Scaling Out Sander Temme.
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.
DotSlash – or how to deal with 15 minutes of fame Weibin Zhao Henning Schulzrinne Columbia University CATT/WICAT Annual Research Review November 14, 2003.
JBOSS 入门 行癫. Agenda  JBOSS Install & Monitor  Naming On JBOSS  Web Application  Security On JBOSS  Clustering On JBOSS  Application Deploy for JBOSS.
70-412: Configuring Advanced Windows Server 2012 services
Data Communications and Networks Chapter 9 – Distributed Systems ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
Cloud Computing Computer Science Innovations, LLC.
Copyright 2007, Information Builders. Slide 1 Performance, Scalability, and Reliability With iWay Software Mark Nesson June, 2008.
1 CEG 2400 Fall 2012 Network Servers. 2 Network Servers Critical Network servers – Contain redundant components Power supplies Fans Memory CPU Hard Drives.
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.
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.
Fault – Tolerant Distributed Multimedia Streaming Web Application By Nirvan Sagar – Srishti Ganjoo – Syed Shahbaaz Safir
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.
High Availability Linux (HA Linux)
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) –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 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: 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)

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!

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

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 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 Scalable Internet Architectures (Training) Apache Performance Tuning Part 1: Scaling Up Apache and CNN.com 2.0: HTTP Server as Glue Monitoring your Data Center using Apache and Ganglia Advanced Reverse Proxy Load Balancing in Apache HTTP Server 2.2

Current Version

Thank You