Sorry if this is the wrong section for this, but I didn’t see one that made more sense.
I am switching the infrastructure of the company I work for over to micro-services using Docker. And for the most part I think I understand how to accomplish that. But I am confused about a few key pieces.
I have been reading a lot of articles and what not about docker, and I understand the basics and have created a container and everything. But I am really confused about like how networking containers together works.
So let’s say I have 3 containers: a frontend container, a users container, and a payments container. Users & Payments are both just APIs that the frontend interacts with. The front end is just an AngularJS application.
So my issue is, how would you network all of the containers so that they could scale independently? I assume you would have a load balancer of some sort, where like users.example.com gets routed to the Users container. Same for payments?
I understand you can expose ports and these get dynamically created on the host. Let’s say there are 2 hosts (each host has 2 user containers running on it), for simplicity’s sake we will say they are in the same datacenter. So users.example.com would route to lets say these 4 places: 192.168.1.2:1234, 192.168.1.2:8523, 192.168.1.3:5621, 192.168.1.3:3741
is that basically how it would work? The load balancer would be responsible for the scalability of each micro-service independently?
Sorry this is kinda long & confusing. I have a lot more questions, but I will try and keep them related so I can get clear answers to each one.