I am planning on running both a Java web app (www.example.com) and a wordpress blog (www.example.com/blog) on the same domain.
Tomcat server serves my Java web app content and Apache server serves the WordPress content.
Originally, I was going to use a proxy server to route all blog request to the Apache server and all other requests to Tomcat (http://tomcat.apache.org/tomcat-8.0-doc/proxy-howto.html) (I'm not sure exactly how I would implement since I haven't done it yet).
However, I was recently made aware of AWS Application Load Balancer. Using the LB I can route requests to specific ports based on the url path and thus I can use it to route all www.example.com/blog requests to the Apache Server (on port 80) and all www.example.com requests to the Tomcat server (port 8080).
Is there any reason why I shouldn't do this? Since Application Load Balancer is a relatively new product, most of the documentation recommends the proxy server solution, but I see no reason why not to use the Application Load Balancer solution instead.
Thank you.
While the Application Load Balancer is a great addition to the AWS product suite, there are some things (currently) you can do with a reverse proxy that you can't with an ALB - your choice will depend on what your situation requires.
Generally speaking, ALB will be fine for simpler configurations, but the proxy gives you more control and flexibility if you have more complex rules/needs.
Things you can do with a Proxy you can't with an ALB
Things that are easier with ALB over a Proxy
Nginx has published a comparison here - the list above was based on my opinion of the important points - Nginx obviously has their own biases, but it is worth reviewing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With