Afterburner, AppletAce, Attain, Attain Enterprise Learning System, Attain Essentials, Attain Objects for Dreamweaver, Authorware,
Authorware Attain, Authorware Interactive Studio, Authorware Star, Authorware Synergy, Backstage, Backstage Designer, Backstage
Desktop Studio, Backstage Enterprise Studio, Backstage Internet Studio, ColdFusion, Design in Motion, Director, Director
Multimedia Studio, Doc Around the Clock, Dreamweaver, Dreamweaver Attain, Drumbeat, Drumbeat 2000, Extreme 3D, Fireworks,
Flash, Fontographer, FreeHand, FreeHand Graphics Studio, Generator, Generator Developer's Studio, Generator Dynamic Graphics
Server, JRun, Knowledge Objects, Knowledge Stream, Knowledge Track, Lingo, Live Effects, Macromedia, Macromedia M Logo &
Design, Macromedia Flash, Macromedia Xres, Macromind, Macromind Action, MAGIC, Mediamaker, Object Authoring, Power
Applets, Priority Access, Roundtrip HTML, Scriptlets, SoundEdit, ShockRave, Shockmachine, Shockwave, Shockwave Remote,
Shockwave Internet Studio, Showcase, Tools to Power Your Ideas, Universal Media, Virtuoso, Web Design 101, Whirlwind and Xtra
are trademarks of Macromedia, Inc. and may be registered in the United States or in other jurisdictions including internationally. Other
product names, logos, designs, titles, words or phrases mentioned within this publication may be trademarks, servicemarks, or
tradenames of Macromedia, Inc. or other entities and may be registered in certain jurisdictions including internationally.
This product includes code licensed from RSA Data Security.
This guide contains links to third-party websites that are not under the control of Macromedia, and Macromedia is not responsible for
the content on any linked site. If you access a third-party website mentioned in this guide, then you do so at your own risk. Macromedia
provides these links only as a convenience, and the inclusion of the link does not imply that Macromedia endorses or accepts any
responsibility for the content on those third-party sites.
Apple Disclaimer
APPLE COMPUTER, INC. MAKES NO WARRANTIES, EITHER EXPRESS OR IMPLIED, REGARDING THE ENCLOSED
COMPUTER SOFTWARE PACKAGE, ITS MERCHANTABILITY OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
THE EXCLUSION OF IMPLIED WARRANTIES IS NOT PERMITTED BY SOME STATES. THE ABOVE EXCLUSION MAY
NOT APPLY TO YOU. THIS WARRANTY PROVIDES YOU WITH SPECIFIC LEGAL RIGHTS. THERE MAY BE OTHER
RIGHTS THAT YOU MAY HAVE WHICH VARY FROM STATE TO STATE.
Using ClusterCATS describes how to use ClusterCATS, the clustering technology that
provides load-balancing and failover services to assure high availability for your web
servers.
Contents
• Developer resources.............................................................................................. viii
• About Macromedia documentation........................................................................ ix
• Contacting Macromedia.......................................................................................... x
vii
Developer resources
Macromedia, Inc. is committed to setting the standard for customer support in developer
education, documentation, technical support, and professional services. The
Macromedia website is designed to give you quick access to the entire range of online
resources. The following table shows the locations of these resources.
ResourceDescriptionURL
Macromedia
website
Information on
ColdFusion
Macromedia
ColdFusion
Support Center
ColdFusion
Online Forums
Information on
JRun
JRun Support
Center
JRun Online
Fo ru m s
Installation
Support
TrainingInformation about classes, on-site training,
ColdFusion
Developer
Resources
ColdFusion
Reference Desk
General information about Macromedia
products and services
Detailed product information on
ColdFusion and related topics
Professional support programs that
Macromedia offers
Access to experienced ColdFusion
developers through participation in the
Online Forums, where you can post
messages and read replies on many
subjects relating to ColdFusion
Detailed product information on JRun and
related topics.
Professional support programs that
Macromedia offers.
Access to experienced JRun developers
through participation in the Macromedia
Online Forums, where you can post
messages and read replies on many
subjects relating to JRun.
Support for installation-related issues for
all Macromedia products
and online courses offered by Macromedia
All the resources that you need to stay on
the cutting edge of ColdFusion
development, including online discussion
groups, Knowledge Base, technical
papers, and more
Development tips, articles,
documentation, and white papers
All of the resources that you need to stay
on the cutting edge of JRun development,
including online discussion groups,
Component Exchange, Resource Library,
technical papers, and more.
Connection with the growing network of
solution providers, application developers,
resellers, and hosting services creating
solutions with ColdFusion
http://www.macromedia.com/desdev/
developer/
http://www.macromedia.com/partners/
About Macromedia documentation
Macromedia documentation is designed to provide support for the complete spectrum of
participants. The print and online versions are organized to let you quickly locate the
information that you need. The Macromedia online documentation is provided in
HTML and Adobe Acrobat formats.
Viewing online documentation
All Macromedia documentation is available online in HTML and Adobe Acrobat
Portable Document Format (PDF) files.
The PDF files are included on the product CDs and are installed in the docs directory,
although they are an optional part of the installation.
About Macromedia documentationix
Contacting Macromedia
Corporate
headquarters
Technical supportMacromedia offers a range of telephone and web-based
SalesToll Free: 888.939.2545
Macromedia, Inc.
600 Townsend Street
San Francisco, CA 94103
Tel: 415.252.2000
Fax: 415.626.0554
Web: http://www.macromedia.com
support options. Go to http://www.macromedia.com/support
for a complete description of technical support services.
ClusterCATS is a web server clustering technology that provides load-balancing and
failover services that assure high availability for your web servers. ClusterCATS lets you
cluster distributed servers into a single, high-performance, highly available environment
of web server resources.
A cluster consists of two or more web servers located on a LAN or across a WAN. Web
servers included in a cluster operate as a single entity to provide rapid and reliable access
to resources on those web servers. A cluster can help your website avoid the consequence
of busy and failed servers — slow networks. With ClusterCATS you can avoid
bandwidth, latency, and congestion problems.
• System requirements................................................................................................ 7
1
ClusterCATS overview
The ClusterCATS technology provides robust features for website availability, load
balancing, and failing-over servers.
A website is no longer just a web server. Most websites have moved beyond static HTML
pages on a web server. To generate dynamic content or process transactions, a website
now includes multiple resources — web servers, files, applications, databases, and other
software processes on multiple servers in one or more locations. The move to a more
advanced site, consisting of multiple resources, often from multiple vendors, introduces a
major problem — overall site availability and performance. More resources, especially
software resources, and more links between them exponentially increase the probability
of failure. Creating a fast, reliable website becomes substantially more challenging.
Macromedia created ClusterCATS, a complete website resource management solution, to
enable service level agreements offering 24x7 availability and optimal response time for
e-commerce, customer self-service, sales automation, customer support, and other critical
business functions. With ClusterCATS, you can build and manage advanced websites,
consisting of multiple resources spanning multiple servers, in one or more locations.
ClusterCATS builds and manages clusters. A cluster is a group of website resources,
including web servers, files, applications, databases, and even the network, that act in
unison, providing reliable and rapid user access. These resources can be clustered in a
single building, distributed in a local area network (LAN), or distributed in a wide-area
network (WAN) in multiple locations across the world. A cluster intelligently detects and
transparently shields users from the following critical problems:
• Failed and busy servers
• Failed and busy applications and databases
• Slow networks caused by congestion, latency, and bandwidth problems
ClusterCATS capabilities
ClusterCATS delivers critical capabilities required by advanced websites today. These
capabilities produce important benefits in the areas of website performance, availability,
manageability, and scalability.
User response time is accelerated with ClusterCATS application and server load
management.
ClusterCATS consists of server and client components. The ClusterCATS Server runs as
a Windows service and ISAPI filter, NSAPI plug-in, or Apache module. ClusterCATS
Explorer is the client-based management application used to build and manage clusters.
Operating in conjunction with an administrative agent on each ClusterCATS Server,
ClusterCATS Explorer provides all the required tools for centrally managing one or more
clusters from any location.
You can also configure ClusterCATS software to enhance simple web server
load-balancing products, such as Cisco’s special-purpose LocalDirector hardware device.
2Chapter 1 Before You Begin
The following table introduces the ClusterCATS capabilities:
Fea tureDe scrip tion
Application and server
load management
Server failoverProvides seamless failover of a web server because of a
Session state
management
Application monitorYou can configure ClusterCATS to monitor the JRun/ColdFusion
Distributed operations Exploits a distributed operations model, eliminating traffic
Centralized
management
Allows administrators to configure server load thresholds to
provide optimum user response time in JRun/ColdFusion
applications. ClusterCATS Server load management protects
users from overloaded servers.
hardware, software, or network connection to another member in
the cluster. ClusterCATS shields users from unplanned or
planned server failures.
Allows session state to be maintained across your website using
a unique method that eliminates the source IP address server
overload problems caused by proxy users. ClusterCATS
application state management ensures users are not redirected
away from a server while maintaining state.
server or a JRun/ColdFusion application, and restart the server or
application if a failure occurs.
bottlenecks and maximizing performance and availability. All
servers share knowledge of application or web server
performance, and server availability. Each server can respond
directly to a request or redirect a request to a faster server.
Provides a central console to manage and configure all web
servers in your cluster. ClusterCATS Explorer provides both
high-level and detailed views of the status of one or more
websites and all the resources within a website.
Detailed overview
Application and server load management
ClusterCATS improves user response time by managing application load and web server
load across multiple servers.
You establish load management policy through two administrator-defined response time
thresholds. You configure these for each server. One threshold sets the level at which load
management is activated. If this level of activity is reached, ClusterCATS gradually
redirects a percentage of new server requests to the least-loaded server.
The other threshold defines the peak, or maximum, load level. This is defined as the load
level that should not be reached on that server. If this threshold is attained, an alarm is
sent and requests is redirected.
ClusterCATS overview3
Session state management and failover
For some applications, it is important that a user session is completed on one server.
ClusterCATS offers a session state management option that ensures that the same web
server services requests from a user. When enabled, this option sends the user to the
best-performing server. The user session then remains on that server until completion.
ClusterCATS defines a new session for the following:
• A user comes from a different domain
• A user enters a new URL
• A user employs a bookmark
This approach has distinct advantages over other methods, such as using a source IP
address to define a user session. The ClusterCATS definition of a session is particularly
beneficial if many visitors come from a large proxy server (for example, America Online).
In that scenario, web servers could easily become overloaded.
Should user state be lost completely due to a resource failure, ClusterCATS provides
graceful state failover. This capability automatically displays an administrator-defined
URL for a custom HTML page or JRun page upon resource failure. This page can be
designed to apologize for the failure and, if replicated resources are available, direct the
user to restart the application at the beginning via a specific URL.
Distributed operations
ClusterCATS uses a distributed operations model, eliminating traffic bottlenecks and
maximizing performance. While other hardware and software load-balancing solutions
force all user requests and, typically, all responses through a single special-purpose
network device or server, each ClusterCATS Server can receive a request, respond to a
request, manage traffic load, and support failover. Unlike hardware load-balancing
solutions, ClusterCATS performance is not throttled by network media limitations and
ClusterCATS is network media independent. Consequently, performance scales linearly
as servers and resources are added.
Centralized management
ClusterCATS Explorer, operating in conjunction with an administrative agent on each
ClusterCATS Server, provides all the required tools for building and managing a website
from any location, whether it be an operations center, hotel, or home.
ClusterCATS Explorer features a familiar Windows Explorer-like user interface and
provides both detailed and high-level status views of one or more websites and all
resources within a website.
ClusterCATS Explorer views include:
• Simplifies user interface for the configuration tasks of building a website, including
adding and removing resources, setting load thresholds, selecting alarms, designating
administrators, configuring replication, and state management capabilities
• Real-time graphs of the actual application or HTTP server load and load thresholds
4Chapter 1 Before You Begin
ClusterCATS product configurations
ClusterCATS includes a comprehensive core set of features and offers several add-on
options for extending its capabilities. All ClusterCATS configurations include:
• Macromedia Enterprise Server (ColdFusion and JRun) load manager
• Configurable load thresholds
• Real-time load monitor
• Session state management (server level)
• HTTP server monitor and auto-restart
• Real-time web server availability monitor
• Web server failover option
• Web server restriction
• Macromedia Enterprise Server monitor and auto-restart
• Macromedia Enterprise Server application monitor and auto-restart
• Administrator authentication
• Alarms
• Daily reports
ClusterCATS overview5
ClusterCATS components
ClusterCATS consists of these primary components:
• ServerResides on each computer in a cluster. It communicates with the web server
and other ClusterCATS Servers. For more information, see “ClusterCATS Server” on
page 48.
• Server Administrator (Windows only) or btadminLets you perform server-specific
administration tasks through a graphical interface. For UNIX-based administration,
use the scriptable btadmin utility, which is also available for Windows users. For more
information, see “ClusterCATS Server Administrator” on page 52 and “Using
btadmin” on page 122.
• ClusterCATS Explorer and Web Explorer Graphical utilities for creating and
managing clusters in Windows and UNIX environments, respectively. For more
information, see “ClusterCATS Explorer (Windows only)” on page 48 and
“ClusterCATS Web Explorer (UNIX only)” on page 49.
The following table shows which components ClusterCATS installs on each platform:
Windows InstallationUNIX Installation
ClusterCATS ServerClusterCATS Server
btadmin and ClusterCATS Server
Administrator
ClusterCATS ExplorerClusterCATS Web Explorer (Note: You can access
btadmin (Note: You can administer a UNIX cluster
with the ClusterCATS Server Administrator from a
Windows computer outside the cluster.)
this from a Windows or UNIX computer.)
You must run the installation program on each server that will be part of your cluster and
on the Windows computer (NT, 2000, .NET Server, 98, or 95) from which you will use
ClusterCATS Explorer to administer the cluster. Even if your clusters run on Solaris or
Linux platforms, obtain a Windows computer for running ClusterCATS Explorer. If you
cannot, use the ClusterCATS Web Explorer in conjunction with the included server
utilities to administer your clusters.
6Chapter 1 Before You Begin
System requirements
This section describes the platforms on which the ClusterCATS components run and
their minimum system requirements.
ClusterCATS Server system requirements
You must install the ClusterCATS Server component on each server in your cluster.
Ensure that your server meets the minimum system requirements for your platform.
Windows system requirements for ClusterCATS Server
• Intel Pentium 200 Mhz or greater CPU
• 100 MB of free disk space
• 128 MB of RAM
• Windows NT (with SP 4 or greater), Windows 2000, or Windows .NET Server
• Internet Information Server or greater; Netscape Enterprise Server v3.5.1 or greater
• Administrative privileges on each server
• A unique IP address assigned to each web server
• Correct DNS entries and configurations (see “Configuring DNS servers” on page 34)
Note: ClusterCATS Server does not run on Windows 98 or Windows 95.
Sun Solaris system requirements for ClusterCATS Server
• Sun SPARC workstation
• 100 MB of free disk space
• 128 MB of RAM (more recommended)
• Solaris operating system v2.51 or greater with Patch 103582-18 or higher
• Netscape Enterprise Server v3.5.1 or greater or Apache Web Server v1.3.6 or greater
• Administrative root privileges on each server
• A unique IP address assigned to each web server
• Correct DNS entries and configurations (see “Configuring DNS servers” on page 34)
Linux system requirements for ClusterCATS Server
• Intel Pentium 200 Mhz or greater
• 100 MB of free disk space
• 128 MB of RAM (more recommended)
• Red Hat operating system v6.0 or greater
• Apache Web Server v1.3.6 or greater
• Administrative root privileges on each server
• A unique IP address assigned to each web server
• Correct DNS entries and configurations (see “Configuring DNS servers” on page 34)
System requirements7
ClusterCATS Explorer and Web Explorer system requirements
You can install the ClusterCATS Explorer or Web Explorer component on a computer
outside the cluster, so you can administer the cluster from a central location. Ensure the
computer on which you install one of these components meets the minimum system
requirements.
System requirements for the Windows-based Explorer
The Windows-based ClusterCATS Explorer runs from a Windows computer (NT, 2000,
.NET Server, 98, or 95), regardless of the platform on which you install ClusterCATS
Server. Its system requirements are as follows:
• Intel Pentium 200 Mhz or greater CPU
• 100 MB of free disk space
• 64 MB of RAM (128 MB recommended)
• Windows NT Service Pack 5 or greater (if running Windows NT)
• Administrative privileges
System requirements for the ClusterCATS Web Explorer
Use the ClusterCATS Web Explorer if you have a UNIX-only environment. Install the
ClusterCATS Web Explorer program on a UNIX server that meets the following
requirements:
• Sun SPARC workstation
• 75 MB of free disk space
• 128 MB of RAM
• Solaris operating system v2.51 or greater with Patch 103582-18 or higher
• Netscape Enterprise Server v3.5.1 or greater or Apache Web Server v1.3.6 or greater
• Microsoft Internet Explorer 4.0 or greater or Netscape Navigator 3.0 or greater
8Chapter 1 Before You Begin
CHAPTER 2
Scalability and Availability Overview
This chapter describes the concepts involved in achieving scalable and highly available
web applications.
Contents
• What is scalability? ................................................................................................ 10
• What is website availability?................................................................................... 23
• Creating scalable and highly available sites............................................................. 28
9
What is scalability?
As an administrator, you probably hear about the importance of having web servers that
scale well. But what exactly is scalability? Simply, scalability is a web server’s ability to
maintain a site’s availability, reliability, and performance as the amount of simultaneous
web traffic, or load, hitting the web server increases.
The major issues that affect website scalability include:
• “Performance” on page 10
• “Load management” on page 12
Performance
Performance refers to how efficiently a site responds to browser requests according to
defined benchmarks. You can design, tune, and measure application performance.
Performance can also be affected by many complex factors, including application design
and construction, database connectivity, network capacity and bandwidth, back office
services (such as mail, proxy, and security services), and hardware server resources.
Web application architects and developers must design and code an application with
performance in mind. When the application is built, administrators can tune
performance by setting specific flags and options on the database, the operating system,
and often the application itself to achieve peak performance. Following the construction
and tuning efforts, quality assurance testers should test and measure an application’s
performance prior to deployment to establish acceptable quality benchmarks. If these
efforts are performed well, you can better diagnose whether the website is operating
within established operating parameters, when reviewing the statistics generated by web
server monitoring and logging programs.
Depending on the size and complexity of your web application, it may be able to handle
from ten to thousands of concurrent users. The number of concurrent connections to
your web server(s) ultimately has a direct impact on your site’s performance. Therefore,
your performance objectives must include two dimensions:
• Speed of a single user’s transaction
• Amount of performance degradation related to the increasing number of concurrent
users on your web servers
Thus, you must establish response benchmarks for your site and then achieve the highest
number of concurrent users connected to your site at the response rates. By doing so, you
will be able to determine a rough number of concurrent users for each web server and
then scale your website by adding additional servers.
When your site runs on multiple web servers, you must monitor and manage the traffic
and load across the group of servers. To learn how to do these tasks, see “Hardware
planning” on page 26 and “Creating scalable and highly available sites” on page 28.
10Chapter 2 Scalability and Availability Overview
Linear scalability
Perfect scalability — excluding cache initializations — is linear. Linear scalability, relative
to load, means that with fixed resources, performance decreases at a constant rate relative
to load increases. Linear scalability, relative to resources, means that with a constant load,
performance improves at a constant rate relative to additional resources.
Caching and resource management overhead affect an application server’s ability to
approach linear scalability. Caching allows processing and resources to be reused,
alleviating the need to reprocess pages or reallocate resources. Disregarding other
influences, efficient caching can result in superior linear application server scalability.
Resource management becomes more complicated as the quantity of resources increases.
The extra overhead for resource management, including resource reuse mechanisms,
reduces the ability of application servers to scale linearly relative to constraining
resources. For example, when a processor is added to a single processor server, the
operating system incurs extra overhead in synchronizing threads and resources across
processors to provide symmetric multiprocessing. Part of the additional processing power
that the second processor provides is used by the operating system to manage the
additional processor, and is not available to help scale the application servers.
It is important to note that application servers can scale relative to resources only when
the resource changes affect the constraining resources. For example, adding processor
resources to an application server that is constrained by network bandwidth would
provide, at best, minor performance improvements. When discussing linear scalability
relative to server resources, you should assume that it is relative to the constraining server
resources.
Understanding linear scalability in relation to your site’s performance is important
because it affects not only your application design and construction, but also indirectly
related concerns, such as capital equipment budgets.
What is scalability?11
Load management
Load management refers to the method by which simultaneous user requests are
distributed and balanced among multiple servers (Web, JRun, ColdFusion, DBMS, file,
and search servers). Effectively balancing load across your servers ensures that they do not
become overloaded and eventually unavailable.
There are several different methods that you can use to achieve load management:
• Hardware-based solutions
• Software-based solutions, including round-robin Internet DNS or third-party
clustering packages
• Hardware and software combinations
Each option has distinct merits.
Most load-balancing solutions today manage traffic based on IP packet flow. This
approach effectively handles non-application-centric sites. However, to effectively
manage web application traffic, you must implement a mechanism that monitors and
balances load based on specific web application load. ClusterCATS ensures that the JRun
or ColdFusion server, the web server, and other servers on which your applications
depend remain highly available.
For more information on using hardware and software for load balancing, see “Creating
scalable and highly available sites” on page 28.
12Chapter 2 Scalability and Availability Overview
Successful scalability implementations
Achieving scalable web servers is not a trivial task. There are various solutions from which
to pick, setup and configuration tasks to understand and perform, and many delicate
dependencies between related but heterogeneous technologies. This section describes
some of the major issues affecting successful scalability implementations:
• “Designing and coding scalable applications” on page 13
• “Avoiding common bottlenecks” on page 16
• “DNS effects on website performance and availability” on page 17
• “Load testing your web applications” on page 20
Designing and coding scalable applications
Application architects must create designs that are inherently flexible by relying on open
standards that don’t restrict the application’s construction and implementation to
vendor-specific interfaces and tools. Similarly, web developers that construct the designed
application must be aware that they can significantly impact the application’s scalability
in the way in which they write their code, build their SQL queries, invoke thread
management, access databases, and partition the application.
This section discusses the following topics to consider when designing and building a
web application:
• “Application session and state management” on page 13
• “Database locking and concurrency issues” on page 14
• “Application partitioning” on page 15
Application session and state management
As you create web applications, you will probably create specific variables that you intend
to carry across multiple interactions between a user’s browser and a site’s web server(s).
Using client variables that are stored in a shared state repository, or session variables that
are stored in memory of a specific server, are popular approaches for accomplishing this
task. The latter approach, however, introduces a significant challenge for a website that is
supported by multiple servers. When a user has begun a session and variables are stored
on a specific server, the user must return to that server for the life of the session to
maintain correct state information.
An example that illustrates this concept is an e-commerce application that uses shopping
carts. With this type of application, as a customer accumulates items in a cart, there must
be a mechanism to ensure that the user can see the items as they are added. One approach
is to store these items in session variables on a specific web server. However, if you use this
approach, there must also be a way to ensure that the user always returns to the same
server for the life of the session. ClusterCATS automatically handles this challenge for
you.
Another approach to solving this problem is to store client variables in a back-end
common state repository. This approach enables all web servers in a cluster to access
variables in a common, shared back-end data store, such as a database. However, this
approach can potentially affect your site’s performance.
Successful scalability implementations13
Web developers must think through the user scenarios in which application session and
state are affected, and engineer appropriate mechanisms to handle them. The most
common ways to handle session data are:
• Client-side options consisting of cookies, hidden fields, a get list, or URL parameters
• Server-side session variables
Note: Storing session data on the server requires that a simple identifier is stored on
the client, such as a cookie.
• An open state repository consisting of a common back-end database or other shared
storage device
Whatever mechanism your architects and engineers use, they must anticipate the
scenarios in which maintaining an application’s state is vital to a good user experience.
See “Session-aware load balancing” on page 72.
Database locking and concurrency issues
Dynamic web applications that allow users to modify a database must ensure appropriate
database concurrency handling. This term refers to how an application manages
concurrent user requests when accessing the same database records. If an application does
not impose a database-locking mechanism on multiple requests to update a record, data
integrity can be compromised in the database — two users could make simultaneous
modifications to a record, but only the second change would take effect.
For example, consider a Human Resources web application on a company intranet. The
HR Generalist adds two new employee records to the HR database by filling out a web
form, because two new employees have been hired. The Generalist enters most of the
vital information into the records, but doesn’t yet have the new employees’ phone
extensions or HMO selections, so leaves those fields blank. Later in the day, the HR
Generalist’s manager, the HR Director, obtains this information from both new hires and
decides to enter it in the database. However, one of the new employees, after speaking
with her husband, decides to change her HMO selection from the basic selection to the
PPO choice. The employee calls the HR Generalist to tell him of the change, and the
Generalist says he will take care of it immediately. Without talking to the HR Director,
the HR Generalist adds the information into the employee records at the same time that
the HR Director is attempting to update the information.
In this scenario, if the application uses an appropriate database concurrency validation
mechanism, the HR Director receives a message indicating that she could not access the
employee record because it was in use, thereby alerting her that someone in her
department was trying to change the record. However, if the application did not use such
a validation mechanism, the HR Director would overwrite the new data that the
Generalist had just entered, resulting in data integrity problems. This example illustrates
the importance of your dynamic web applications handling database concurrency issues
well.
14Chapter 2 Scalability and Availability Overview
Application partitioning
The way an application is partitioned and deployed dramatically affects its ability to
scale. A key development objective must be to ensure that each partition scales
independently of the others, thereby eliminating application bottlenecks.
Application partitioning refers to the logical and physical deployment of an application’s
three core types of logic, or services — presentation, business, and data access. If you are
familiar with the concept of tiered client/server application development, you already
understand the rationale for developing applications in this way. The following short
review highlights this methodology’s benefits.
An application, regardless of whether it is a web application or a more traditional client/
server application, has three main categories of logic, or services:
• Presentation services — a user interface, by which users interact with the application’s
features. In a traditional client/server application, this logic resides on a client
computer, typically as a proprietary executable file. In a web paradigm, there is no
specific proprietary client software required, other than a browser. Emerging web
technologies can help you leverage powerful client-side processing available through a
browser. These technologies include Enterprise JavaBeans (EJB), scriptlets,
JavaScript, applets, and Dynamic HTML. Well-planned use of these technologies can
reduce unnecessary trips to the server, thereby minimizing performance degradation.
• Business services — the custom business logic and rules that an application uses to
perform calculations and application-specific functions. An example of a business
service is an algorithm that automatically calculates shipping and handling charges
for an order, based on the total cost of the order. In JRun, this logic is contained
within scriptlets and EJBs. In ColdFusion, this logic is contained in ColdFusion
pages. Depending on the nature of the business and how often the business rules
change, business logic can be partitioned to reside on its own server for easier access
that expedites frequent logic modifications, or it can reside in stored procedures on
the database server.
• Data services — the interaction between the application and the database in which
the application stores and manipulates data. The way application manages data
services is directly tied to the application’s performance capability. In short, accessing
a database can be costly and can cause significant performance degradation,
depending on a variety of factors. For example, the types of database drivers used for
connections, the construction of SQL queries, the manner in which database
connections are pooled and maintained, and whether stored procedures are
implemented for frequent database access, all directly impact the application’s
performance.
The way that architects and web developers decide to partition and deploy these core
application services significantly affects the application’s ability to scale. Although your
development efforts may no longer be burdened with developing, distributing,
customizing, and updating proprietary client software for your applications, the
ubiquitous graphical user interface (GUI) — the web browser — presents new interface
issues and challenges. For example, you must ensure that your application’s presentation
remains performance-friendly. It should minimize the number and size of graphic
elements that must be downloaded to the client. Also, because some browsers cannot
Successful scalability implementations15
cleanly display all technologies, such as cascading style sheets (CSS), Java applets, and
frames, you must carefully evaluate their use in your applications.
Bear in mind these presentation guidelines, to aid your applications’ performance and
user experience, and be sure to plan and test for the lowest common denominator that all
browsers can accommodate.
Often, partitioning business services to a separate business logic application server from
the primary application server, if necessary, can yield better application organization and
easier maintenance. You can maximize your application’s data services by carefully
constructing them and by ensuring that a separate database server (in this case, a separate
computer) is used to increase processor capacity for any database transactions.
These are several of the most important topics you and the developers creating your web
applications should consider early on. In doing so, you ensure that your web applications
are designed and coded with scalability in mind.
Avoiding common bottlenecks
In addition to application design and construction considerations, you must plan to
avoid common bottlenecks that can negatively affect a web application’s performance.
Following are typical bottlenecks that can affect an application’s ability to perform and
scale well:
• Poorly written application logic — inefficient programming is probably the most
common reason applications perform poorly. Instituting industry best practices, such
as coding standards, design reviews, and code walkthroughs, can significantly help to
alleviate this problem.
• Processor capacity — even a well-architected and programmed web application can
perform poorly if the web server’s CPU is unable to provide sufficient processing
power. Ensure that heavy-load, mission-critical applications reside on hardware that
can effectively do the job.
• Memory — insufficient random access memory (RAM) limits the amount of
application data that can be cached. Ensure that the amount of memory installed on
the application server computer is commensurate with the needs of the web
application.
• Server congestion — server congestion refers to all types of servers, not just the web
server. Your application, proxy, search and index, and back-office servers can
periodically experience high volume that indirectly degrades the performance of your
web application. When planning the physical design of the system, investigate
carefully the network topology that will be implemented to ensure that existing
servers are sufficient. If they are not, you may need to add new servers to the topology
to ensure uninterrupted service and performance expectations.
• Firewalls — some dynamic applications that must restrict anonymous access because
they present or share confidential information must pass through a corporate firewall,
which can slow down requests and responses. Ensure that the correct ports are open
on the firewall to ensure valid security authentication and to enable appropriate
client/server communications. (You may be able to open additional secure ports to
accommodate increased traffic.)
16Chapter 2 Scalability and Availability Overview
• Network connectivity and bandwidth — consider the type of network your
application will run on (LAN/WAN/Internet) and how much traffic it typically
receives. If traffic is consistently heavy, you may need to add additional nodes,
routers, switches, or hubs to the network to handle the increased traffic.
• Databases — database access, while vitally important to your application’s capabilities
and feature set, can be costly in terms of performance and scalability if it is not
engineered efficiently. When creating data sources for accessing your database, use a
native database driver rather than an ODBC driver, if possible, because it will provide
faster access. Similarly, try to reduce the number of individual SQL queries that must
be repetitiously constructed and submitted, by placing common database queries in
stored procedures that reside on the database server. Tune your databases and queries
for maximum efficiency.
DNS effects on website performance and availability
Improper Domain Name System (DNS) setup and configuration on web servers is one of
the most common problems administrators encounter. This section addresses the
following topics:
• “What is DNS?” on page 17
• “DNS effects on site performance and availability” on page 17
• “DNS core elements” on page 18
What is DNS?
DNS is a set of protocols and services on a TCP/IP network that allows network users to
use hierarchical natural language names, rather than computer IP addresses, when
searching for computer hosts (servers) on a network. DNS is used extensively on the
Internet and on private enterprise networks, including LANs and WANs.
The primary capability of DNS is its ability to map host names to IP addresses, and vice
versa. For example, suppose the web server at Macromedia has an IP address of
157.55.100.1. Most people would connect to this server by entering the domain name
(www.macromedia.com), not the less-friendly IP address. Besides being easier to
remember, the name is more reliable, because the numeric address could change for a
variety of reasons, but the name can always be reserved.
DNS effects on site performance and availability
Internet DNS is a powerful and successful mechanism that has enabled huge numbers of
individuals and organizations to create easily locatable websites on the Internet. However,
DNS by itself may not allow your website to perform and scale as it should, thus causing
it to become unavailable and unreliable. Whether you use DNS by itself to load balance
inbound traffic depends largely on the site’s purpose and the amount of concurrent
activity you expect on it. For instance, a low-volume, static site that provides only textual
HTML information can probably be accommodated by round-robin DNS. However, a
high-volume, dynamic, e-commerce site that you anticipate doing lots of volume won’t
perform or scale well if it is only supported by round-robin DNS.
Successful scalability implementations17
To understand why, let’s look at the e-commerce example. Even if you have planned
ahead and set up multiple servers to support this high-volume site, if you rely only on
DNS, it can only perform two tasks:
• Translate natural language names to server IP address mappings so that users can find
the site
• Distribute load among servers in a rote, sequential distribution manner, if you have
enabled round-robin distribution for multiserver load balancing
However, if a spike in user activity causes servers to overload or fail, round-robin DNS
keeps distributing requests among all servers, even if some are not operating.
In short, Internet DNS is limited in its capabilities, and its round-robin distribution
mechanism does not include intelligence for monitoring, managing, and reacting to
overloaded or failed servers. Consequently, DNS by itself is not a sound load-balancing or
failover solution for your business-critical sites. ClusterCATS compensates for DNS
limitations and lets you create highly available, reliable, scalable web applications.
DNS core elements
The following are core DNS elements that you must be able to configure if your web
applications are to work well with DNS:
• “Zones and domains” on page 18
• “DNS record types, server aliases, and round-robin distribution” on page 19
Zones and domains
A Domain Name System is composed of a distributed database of names. The names in
the DNS database establish a logical tree structure called the domain name space. On the
Internet, the root of the DNS database is managed by the Internet Network Information
Center (InterNIC). The top-level domains were originally assigned organizationally and
by country. Two-letter and three-letter abbreviations are used for countries. Some
abbreviations are reserved for use by organizations — for example, .com, .gov, and .edu
for business, government, and educational organizations, respectively.
A domain is a node on a network and all the nodes below it (subdomains) that are
contained within the DNS database tree structure. Domains and subdomains can be
grouped into zones to allow distributed administration of the name space. More
specifically, a zone is a portion of the DNS name space whose database records exist and
are managed in one physical file. One DNS server may be configured to manage one or
multiple zone files. Each zone is anchored at a specific domain node. You use zones for
breaking up domains across multiple segments to distribute the management of the
domain to multiple groups, and to replicate data more efficiently.
18Chapter 2 Scalability and Availability Overview
The following figure shows these concepts:
DNS servers store information about the domain name space and are referred to as name servers. Name servers typically have one or more zones for which they are responsible.
The name server has authority for those zones and is aware of all the other DNS name
servers that are in the same domain.
DNS record types, server aliases, and round-robin distribution
There are three DNS record types that you must define and configure for each web server
in order for ClusterCATS load-balancing and failover technology to work correctly.
These records must be defined and configured on your local and primary DNS servers.
• A Record — contains a host-name-to-IP-address mapping, where the natural
language name is the primary name representing the IP address.
• PTR Record — contains the IP-address-to-host-name mapping. This is the reverse
lookup of the A record, in which, given the IP address, the natural language host
name for the IP address is displayed.
• CNAME Record — short for canonical record. This record contains an alias name
that maps to the primary host name of a web server. For example, you can assign a
server named www1.yourcompany.com an alias of www.yourcompany.com, so that
users never see www1.yourcompany.com, in the event of a server redirection.
To see how all of these records work together, let’s look at a simple example. There are
two web servers, named www1.yourcompany.com and www2.yourcompany.com. You
don’t want users to see the primary host names (A records) for these servers in their
browser; you want them to see only their assigned aliases (CNAME records), when being
redirected.
Successful scalability implementations19
The DNS entries would look like the following:
:
; Entries for forward-resolution: A-records
www1.yourcompany.comIN A192.168.0.1
www2.yourcompany.comIN A192.168.0.2
; Entries for reverse-resolution: PTR-records
192.168.0.1PTRwww1.yourcompany.com
192.168.0.2PTRwww2.yourcompany.com
; Round Robin entries
www.yourcompany.comIN A192.168.0.1
www.yourcompany.comIN A192.168.0.2
To ensure that your site lookups and translations occur as intended, you must provide
correct entries in your DNS records, as shown. Also, to enable round-robin DNS
functionality, you must create round-robin entries as shown.
On the Windows platform, you make DNS entries using the Domain Name Service
Manager utility.
On UNIX platforms, you make DNS entries in the name.db file, which is read by the
DNS server’s Berkeley Internet Name Daemon (BIND).
Load testing your web applications
Load testing is the process of defining acceptable benchmarks for your web application’s
performance, and then simulating load and measuring resulting response times and
throughput against the benchmarks. You perform load testing to measure the
application’s ability to scale.
This section discusses the following topics:
• “Reasons to perform load testing” on page 20
• “How to load test your web applications” on page 21
• “Load-testing considerations” on page 22
Reasons to perform load testing
Load testing is important to your website’s success because it lets you test its capacities
before you deploy it, so you can find and fix problems before they are exposed to your
users. Determining your site’s purpose, and the amount of traffic you anticipate, may
affect how you load test it.
Managers of small sites, who don’t expect heavy concurrent loads, might be able to
organize actual users to simultaneously access the site to perform load testing. However,
this is difficult to accomplish well, because it introduces many human variables. In fact,
for larger business-critical systems that expect heavy concurrent load, this type of testing
is not feasible and does not provide satisfactory or realistic results.
A better approach to load testing is to use load simulation software. There are some
excellent software load-testing tools on the market that let you simulate heavy loads
20Chapter 2 Scalability and Availability Overview
Loading...
+ 126 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.