4. Load Balancing with Zuul

When Zuul receives a request, it picks up one of the physical locations available and forwards requests to the actual service instance. The whole process of caching the location of the service instances and forwarding the request to the actual location is provided out of the box with no additional configurations needed.

Here, we can see how Zuul is encapsulating three different instances of the same service:

Internally, Zuul uses Netflix Ribbon to look up for all instances of the service from the service discovery (Eureka Server).

Let’s observe this behavior when multiple instances are brought up.

4.1. Registering Multiple Instances

We’ll start by running two instances (8081 and 8082 ports).

Once all the instances are up, we can observe in logs that physical locations of the instances are registered in DynamicServerListLoadBalancer and the route is mapped to Zuul Controller which takes care of forwarding requests to the actual instance:

You wrote, that Zuul does server-side load-balancing and uses Ribbon internally to do load-balancing. As far as I know does Ribbon client-side load balancing. So, which is correct?

We want to use Zuul (with server-side load-balancing) and now we are looking for a service registry, that uses Third-Party registration pattern. As Eureka uses Self-Registration, is there an alternative for that?