20 Controlling HTTP traffic to containers with a reverse proxy

Docker takes care of routing external traffic into your containers, but you can only have one container listening on a network port. It’s fine to use any old ports in your non-production environments--in some chapters of this book we’ve used ten different ports to keep applications separate--but you can’t do that when you go live. You’ll want lots of applications running on a single cluster, but you need them all to be accessible on the standard HTTP and HTTPS ports, 80 and 443.

That’s where a reverse proxy comes in. It’s a critical piece in the architecture of a containerized environment, and in this chapter you’ll learn all about the features it provides and the patterns it enables. ...

Get Learn Docker in a Month of Lunches now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.