Why should a Java – 12 factor application be self-contained?

In the 12 factor article on Port Binding

Solution

To understand the rules for port binding and self-contained applications, it is helpful to look at the content from the perspective of a platform designed to run 12 factor applications, such as heroku or DEIS

These platforms are extending applications at the process level When the process is scaled up, the platform tries to put these additional staff behind the routing grid so that they can start providing traffic If the application is not self-contained and uses mod, for example_ JK is tightly coupled to the front-end Apache server – it cannot be extended by running more isolated worker processes

Port binding exists to solve the "port proxy" problem at the platform level If each application worker listens on port 80, a conflict occurs To solve this problem, port binding is a convention by which an application listens for the port assigned by the platform - and passes it in as a $port environment variable This ensures that a) the application worker listens on the correct port and b) the platform knows where to route traffic to the worker

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>