How do I configure a NodeBalancer for a Tomcat cluster?
What's the recommended configuration and settings for a NodeBalancer in front of an Apache Tomcat cluster?
It depends on whether or not you have a service such as Nginx set up as a reverse proxy to handle requests. If you do have Nginx set up, then you can create a standard HTTP or HTTPS configuration for your NodeBalancer over port 80 or 443. There's a guide on doing so here:
If you'd like the NodeBalancer to connect directly to Tomcat on each back-end Linode you can configure the NodeBalancer in TCP mode:
First, add the NodeBalancer, then click on "Create Configuration" on the right-hand side. From there, change the "Protocol" to TCP, and change any other settings to your preference. Then, click "Save Changes" at the bottom.
Now that the Port is added, click on the "Add Node" link on the right-hand side. Give the Linode a label, and then add the Linode's address, including the port you have Tomcat listening on. By default, it's 8080, so for example you could have: 123.456.78.9:8080
After that, you're all set, and any connection to the NodeBalancer's IP address should routed through as-is to Tomcat on one of the back-end Linodes.