I’m using kong(1.1) containerized on a 3 node docker swarm cluster(service scaled=3), with an azure Application Gateway in front of it. With the kong rate-limiting plugin enabled, the hits are being counted as from the docker swarm internal load balancer(or the Azure App gateway), any suggestions on how I enable kong to count the real ip and not either of the load balancers
You need to configure your Load-balancer to forward the real IP address in the
x-forwarded headers or using the proxy protocol.
Once you’ve that you need to configure Kong to read those headers. You need to set trusted_ips setting for that: