Advanced ColdFusion 4.0 Application Development - 3 - Server Clustering Using Bright Tiger



Similar documents
Setting Up Your Internet Connection

Chapter 3: JavaScript in Action Page 1 of 10. How to practice reading and writing JavaScript on a Web page

NCH Software BroadCam Video Streaming Server

Teach yourself Android application development - Part I: Creating Android products

Chapter 3: e-business Integration Patterns

Avaya Remote Feature Activation (RFA) User Guide

NCH Software Express Accounts Accounting Software

SNMP Reference Guide for Avaya Communication Manager


Fast Robust Hashing. ) [7] will be re-mapped (and therefore discarded), due to the load-balancing property of hashing.

NCH Software MoneyLine

NCH Software FlexiServer

TCP/IP Gateways and Firewalls

Australian Bureau of Statistics Management of Business Providers

Bite-Size Steps to ITIL Success

Teamwork. Abstract. 2.1 Overview

Art of Java Web Development By Neal Ford 624 pages US$44.95 Manning Publications, 2004 ISBN:

Lexmark ESF Applications Guide

S E C U R I T Y A D M I N I S T R A T I O N G U I D E

Introduction to XSL. Max Froumentin - W3C

mi-rm mi-recruitment Manager the recruitment solution for Talent Managers everywhere

Hyperion Enterprise. Installation Guide RELEASE

SELECTING THE SUITABLE ERP SYSTEM: A FUZZY AHP APPROACH. Ufuk Cebeci

Early access to FAS payments for members in poor health

Design Considerations

WINMAG Graphics Management System

Oracle Project Financial Planning. User's Guide Release

Driving Accountability Through Disciplined Planning with Hyperion Planning and Essbase

Chapter 3: Authentication and Resource Protection in Windows 2000

APIS Software Training /Consulting

Pay-on-delivery investing

Eaton Intelligent Power Protector (IPP) Quick Start Installation Manual

IMPLEMENTING THE RATE STRUCTURE: TIERING IN THE FEE-FOR-SERVICE SYSTEM

NCH Software Copper Point of Sale Software

New Features in Cisco IOS 12.4

Human Capital & Human Resources Certificate Programs

A Conversation with

NCH Software Warp Speed PC Tune-up Software

The BBC s management of its Digital Media Initiative

LADDER SAFETY Table of Contents

INDUSTRIAL AND COMMERCIAL

Vision Helpdesk Client Portal User Guide

IT Governance Principles & Key Metrics

Technical Support Guide for online instrumental lessons

Chapter 2 Traditional Software Development

Order-to-Cash Processes

NCH Software Crescendo Music Notation Editor

Business Banking. A guide for franchises

SPOTLIGHT. A year of transformation

Eaton Intelligent Power Manager (IPM) Quick Start Installation Manual

Let s get usable! Usability studies for indexes. Susan C. Olason. Study plan

WHITE PAPER BEsT PRAcTIcEs: PusHIng ExcEl BEyond ITs limits WITH InfoRmATIon optimization

How to deal with personal financial problems

How To Make An Audio Fie On Mixpad

Eaton Power Xpert Gateway PXGX UPS Card. User's Guide

Eaton Intelligent Power Protector (IPP) User s Guide

Sage Accounts Production Range

MICROSOFT DYNAMICS CRM

I FaxMemo. Manual. Voice Processina Solutjons I. Issue 1 Release 2.0 January 1996

Vital Steps. A cooperative feasibility study guide. U.S. Department of Agriculture Rural Business-Cooperative Service Service Report 58

Enhanced continuous, real-time detection, alarming and analysis of partial discharge events

ADVANCED ACCOUNTING SOFTWARE FOR GROWING BUSINESSES

Subject: Corns of En gineers and Bureau of Reclamation: Information on Potential Budgetarv Reductions for Fiscal Year 1998

A Description of the California Partnership for Long-Term Care Prepared by the California Department of Health Care Services

AA Fixed Rate ISA Savings

Qualifications, professional development and probation

A short guide to making a medical negligence claim

The Domain Name System (DNS)

The growth of online Internet services during the past decade has increased the

Load Balancing in Distributed Web Server Systems with Partial Document Replication *

Oracle. L. Ladoga Rybinsk Res. Volga. Finland. Volga. Dnieper. Dnestr. Danube. Lesbos. Auditing Oracle Applications Peloponnesus

NCH Software WavePad Sound Editor

NCH Software PlayPad Media Player

READING A CREDIT REPORT

Normalization of Database Tables. Functional Dependency. Examples of Functional Dependencies: So Now what is Normalization? Transitive Dependencies

NCH Software Bolt PDF Printer

INDUSTRIAL PROCESSING SITES COMPLIANCE WITH THE NEW REGULATORY REFORM (FIRE SAFETY) ORDER 2005

Remote Feature Activation Getting Started with Remote Feature Activation (RFA)

Learning from evaluations Processes and instruments used by GIZ as a learning organisation and their contribution to interorganisational learning

Secure Network Coding with a Cost Criterion

Leadership & Management Certificate Programs

The Productive Therapist and The Productive Clinic Peter R. Kovacek, MSA, PT

Lecture 7 Datalink Ethernet, Home. Datalink Layer Architectures

WHITE PAPER UndERsTAndIng THE VAlUE of VIsUAl data discovery A guide To VIsUAlIzATIons

Information Systems Technician Training Series

The guaranteed selection. For certainty in uncertain times

Telephony Trainers with Discovery Software

We are XMA and Viglen.

Informatica PowerCenter

Transcription:

Advanced CodFusion 4.0 Appication Deveopment - CH 3 - Server Custering Using Bri.. Page 1 of 7 [Figures are not incuded in this sampe chapter] Advanced CodFusion 4.0 Appication Deveopment - 3 - Server Custering Using Bright Tiger In this chapter What Is Custer Cats for CodFusion Appication Server 4? Understanding Custer Cats What Is Custer Cats for CodFusion Appication Server 4? Incuded with the Enterprise version of CodFusion is Custer Cats by Bright Tiger Software. A software-based oad-baancing soution, Custer Cats monitors your CodFusion Appication Server (CFAS) and can redirect requests away from a server that is beginning to enter a "busy" state. Note that Custer Cats does not work on the network ayer. When Custer Cats redirects requests to another server, it does so by redirecting to the URL of another machine in the custer. This means that if your server is competey out of commission (that is, not turned on), Custer Cats cannot communicate with it and therefore cannot redirect requests away from it. Perhaps the most attractive thing about using Custer Cats for your oad-baancing soution is its integration with the CFAS. Because Custer Cats responds to eements of the CFAS, you get oad baancing that is specific to your CodFusion-based appication. You get this benefit in addition to genera faiover and machine aerts. An important point to note about Custer Cats is that the version shipping with CFAS 4 does not incude support for repication; however, the fu version of Custer Cats, avaiabe from Bright Tiger, does have repication buit in. Repication is the abiity to put your CodFusion scripts on one machine in your custer and have those scripts update on a machines in the custer. Many administrators overook repication when panning their oad-baancing strategy. However, as code bases grow, and server architectures get more compex, repication pays a crucia roe in content synchronization. Later this chapter outines some simpe strategies to incude repication from the onset, and thus keep your job as server administrator manageabe as your server custer grows. Understanding Custer Cats As you have earned in the preceding two chapters, many different methods for custering servers are avaiabe. In particuar, the methodoogies empoyed in software-based custering differ greaty. This fact wi most definitey have an impact on how your server custer serves your appication. This section wi give you a broad overview of the methodoogies empoyed in Custer Cats. fie://j:\prodinfo\members\ma\ir046.htm 3/23/01

Advanced CodFusion 4.0 Appication Deveopment - CH 3 - Server Custering Using Bri.. Page 2 of 7 To begin, you need to note that Custer Cats uses HTTP redirection to baance oad across a custer. Athough, in genera, this is a protoco-based redirection, it acks certain network-eve contros; therefore, I pace it in the appication ayer of the networking hierarchy. In contrast, another popuar software-based custering strategy, Convoy Custer (acquired by Microsoft in August 1998), attempts to use the network ayer by advertising muticast MAC addresses to routing equipment. Because this discussion is about Custer Cats, I wi not go into the detais of muticast MAC addressing. However, suffice it to say that Convoy makes your custer ook ike one big IP address (see Figure 3.1), whereas Custer Cats makes your custer ook ike a ot of HTTP servers grouped together (see Figure 3.2). Depending on your situation, one approach may be better than the other, but they both do the same job. FIGURE 3.1 Diagram of HTTP server redirection. FIGURE 3.2 Diagram of muticast MAC addressing. CAUTION By extension of these differing methodoogies, you must make concessions in the way you code your appication to support the type of redirection being empoyed. In some cases, this soution may be as simpe as not using absoute paths in your URL references; in other cases, you might need to make use of CodFusion s advanced Cient State management options (discussed in a ater chapter) to mitigate these server redirections. Now, take a ook at the components of Custer Cats. The software works with two primary components: the Server component and the Exporer component. Each pays a critica roe in the configuration and support of your Custer Cats custers. Note that athough you can have a custer consisting of a mix of Sun Soaris and Windows NT-based servers running Custer Cats, you must have at east one Windows NT server to run the Custer Cats Exporer. You cannot configure your custer without the Exporer component. Custer Cats Server The Custer Cats Server component runs on Windows NT 4.0 and Sun Soaris. This Server component is the heart of the custer. It contros configuration of a machine s roe in a particuar custer, handes redirection from the server in the event that oad threshods are breached, and contros access to the server based on restriction rues. The Server component must reside on a machines you are using for your custer operations. Custer Cats Exporer The Custer Cats Exporer component runs ony on Windows NT 4.0. It contros configuration of Custer Cats custers. I found that it was best to configure the server that the Exporer sits on as the primary server for a your incoming HTTP requests. I ike to ca it the "Controer Server." Its purpose is to hande a the incoming HTTP requests first and then redirect to other machines in the custer as needed. Tasks handed by the Custer Cats Exporer incude the foowing: fie://j:\prodinfo\members\ma\ir046.htm 3/23/01

Advanced CodFusion 4.0 Appication Deveopment - CH 3 - Server Custering Using Bri.. Page 3 of 7 Creating and removing custers Adding and removing servers from a custer and setting server oad threshod eves Restricting or providing access to servers Registering custer administrators Seecting events for aarms and specifying the recipients of aarm emai distributions How Custer Cats Works As mentioned previousy, Custer Cats uses HTTP redirection as its principa methodoogy for distributing oad across a custer. This means that the user s request is sent to another machine in the custer and stays there unti that machine needs to redirect the request to yet another machine. For exampe, if a request comes to www.yourcompany.com, and www is too busy to hande new requests, it sends that request to www2 (or another machine based on avaiabiity of a machines in the custer). The URL in the browser ocation box now reads www2.yourcompany.com (refer to Figure 3.1). Therefore, subsequent requests wi go to www2 unti that machine cannot accept more requests. At that point, www2 wi attempt to redirect the request to another machine based on the information it has about other machine avaiabiity. CAUTION In the preceding exampe, the custer essentiay "cedes" contro of redirections to the HTTP protoco. This means that there is no way to contro what happens after that redirect is issued. If the target server crashes or otherwise does not respond to requests at a, a redirect fais with a Server unavaiabe response to the user. As of the writing of this book, the CFAS 4 impementation of Custer Cats does not provide catastrophic server faiover capabiities. This capabiity is expected in a ater reease of CFAS 4 and wi mitigate this diemma. With catastrophic server faiover in pace, the Custer Cats HTTP redirection woud know whether a server is avaiabe and thus not redirect a request to a faied server. This resut is accompished via each server istening for a heartbeat from other servers in the custer. If a machine does not respond to the heartbeat within a specific period of time, another machine in the custer assumes the IP address of the down machine (a process otherwise known as IP aiasing). Let me contrast this shortcoming of Custer Cats in the CFAS 4 impementation: If your server is up and running, and you just want to take it out of the custer for a whie for maintenance, you can restrict that server. Restricting a server in a Custer Cats custer causes a requests to that server to be sent to other machines automaticay. Sampe Appication Say that you have a CodFusion appication that needs to be custered across two CodFusion appication servers. This appication does not use session variabes but instead empoys a "custer neutra" method of saving state: cient cookies. The name of the Web site you are custering is fie://j:\prodinfo\members\ma\ir046.htm 3/23/01

Advanced CodFusion 4.0 Appication Deveopment - CH 3 - Server Custering Using Bri.. Page 4 of 7 www.mycompany.com, and you wi be using machines www1.mycompany.com and www2.mycompany.com in the configuration. To provide two ayers of oad baancing, you can empoy round-robin DNS in addition to Custer Cats. By doing so, you can distribute genera requests to both servers in the custer. In this configuration, you can keep a oad from initiay being directed at one machine and better use resources. Athough this resut may seem inconsequentia in the context of what s being described, it wi have an impact on what you set in the oad threshod eve section of each custer member. Creating Your Appication Custer Begin by instaing the integrated Custer Cats software incuded with CodFusion 4 on both machines. If you are using Windows NT on both machines, the setup routine instas the Custer Cats Exporer. In this exampe, you wi use the Custer Cats Exporer ony on www1.mycompany.com. After you insta the software, you wi see a new service (in addition to the CodFusion 4 services) named Bright Tiger Server service in the Service Contro Manager. It must be set to Automatic and shoud be running so that Custer Cats can work propery. You shoud aways check the Service Contro Pane after a significant instaation. Doing so heps you understand the components of your server appication. From the www1.mycompany.com consoe, open the Custer Cats Exporer. Your screen shoud ook ike Figure 3.1. Right-cick the Custer Manager icon in the eft pane of the Custer Cats Exporer. You then see a diaog box that ooks ike the one in Figure 3.3. FIGURE 3.3 The Create New Custer diaog box. You need to enter the Custer Name (see the foowing sidebar), the Server Name, which is the name of the primary server in your custer, and the License Key incuded in your CodFusion 4 Administrator Guide. Be sure to enter the Fuy Quaified Host Name of the first machine in your custer in the Server Name box. In the exampe, you woud enter www1.mycompany.com. Naming, and Why It Is Important Note that the first name you enter in the Create New Custer diaog box wi become the defaut administrative manager for the custer. The administrative manager is responsibe for aowing other Web servers to be added and deeted from the SmartCuster. Apart from this, you aso need to name your SmartCuster something that is specific to your task. For exampe, if you pan to host severa CodFusion appications responding to mutipe IP addresses on your server, you might want to create custers that have the same name that exists in your CFAPPLICATION tag. Doing so heps you baance oad based on appication and not just on the server. If you have a particuar appication that is CPU intensive, for exampe, you can give it more of a particuar machine in your custer and redirect other appication requests away. Creating Custer Members After you create your initia custer member from the Create New Custer diaog box, you can add fie://j:\prodinfo\members\ma\ir046.htm 3/23/01

Advanced CodFusion 4.0 Appication Deveopment - CH 3 - Server Custering Using Bri.. Page 5 of 7 other custer members by right-cicking on your custer name, choosing New, and then seecting Custer Member. In the resuting diaog box (see Figure 3.4), enter the Fuy Quaified Host Name. In the exampe, you woud enter www2.mycompany.com. FIGURE 3.4 The Add New Server to Custer diaog box. At this point, you shoud have two servers isted in the Custer Cats for CodFusion Exporer. Custer Cats might take a few seconds to connect to the servers in your custer, depending on the size of your custer or network oad. I found this process to be uneventfu, and after the custer is synchronized, it does not have an impact on performance at a. Figure 3.5 shows an exampe of a custer in use at my company. FIGURE 3.5 Custer Cats Exporer with two active servers. Setting Load Threshod Leves You can set each server in your custer to respond to two oad threshods: Load Threshod Gradua Redirection Threshod Load Threshod is the top eve you aow your server to accept before it enters a busy state. When this situation occurs, Custer Cats begins redirecting requests to other servers in the custer based on their avaiabiity. Custer Cats continues redirecting requests unti the actua machine oad dips beneath this ine. Gradua Redirection Threshod defines a secondary threshod at which user requests start being redirected. As the name impies, if the Gradua Redirection Threshod is reached, Custer Cats redirects a portion of the oad--but not a of the oad--to avaiabe machines in the custer. The Gradua Redirection Threshod and the Load Threshod work together to provide a smooth transition of oad (see Figure 3.6). FIGURE 3.6 Custer Cats Load Monitor with exampes of both types of redirection set. NOTE Be sure to remember the reationship of the Load Threshod to the Gradua Redirection Threshod. If the Gradua Redirection Threshod is set cose to the Load Threshod, a greater number of requests is redirected from the server. Conversey, if the Gradua Redirection Threshod is set far from the Load Threshod, fewer requests are redirected from the server. Repication: Keeping Your Content in Sync Unfortunatey, the repication features buit into the Bright Tiger impementation of Custer Cats are not incuded in the version shipping with CFAS 4. Repication is a mechanism empoyed to keep content on a your servers in sync with a centra source. Anyone who runs mutipe Web servers, grouped in a custer, needs to be abe to repicate content. Fortunatey, many shareware and freeware fie://j:\prodinfo\members\ma\ir046.htm 3/23/01

Advanced CodFusion 4.0 Appication Deveopment - CH 3 - Server Custering Using Bri.. Page 6 of 7 utiities are avaiabe to hep you synchronize your content. I ike to use a utiity named Robocopy from the Windows NT Resource Kit. Sampe Repication Strategy Using Robocopy Robocopy and AT (the Windows NT Scheduer service) can combine to be a very effective repication strategy. Robocopy copies ony changed fies from a centra source to target sources. It has an extremey arge number of switches that aow you to customize your synchronization rues. Because Robocopy is a command-ine utiity, you can script fairy eaborate interactions with fie systems using UNC names and the program s switches. To use Robocopy, you must have the Windows NT Resource Kit. The foowing is an exampe of a Robocopy script I use to repicate content to another Web server and backup RAID drive. Note that I aso use the command-ine utiity caed bat to send an emai of the Robocopy og back to a centra administration desk. If you are writing scripts ike these, you woud be wise to incude some contact information at the top; this way, if your script fais, systems staff know whom they shoud contact. cs echo off echo ********************************************************** echo *****This is a G. Triad Automated Maintenance Script ***** echo *****Report Probems to gerry@gtriad.com ***** echo *****or 908-497-0510 ***** echo ********************************************************** de C:\temp\atest2Rep.txt de C:\temp\atest3Rep.txt echo Repication to Server 2 Initiated...working... robocopy D:\Inetpub\wwwroot\ \\Server2\90195 /E /PURGE >> C:\Temp\atest2Rep.txt echo Repication to Server2 competed. echo Repication to Server3 Initiated... (BackingUp)... robocopy D:\Inetpub\wwwroot\ \\Server3\90195 /E /PURGE >> C:\Temp\atest3Rep.txt echo Repication to Server3 competed. echo Notifying centra administration... bat C:\temp\atest2Rep.txt -s "[MAINT] Server2 Repication Competed" -t gerry@gtriad.com bat C:\temp\atest3Rep.txt -s "[MAINT] Server3 Repication Competed" -t gerry@gtriad.com echo Notification Competed. Strategies for Custering with Custer Cats Because Custer Cats works on the HTTP eve, you can easiy ayer oad-baancing strategies on top of the system. Combining hardware-based oad baancing or round-robin DNS with Custer Cats creates a two-tiered soution that can be configured in numerous detaied ways. Custer Cats aso provides a means for deaing with Web appications that require use of CodFusion s session variabes. Deaing with Cient State in Custer Cats CFAS 4 uses certain types of cient state variabes that are written into the memory of a Web server. They are known as session and appication variabes. These variabes appy to a user s session or gobay to an appication defined with the CFAPPLICATION tag. Obviousy, if a user s session is reiant on persistent variabes stored on a particuar server in your custer, you have to keep the user on the same server. If the CodFusion appication you are custering fie://j:\prodinfo\members\ma\ir046.htm 3/23/01

Advanced CodFusion 4.0 Appication Deveopment - CH 3 - Server Custering Using Bri.. Page 7 of 7 requires that you not redirect users after they initiay access a Web server, you can enabe sessionaware custering. Do so by right-cicking the custer you want to enabe it for, seecting Configure, and seecting Administration (see Figure 3.7). FIGURE 3.7 The Administration tab in the Custer Cats Exporer. Seecting this option simpy keeps users confined to the same server after they initiay hit the server. No redirections are performed. CAUTION Using session-aware custering has a direct impact on how you baance oad between the servers in your custer. I beieve it is best to set a Load Threshod of approximatey 60 percent. Adjust this setting according to the oad that your CodFusion appication generates. Using Round-Robin DNS Round-robin DNS (RRDNS), as you earned in Chapter 1, "Monitoring Server Performance," aternates requests from Web server to Web server based on entries found in your DNS server. In the exampe here, if you want to set up your custer for RRDNS, you woud enter two entries for the www machine: one pointing to www1.mycompany.com and another pointing to www2.mycompany.com. Thus, resoution requests for www.mycompany.com woud aternate between the two servers in the custer. The big probem with RRDNS has been that if you have to take a server offine, every other new request to www.mycompany.com wi hit a dead machine. With Custer Cats, you can simpy put that machine into a busy state and redirect requests. This type of genera faiover is incuded in the version of Custer Cats shipping with CFAS 4. Layering RRDNS on top of Custer Cats provides a wider spread of oad to your custer. Whereas RRDNS never truy provides a true baance, Custer Cats can hep make that baance a itte smoother by redirecting requests based on machine oad. This oad can then be controed by the Load and Gradua Redirection Threshods. fie://j:\prodinfo\members\ma\ir046.htm 3/23/01