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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.