Book Image

JBoss EAP6 High Availability

By : Weinan Li
Book Image

JBoss EAP6 High Availability

By: Weinan Li

Overview of this book

High availability is a system design approach and associated service implementation which ensures that a prearranged level of operational performance will be met during a contractual measurement period. High availability is usually a system combined with many different components that achieve different goals. High availability cluster implementations attempt to build redundancy into a cluster to eliminate single points of failure. JBoss EAP6 High Availability is the perfect guide for learning how to apply the newest technologies provided by JBoss to build your high availability system. With a clear explanation of the design of JBoss EAP6 and its clustering components, this book will help you customize each component to fulfill your specific requirements. Throughout the course of this book, you will learn how to build high availability clusters using the projects provided by JBoss. The book begins with an introduction to the design of JBoss EAP6 and its uses. The next step will be to explore the two companion open source projects - mod_jk and mod_cluster. In this section, you will get to grips with the concept of load balancing with mod_jk and mod_cluster. You will also learn how to enable SSL in the clustering environment and how to configure session replication between EAP6 servers. Furthermore, the appendix section introduces you to some troubleshooting techniques for Wildfly.
Table of Contents (15 chapters)
JBoss EAP6 High Availability
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

High availability is a broad topic to discuss, and it concerns both project deployment and development. In this book, I'd like to explore the topics on clustering, load balancing, failover, and session replication.

High availability is also a very interesting topic, and the technologies provided by open source communities are especially fun. In this book we'll learn how to use JBoss EAP6 together with other JBoss and Apache community tools to build a high-availability system.

Here is a brief list of the projects we'll use in this book: JBoss EAP 6, Apache httpd, mod_jk, and mod_cluster. When I'm writing this book, JBoss EAP 6.1.0.Final is the newest product version based on JBoss AS 7.2.x and can be downloaded freely from the JBoss community. This version is very stable with its clustering features, so we'll use it in our book.

Since AS 8.x, the project name of JBoss AS has been renamed to WildFly. Though the project name changed, its design hasn't changed much, and you can reuse most of the knowledge in this book for future versions of WildFly.

JBoss EAP6 has provided a domain management feature that can help us to centralize the management of many servers. This feature is very helpful in a clustering environment, because we don't have to manage each server separately. We'll check this feature in the book.

Transportation security is usually considered critical in business applications. In this book, I'll introduce the methods of applying SSL into a clustering environment.

What this book covers

Chapter 1, JBoss EAP6 Overview, teaches you how to download and install JBoss EAP6, introduces you to startup modes of JBoss EAP6, and covers the basic uses of the domain management function.

Chapter 2, Using JBoss EAP6, covers more details on using the EAP6 management console and explains the design of the EAP6 management model.

Chapter 3, Setting Up a JBoss EAP6 Cluster, guides you on how to set the EAP6 servers properly for it to form a cluster.

Chapter 4, Load Balancing with mod_jk, shows how to use mod_jk as the load balancer of the EAP6 cluster.

Chapter 5, Load Balancing with mod_cluster, discusses how to use mod_cluster as the load balancer of the EAP6 cluster.

Chapter 6, Clustering with SSL, shows how to enable SSL in a clustering environment and teaches you how to set SSL to work with mod_jk.

Chapter 7, Configuring mod_cluster with SSL, shows how to set SSL to work with mod_cluster.

Chapter 8, Developing Distributed Applications, discusses how to develop the distributable applications with the help of JavaEE technologies and deploy it into the EAP6 cluster.

Appendix, WildFly Troubleshooting, shows how to debug the WildFly server at runtime. This chapter is available as a bonus chapter and can be downloaded from http://www.packtpub.com/sites/default/files/downloads/2432OS_Appendix.pdf.

What you need for this book

Some basic knowledge on Linux/Unix is required to read this book. You may need to follow the shell commands shown in the book to configure the servers properly.

Some basic understanding of IP multicasting is strongly recommended. Because many clustering features rely on IP multicasting, you can better understand the design of EAP6 clustering with this knowledge.

If you want to follow the instructions in Chapter 8, Developing Distributed Applications, you may need some basic knowledge of EJB and Servlet development. In addition, some knowledge on Maven usage is preferred.

Chapter 6, Clustering with SSL, and Chapter 7, Configuring mod_cluster with SSL, mainly focus on applying SSL in clustering. Some basic understanding of SSL/TLS technologies is needed if you want to follow the instructions in these two chapters.

When you are following the instructions in this book, please turn off the network firewall of your machine in case it blocks important ports needed by the cluster. If you are using Linux as your working environment, please disable SELinux because it will affect a lot on the clustering features. When you have fully understood the EAP6 clustering features, you can turn these protections back online and configure them properly to work with the EAP6 cluster.

Who this book is for

JBoss EAP6 administrators and JavaEE developers are the main audience of this book. Anyone who wants to know the coolest technologies provided by the JBoss community is recommended to read this book. I hope this book is not merely a step-by-step tutorial, so I've included some discussions on the design of JBoss EAP6 and relative projects.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, folder names, filenames, file extensions, pathnames, dummy URLs, and user input are shown as follows: "The default configuration file is standalone.xml."

A block of code is set as follows:

<interfaces>
  <interface name="management">
    <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
  </interface>
  <interface name="public">
    <inet-address value="${jboss.bind.address:127.0.0.1}"/>
  </interface>
</interfaces>

Any command-line input or output is written as follows:

$ ./standalone.sh

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "To undeploy the project, click on En/Disable first and then click on Remove".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.