Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Work with Web services in enterprise-wide SOA, Part 6: Load balance Web services applications with WebSphere Application Server

Judith M. Myerson is a systems architect and engineer. Her areas of interest include middleware technologies, enterprise-wide systems, database technologies, application development, network management, security, and project management.

Summary:  Want to learn more about load balancing Web services applications between servers in Service-Oriented Architecture (SOA)? Judith M. Myerson discusses the importance of fast response that users demand during peak traffic times and gives examples of load balancing techniques. She discusses IBM WebSphere® Application Server and WebSphere Edge Server as load balancing tools that developers and system and network administrators, in a collaborative effort, can use to distribute Web services applications between servers, thus ensuring that performance, reliability, and availability remain high during peak traffic times.

Date:  23 Sep 2005
Level:  Intermediate
Also available in:   Russian

Activity:  8998 views
Comments:  

Introduction

In the fourth installment in this series, "Build an SOA middleware application with Rational development tools," (see Resources) I talked about how you can use Web development tools to create the application. In the fifth installment, "Optimize Web Service applications with WebSphere Business Integration tools," (see Resources) I talked about how you can use business process tools to integrate and optimize the applications. I mentioned how reducing web requests along with execution time, access time, and bandwidth amount can optimize a Web services application.

In this installment, I cover how some problems of loading applications have had an impact on the way the Web services applications interact with one another. This includes an instance of a traffic bottleneck as a result of too many visitors sending too many requests during a particular range of time to a Web service application based on business processes. Then I talk about how you can benefit from some loading balancing techniques.

Keep in mind that Web requests are not the same thing as visitor requests. The number of Web requests depends on not only the number of visitor requests, but also the type and content of the visitor requests generating Web requests that have been optimized.


Slow response

To get a better idea of the difference, take a look at this instance. If a visitor waits too long for an answer after sending a request through a Web service to a server, the visitor will go to another Web service or Web site for a faster response. The originating Web service will process a load of incoming visitor requests to generate and optimize Web requests for transmission to targeted Web services.

Slower response from the originating Web service can indicate that the targeted server is either busy or does not have enough room for the system to process more than one visitor request (multithreading). One way of handling this load problem is to balance the load between servers, so the visitors will not wait too long for their answers. This is known as a load balancing technique.


Faster response

Balancing the load between servers is a better option than outsourcing Web services because it allows for increased server capacity, an improved site design, the ability to use RAID (Redundant Arrays of Inexpensive Disks) hardware, and it provides bandwidth on demand to handle expected peaks. They all cost more in the long run. With load balancing, you have a better chance of increasing performance and reliability, while reducing the bandwidth amount, execution time, and access time, given that a failover mechanism is included.

For these reasons, load balancing is the choice for the most companies when Web sites get quite a bit of traffic, particularly when they experience sluggish performance at peak times. These companies want faster responses that users demand in order to get more work done in less time.

You can route work to a different server host address in the domain name system or split the amount of work a server has to do between two or more servers. You need another server to determine intelligently which server to assign the work to. You need to combine these servers with failover and backup services in case a server fails, particularly when you distribute or cluster the servers over different geographic locations.


Shopping carts analogy

Think of load balancing servers as an analogy to four checkout counters in a supermarket. Let's take a look at how the supermarket would balance out the load between the counters.

Suppose you are in a long line at checkout counter 1 -- you can roughly guess how long it would take to move up in that line. If you find that the line moves slowly and see that another cashier is coming to checkout counter 4 to open it for business, you would quickly take your cart to that counter (see Figure 1).

Then another cashier opens checkout counter 3 and waves to the shopper who was in front of you in the first line before you moved over. The shopper, of course, moves to counter 3. Checkout counter 2 remains closed.


Figure 1. Load balancing shopping carts
Load Balancing shopping carts

Reduce service time

Let's look at load balancing in another way. If you have a large cart with a month's worth of groceries for your family of ten, you might wish to distribute the items among multiple checkouts. This is particularly true when family members are not with you. You can reduce service time by breaking up the contents of the cart and distributing them across several freely-available checkout counters.

While this is not physically possible, you can do so with a load balancer that intelligently distributes the requests of an online shopping cart Web service application from a busy line to other freely available servers (see Figure 2). It is too expensive to run servers that are underutilized while others are struggling to keep up with demand for service.


Figure 2. Load balancing online cart requests
Load balancing online cart requests

Questions to ask

So how would you solve this problem? Run faster to the counter (increase the bandwidth)? Make the counter longer (increase server capacity)? Get someone else to shop for you (outsource)? None of these will work.

Ask yourself these questions:

  • What kind of application is going to be load balanced?
  • Is this a long-running kind in a globally distributed network?
  • How many requests will a server or a cluster of servers receive over time?
  • How much traffic and bandwidth amount will be expected at peak traffic times?
  • How are the servers utilized for load balancing applications?
  • How many visitors will be expected at various times?
  • What is the maximum number of requests that a visitor can send?

Once you come up with solution alternatives, check or coordinate your solution alternatives with a network or system administrator for a mutual understanding. Then, develop a load balancing program using an algorithm, technique, or tool to redirect visitor and Web requests from a busy server to freely-available servers.


Load balancing techniques

Some examples of load balancing techniques include the following:

  • Simple routing
  • DNS round robin
  • Complex algorithms
  • Intelligent routing

Since traffic needs to be prioritized in the real world, consider the last two techniques in developing a Web services application, since there are ever-expanding distributed networks of servers and visitors who demand fast responses. Since the first two techniques do not require prioritization of traffic, they are not worthy of a discussion on traffic bottlenecks.

When you use complex algorithms, requests are distributed based on, for instance, how well a server is performing, what kind of hardware the server has, and how customer priority is processed. This means the fastest servers get more loads of requests with the highest customer priority. Intelligent routing is based on the content of the request and how it can redirect traffic to another server at a different facility in the event of an originating server failure.


Server-based software

While you can accomplish load balancing using software, hardware, or both, you are better off with server-based software on a cluster of application servers. Server-based software is far cheaper than hardware-based dedicated servers. It is more expensive to upgrade hardware than its software counterpart.

Before you add server-based software to a network, check to see if the network is configured correctly and if the load balancer is flexible. The rationale for the flexibility is that, while the load balancer might be configured adequately for today's Web services application, it must have the capacity to expand for tomorrow's application.

IBM WebSphere Application Server is one example of server-based software that uses both complex algorithms and intelligent routing in load balancing and failover. Its load balancer has the capacity to expand for future requirements of a Web services application. You need to set up a cluster of servers for load balancing and test the failover mechanism (see Resources).

Another example is WebSphere Edge Server V2.0 for Multiplatform. It is designed to improve server selection, load optimization, and fault tolerance. It comes with Network Address Translation (NAT), Kernel-level Content Based routing (CSR) support, and the WebSphere Edge Server Consultant for Cisco CSS switches (see Resources).


Conclusion

Load balancing Web services applications requires planning ahead of time to determine how the loads can be balanced between servers at peak traffic times. Communicate with a team of system administrators on the issues of what load balancing techniques should be used in designing Web services.

You will find that resolving the issues makes your job of creating load balancing Web services applications much easier. You can develop and load balance Web services based on business processes within and across SOAs. The administrators will find that resolving the issues makes their job of load balancing Web services application much easier. They can determine which load balancing approaches to use and how many applications can be load balanced in a SOA.


Resources

Learn

Get products and technologies

About the author

Judith M. Myerson is a systems architect and engineer. Her areas of interest include middleware technologies, enterprise-wide systems, database technologies, application development, network management, security, and project management.

Report abuse help

Report abuse

Thank you. This entry has been flagged for moderator attention.


Report abuse help

Report abuse

Report abuse submission failed. Please try again later.


developerWorks: Sign in


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


Rate this article

Comments

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=SOA and Web services, WebSphere
ArticleID=94454
ArticleTitle=Work with Web services in enterprise-wide SOA, Part 6: Load balance Web services applications with WebSphere Application Server
publish-date=09232005
author1-email=j.myerson@ieee.org
author1-email-cc=rhalden@us.ibm.com

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

For articles in technology zones (such as Java technology, Linux, Open source, XML), Popular tags shows the top tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), Popular tags shows the top tags for just that product zone.

For articles in technology zones (such as Java technology, Linux, Open source, XML), My tags shows your tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), My tags shows your tags for just that product zone.

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.

Special offers