Reverse Proxy Java

F.O.O picture F.O.O · Aug 25, 2014 · Viewed 13.6k times · Source

I am working with a Java web application and I would like to have a reverse proxy masking some of my internal endpoints.

Requirements
1. The reverse proxy maps need to be modifiable at runtime e.g if we move some components to another server we should be able to modify the mapping such that new requests are routed to this endpoint.
2. This must be embeddable to a standard servlet container like Jetty.

Most of the Java Reverse Proxies out there such as J2EP require mapping information available prior to starting the application.

Answer

Andrejs picture Andrejs · Feb 2, 2017

Undertow provides an embeddable reverse proxy server that can be changed programatically at runtime.

If you want to operate at a higher level via an API then there is Backflow. It supports adding/removing proxy backends using REST calls.