Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying WildFly Configuration, Deployment, and Administration - Second Edition
  • Table Of Contents Toc
  • Feedback & Rating feedback
WildFly Configuration, Deployment, and Administration - Second Edition

WildFly Configuration, Deployment, and Administration - Second Edition - Second Edition

4.4 (5)
close
close
WildFly Configuration, Deployment, and Administration - Second Edition

WildFly Configuration, Deployment, and Administration - Second Edition

4.4 (5)

Overview of this book

This book is aimed at Java developers, system administrators, application testers using WildFly, and anyone who performs a DevOps role. Whether you are completely new to WildFly or just require an understanding of WildFly's new features, this book is for you.
Table of Contents (14 chapters)
close
close
13
Index

Load-balancing between nodes


We will run a couple of tests in order to investigate how mod_cluster distributes the load between several different clients.

For these tests, we will use a very basic web application. The application source can be found with the source code for this book; the project is called chapter9-balancer. It contains a simple index.jsp page, which dumps a message on the console:

<%
Integer counter = (Integer)session.getAttribute("counter");
if (counter == null) {
  session.setAttribute("counter",new Integer(1));
}
else {
  session.setAttribute("counter",new Integer(counter+1));
}
System.out.println("Counter"+session.getAttribute("counter"));          
%>

After deploying the application, go to the URL http://192.168.0.10/balancer/index.jsp. After making several requests, you will see that each subsequent request is sent to the same server. This shows that mod_cluster follows a sticky-session policy. Have a look at the following screenshot:

For the purpose of our tests...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
WildFly Configuration, Deployment, and Administration - Second Edition
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon