How do I configure a NodeBalancer for a Tomcat cluster?

Linode Staff

What's the recommended configuration and settings for a NodeBalancer in front of an Apache Tomcat cluster?

1 Reply

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:

Getting Started with NodeBalancers: Configuring a NodeBalancer

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.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct