I am teaching myself to build clustered Java EE 7 applications. I am focused on Glassfish Server v4.0.

Based on the official documentation (Chapter 7 page 133) , Glassfish can be loadbalanced using Apache Http server using mod_jk. I was reading a bit about the clustering architecutre of glassfish which can be explained by the following two pictures: GLassfish_Cluster GlassFish Administration Paperback by Xuekun Kou
(Second picture is taken from the following book)

My question is:
where is the usual location to install Apache in this scenario? Is it installed on the same machine where the Domain Admin Server resides or in its own separate machine?

  • Here is a hint from page 7-1 "Create GlassFish Server clusters or server instances to participate in load balancing" You would place apache+mod_jk infront of those node. Do this help? – KM. Jun 19 '14 at 21:54
  • @KM. Where do you mean by "in front" ? I install Apache on each server instance / only the admin server instance / on another separate server than these? – ccot Jun 19 '14 at 22:02
  • "In front" of Cluster Nodes in this sense: End User > Apache+mod_jk > Cluster Nodes. Think of the flow of traffic from the end users to these server running your applications. Admin console is used to manage the nodes & almost never not load balanced. For simplicity, go with a dedicated apache server. – KM. Jun 20 '14 at 2:01

The Admin console doesn't need to use the Apache LB layer.

You can add a DNS entry for one Apache instance for the URL, and then use this to load balance to available nodes.

More common for production situations is to use a LB such as F5 or software based LB that communicates to the Apache layer, the Apache nodes can then proxy to the application server nodes using whatever protocol fits best for the situation. The Apache layer can serve up static content and add a cache for example, or run some security modules for example.

Another consideration is to avoid having the application servers on the same subnet layer as the web server layer which is natted to the public IP.

You can technically just put things on the same machine for development purposes, just run two instances of the application server using different ports and so on.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.