willesalminen
Mission Specialist
Mission Specialist
  • 783 Views

Just for the curiosity - what is the web server listening on port 8080?

In Section 5.2: Guided Exercise: Externalize the Configuration of Application, I noticed that web UI syntax for Router Target port is a bit confusing. What this really mean: 8080 -> 8080 (TCP)?

image.png

I know the router interface listen on port 80 default. But for the curiosity, I tried URL http://webconfig-rt-storage-configs.apps.ocp4.example.com:8080 and I was surpised to see there was another apache web instance, but the welcome page wasn't the same than in http://webconfig-rt-storage-configs.apps.ocp4.example.com. And of course lab modifications didn't impact to that site either.

This is not related to lab directly, but what is this server, and why traffic was allowed to it? Or have I done mistake in lab configuration?

image.png

Thanks!

11 Replies
  • 35 Views

While I am not familiar with where this scenario occurs, I think this has something to do with Reverse Proxies. The first proxy (just a machine with some sort of a webserver configured, such as Nginx or Apache) can create listeners on any of the available ports. These listeners can refer to various resources such as files on the host's drive, redirects or also proxy traffic to another IP address (or sockets sometimes). So in the above case, it seems like the "route" proxies traffic on port 8080 to another "service" (I believe this is another reverse proxy but could easily refer to a pod)  which is serving traffic on port 8080. What is being served on port 8080 is internal to the service but to the outside world the route is just a mapping between the host's port(s) to another service's port(s).

0 Kudos
  • 28 Views

The target port is the port on the Pod where the application or service is actually listening. When a Service receives traffic, it forwards that traffic to the target port on the Pods it selects. This port is defined in the Pod's container specification.

For example, if a container is running a web server on port 8080, the target port would be 8080.

0 Kudos
Join the discussion
You must log in to join this conversation.