Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
JBoss: Developer's Guide

You're reading from   JBoss: Developer's Guide A complete guide to the JBoss ecosystem

Arrow left icon
Product type Paperback
Published in Aug 2017
Publisher Packt
ISBN-13 9781788296199
Length 328 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Elvadas Nono Woguia Elvadas Nono Woguia
Author Profile Icon Elvadas Nono Woguia
Elvadas Nono Woguia
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Introduction to the JBoss Ecosystem 2. Developing and Hosting Scalable Web Applications FREE CHAPTER 3. Custom Web Deployment using Undertow and Swarm 4. Storing and Accessing Distributed Data 5. Exposing Data as a Service 6. Integrating Applications with JBoss Fuse 7. Delivers Information Safely and Connects IoT 8. Making Better Decisions in Your Applications 9. Developing Workflows

Load balancing with an Undertow subsystem

Considering the fact that we have two running undertow instances, we will configure a WildFly application server Undertow subsystem to act as a load balancer in the following section.
Start two instances of the beosbank-undertow-service project using the following:

$mvn exec:java -Dundertow.port=7071
$mvn exec:java -Dundertow.port=7072

Download, install, and run a WildFly application server in standalone mode:

unzip $HOME/Downloads/wildfly-11.0.0.Alpha1.zip
cd wildfly-11.0.0.Alpha1/bin
$ ./standalone.sh

WildFly is now running and listening on port 9990; connect to the server using jboss-cli, as follows:

./jboss-cli.sh --connect

For Undertow to act as a static load balancer behind a set of backend systems, we must register remote socket bindings for these backend systems:

[standalone@localhost:9990 /] /socket-binding-group=standard-sockets...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime