Container Port
Ports
The Ports tab gives you information about managing the ports of your container on the platform.
Here Are The Default Open Ports
- 80, 8080, 8686: These ports handle regular web traffic.
- 4848, 8443, 4901-4910: These ports handle secure web traffic (HTTPS).
- 443: This port also handles secure web traffic, but it’s redirected to regular web traffic (HTTP).
- 4949, 7979: These ports also handle secure web traffic, but they’re redirected to regular web traffic.
Port on SLB | Backend Port | Frontend SSL | Backend SSL |
---|---|---|---|
80, 8080, 8086 | 80 | no | no |
4848 | 4848 | yes | yes |
8443 | 8443 | yes | yes |
4901-4910 | 4901-4910 | yes | yes |
443 | 80 | yes | no |
4949 | 4949 | yes | no |
7979 | 7979 | yes | no |
- Endpoints: This maps a port from inside your container to a random port outside, using the platform’s load balancer.
- Public IP: This gives direct access to all the ports of your container.
Depending on which option you choose, you just need to connect your service (like a website) to the address you get.
Automatic Port Redirection
The platform automatically sends incoming requests to the application inside your container.
When you create a new node, the platform checks which ports are being used for things like SSH, email, and databases. Then, it picks the first available port for your container’s main access point. This means all requests coming in will go to that port.
This happens every time you start your container. So, once your application is deployed, it’s accessible right away through the platform’s Load Balancer without you needing to do anyt class=”ack-ul”hing.
But if you want to turn off this feature or change it (maybe because you’re exposing an admin panel), you can do it when you create your container. Go to the Variables section and add a parameter called JELASTIC_EXPOSE. Here’s how you can set it:
- Set it to 0, DISABLED, or FALSE to turn off auto-redirect.
- Set it to a number between 1 and 65535 to choose a specific port to redirect traffic to.
- If you put any other value, auto-redirect will work like normal.
You can also provide a list of ports using the JELASTIC_PRIORITY_PORTS variable. The platform will check each port one by one and use the first one it finds active. This can make your container start up faster compared to checking all ports for auto-redirect.
Here are some important things to remember:
- If you set a specific port using the JELASTIC_EXPOSE variable, the platform won’t pay attention to the JELASTIC_PRIORITY_PORTS setting.
- If no services are found on the ports listed in JELASTIC_PRIORITY_PORTS, the platform will use the default automatic redirection method.
- If you’re using a NodeJS application server, you can use the REDIRECT_EXCLUDE_PORTS variable to manually choose which ports shouldn’t be redirected. For example, if you don’t want port 80 to be redirected, you can exclude it.
You can adjust your container’s firewall settings if you want even more control over who can access your node.