Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For a long time I've always run nginx in front of jetty to do load balancing. However, I have a new project where I will be using HAProxy to do the load balancing and was wondering if I should have HAProxy send connections directly to Jetty or if I should have each Jetty instance be behind nginx or another web server.

Specifically I'm wondering if there are any security advantages/disadvantages with either approach.

Should Jetty be "protected" by nginx/apache, or can I essentially expose it to the internet behind the thin proxy of of HAProxy?

share|improve this question
up vote 2 down vote accepted

If you're passing requests directly to Jetty from nginx unaltered, then there is no security benefit to be had.

nginx doesn't change requests in any way that would protect the Jetty service, unless you've added custom configuration or modules to do so.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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