{"action":"created","issue":{"url":"https://api.github.com/repos/marcosbarbero/spring-cloud-zuul-ratelimit/issues/119","repository_url":"https://api.github.com/repos/marcosbarbero/spring-cloud-zuul-ratelimit","labels_url":"https://api.github.com/repos/marcosbarbero/spring-cloud-zuul-ratelimit/issues/119/labels{/name}","comments_url":"https://api.github.com/repos/marcosbarbero/spring-cloud-zuul-ratelimit/issues/119/comments","events_url":"https://api.github.com/repos/marcosbarbero/spring-cloud-zuul-ratelimit/issues/119/events","html_url":"https://github.com/marcosbarbero/spring-cloud-zuul-ratelimit/issues/119","id":368034023,"node_id":"MDU6SXNzdWUzNjgwMzQwMjM=","number":119,"title":"Rate limitting depending on the number of calls for the user?","user":{"login":"Paxon96","id":34622073,"node_id":"MDQ6VXNlcjM0NjIyMDcz","avatar_url":"https://avatars2.githubusercontent.com/u/34622073?v=4","gravatar_id":"","url":"https://api.github.com/users/Paxon96","html_url":"https://github.com/Paxon96","followers_url":"https://api.github.com/users/Paxon96/followers","following_url":"https://api.github.com/users/Paxon96/following{/other_user}","gists_url":"https://api.github.com/users/Paxon96/gists{/gist_id}","starred_url":"https://api.github.com/users/Paxon96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Paxon96/subscriptions","organizations_url":"https://api.github.com/users/Paxon96/orgs","repos_url":"https://api.github.com/users/Paxon96/repos","events_url":"https://api.github.com/users/Paxon96/events{/privacy}","received_events_url":"https://api.github.com/users/Paxon96/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-09T04:13:02Z","updated_at":"2018-10-09T12:45:34Z","closed_at":null,"author_association":"NONE","body":"Hi. \r\nI have already written at http://blog.marcosbarbero.com/spring-cloud-netflix-zuul-rate-limit/. And as I sad, I need to rate limitting be depending on the number of calls for the user and not for the entire service.\r\nAs I understand, type: - user should work, but it does not really work.\r\nAny ideas or suggestions? Or maybe I misunderstood this property :c\r\n\r\nMy property:\r\n```\r\nzuul:\r\n  #ignoredServices: '*'\r\n  debug:\r\n    request: true\r\n  prefix: /some/endpoint\r\n  ratelimit:\r\n    enabled: true\r\n    repository: CONSUL\r\n    behind-proxy: true\r\n    default-policy-list:\r\n    - limit: 10 #optional - request number limit per refresh interval window\r\n      quota: 60 #optional - request time limit per refresh interval window (in seconds)\r\n      refresh-interval: 30 #default value 60 (in seconds)\r\n    policy-list:\r\n      MyServiceID:\r\n      - limit: 10 #optional - request number limit per refresh interval window\r\n        quota: 60 #optional - request time limit per refresh interval window (in seconds)\r\n        refresh-interval: 30 #default value (in seconds)\r\n        type: #optional\r\n        - user\r\n        - origin\r\n        - url=/endpoint1\r\n      - limit: 10 #optional - request number limit per refresh interval window\r\n        quota: 60 #optional - request time limit per refresh interval window (in seconds)\r\n        refresh-interval: 30 #default value (in seconds)\r\n        type: #optional\r\n        - user\r\n        - origin\r\n        - url=/endpoint2\r\n```"},"comment":{"url":"https://api.github.com/repos/marcosbarbero/spring-cloud-zuul-ratelimit/issues/comments/428177501","html_url":"https://github.com/marcosbarbero/spring-cloud-zuul-ratelimit/issues/119#issuecomment-428177501","issue_url":"https://api.github.com/repos/marcosbarbero/spring-cloud-zuul-ratelimit/issues/119","id":428177501,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODE3NzUwMQ==","user":{"login":"lchayoun","id":10900826,"node_id":"MDQ6VXNlcjEwOTAwODI2","avatar_url":"https://avatars1.githubusercontent.com/u/10900826?v=4","gravatar_id":"","url":"https://api.github.com/users/lchayoun","html_url":"https://github.com/lchayoun","followers_url":"https://api.github.com/users/lchayoun/followers","following_url":"https://api.github.com/users/lchayoun/following{/other_user}","gists_url":"https://api.github.com/users/lchayoun/gists{/gist_id}","starred_url":"https://api.github.com/users/lchayoun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lchayoun/subscriptions","organizations_url":"https://api.github.com/users/lchayoun/orgs","repos_url":"https://api.github.com/users/lchayoun/repos","events_url":"https://api.github.com/users/lchayoun/events{/privacy}","received_events_url":"https://api.github.com/users/lchayoun/received_events","type":"User","site_admin":false},"created_at":"2018-10-09T12:45:34Z","updated_at":"2018-10-09T12:45:34Z","author_association":"COLLABORATOR","body":"Just to clarify things, rate limit is not shared between services.\r\n\r\nIf you want to limit just by the user just remove the 'origin' and the 'url' from the type list.\r\n\r\nThat being said, putting a limit of 10 on the user in the default list will enforce 10 requests in the refresh interval per service."}}
{"actor":{"display_login":"lchayoun"}}