Mobile app version of vmapp.org
Login or Join
Michele947

: Reasons for putting an application platform behind a web server Application platforms like Node.js and Tomcat can bind to port 80 and serve external requests directly. Alternatively, these application

@Michele947

Posted in: #Apache #Lighttpd #NodeJs

Application platforms like Node.js and Tomcat can bind to port 80 and serve external requests directly.

Alternatively, these application platforms bind to a local port (like Tomcat's 8080) that is not exposed to external calls. A web server - like Apache or Lighttpd - proxy external requests from the web to the internal application platforms.

What are the reasons for adding a web server between the application platform and the external web?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Michele947

1 Comments

Sorted by latest first Latest Oldest Best

 

@Samaraweera270

There are quite a few reasons to do this, but I'll touch on two: scalability and availability.

Scalability: You may choose to reverse proxy your web-app so you can add more than one instance of your application. For instance, if you have 1 node process running on port 5000 but are using Apache/Lighttpd/Nginx/etc to route requests from port 80 to this resource bound to the local port you could start another instance on 5001, 5002, etc and then Load Balance (LB) these requests across each node process all via port 80. As your application grows, you could start to separate these functions into their own physical/virtual servers with little to no downtime.

Availability: Tied to our first example, if you have multiple node instances running (ports 500x) and need to do an update you could take one instance out of the LB pool at a time; update the server/code and re-add it to the LB pool.

Like I say, these are two of the main reasons (I'm sure some security folks could touch on benefits there) but I'm sure there are more. I'd suggest Googleing and reading posts related to high availability to learn more about how and why we do this.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme