Rate limiting plugin is not working as expected with nginx as load balancer

hi ,

i am using kong 2.0.1 DB less version. And recently i applied ratelimiting plugin on my upstream services.
below is i have done

  1. enabled plugin for each service( ex: one service - 4 Requests per minute)
  2. setup a load balancer(nginx) to verify with different client_ip’s.
  3. whn i try to access my environment with load balancer with 2 client_ip’s every time " kong.client.get_forwarded_ip() is getting remote address. so we can not able to verify with 2 client ip’s.

what i am expecting is with 2 clinet ip’s per minute each ip should get 4 RPM. that is not happening.
anything i am missing in my configuration?
Please help here.

this is my configuration

  • name: rate-limiting
    minute: 4
    policy: local
    hour: 100000
    limit_by: service