If nginx have configure load balancing

May I ask if Kong still needs to configure load balancing after nginx configures load balancing?

The short answer is yes. Long answer follows:

Kong is able to redirect traffic from Kong to the upstream servers, but not between the client and Kong.

                No LB                   Kong's LB
client <------------------> Kong <--------------------> Service

Kong provides a set of useful abstractions to deal with this problem - like healthchecks.

  • If you are not interested on these features or you already have your own set of loadbalancing rules in your custom Nginx, you don’t need Kong’s load balancing.
  • If do want some of these features you might want to activate Kong’s load balancing features in addition (or replacing) the

In addition to the previous situation, Kong can be configured to be run as a cluster - several instances of Kong can be instantiated to handle the load coming from the client site.

                               Kong1
client <-------------------->  Kong2 <--------------------------> Service
                               Kong3 

When in cluster mode, Kong can do load balancing on the Kong <-> Service part, but it does not have a built-in load balancer for the client <-> Kong part. You will mandatorily need to add your own load balancer in front of the Kong cluster. This cluster balancer can be an Nginx instance, or something else:

                                     Kong1
client <----------> LB <---------->  Kong2 <------------------> Service
                                     Kong3 

i’ve learned,very thank you !