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:
(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?
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.