Dynamic port mapping has become commonplace, meaning using ports to identify the kind of traffic a user is producing is impossible. But what is dynamic port mapping, and why is it used?
Dynamic port mapping is the process of associating random ports with multiple tasks on a single machine. This allows an individual to run various services off one Amazon ECS instance, for example. The ports are usually randomly assigned when a service is started rather than predefined, hence the name. A reverse proxy or load balancer directs traffic to the correct container. Port mapping is invaluable in Docker-based environments, for instance, this community network system.
In a system like the linked GitHub repository above, a reverse proxy will listen for HTTP traffic on port 80 and HTTPS traffic on port 433. When a reverse proxy receives this traffic, for example Traefik, it will analyse the requested URL and direct this request to the requested services' container.
Comentários