cloud-foundrynetflix-ribbon

Polyglot and Client Side Load Balancing


With the Cloud Foundry Feature, "Polyglot" for integrated Service Discovery and direct communication between service containers through the internal routes, How does the Load Balancing work? Is Cloud Foundry taking care of the Load Balancing? Is there a way to utilize Client Side Load Balancing, something like Ribbon on top of this Polyglot enabled communication?


Solution

  • When you are using container to container networking...

    1. If you connect directly to IP addresses, no load balancing is done.
    2. If you use the platform's DNS based polyglot service discovery, then you will get limited load balancing via round-robin DNS.

    With the polyglot service discovery feature, DNS responses are rotated so that IPs are listed in different orders in the response. You can observe/validate this by doing the following:

    Repeat the last step any number of times. You should see the response from DNS come back with IP addresses in a different order (they are rotated).

    That said, there is nothing to stop you from using a different form of load balancing be that a reverse proxy app you have deployed or something client side like Ribbon.