Logic for active targets list


I am wondering how Kong manages the list of targets for the upstream.

When I request the list of targets for my upstream (/upstreams/{upstream_id}/targets), I get back 3 targets all with Weight 100 which is what I would expect- there are 3 active upstream nodes available. When I request all the targets (/upstreams/{upstream_id}/targets/all) or look in the database I see 9 targets. 3 of these have weight 0 which makes sense given that the docs say that targets are not deleted but rather have the Weight set to 0. However I wonder why there are others with weight 100 still in the list, and why they do show up when requesting the list of active targets?

Deployment is Kong 1.4 + Kubernetes Ingress Controller 0.6.1 running in Kubernetes with Postgres DB.


it is a historic list of changes, so each node can replay the history and create the same balancer in the exact same state (important for consistent hashing). So check the timestamps for each of the targets to see the changes.

1 Like