{"action":"created","issue":{"url":"https://api.github.com/repos/cloudfoundry/cloud_controller_ng/issues/1161","repository_url":"https://api.github.com/repos/cloudfoundry/cloud_controller_ng","labels_url":"https://api.github.com/repos/cloudfoundry/cloud_controller_ng/issues/1161/labels{/name}","comments_url":"https://api.github.com/repos/cloudfoundry/cloud_controller_ng/issues/1161/comments","events_url":"https://api.github.com/repos/cloudfoundry/cloud_controller_ng/issues/1161/events","html_url":"https://github.com/cloudfoundry/cloud_controller_ng/issues/1161","id":331259742,"node_id":"MDU6SXNzdWUzMzEyNTk3NDI=","number":1161,"title":"Calls to /v3 count on rate_limiter.unauthenticated_limit","user":{"login":"stephanme","id":1076668,"node_id":"MDQ6VXNlcjEwNzY2Njg=","avatar_url":"https://avatars3.githubusercontent.com/u/1076668?v=4","gravatar_id":"","url":"https://api.github.com/users/stephanme","html_url":"https://github.com/stephanme","followers_url":"https://api.github.com/users/stephanme/followers","following_url":"https://api.github.com/users/stephanme/following{/other_user}","gists_url":"https://api.github.com/users/stephanme/gists{/gist_id}","starred_url":"https://api.github.com/users/stephanme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephanme/subscriptions","organizations_url":"https://api.github.com/users/stephanme/orgs","repos_url":"https://api.github.com/users/stephanme/repos","events_url":"https://api.github.com/users/stephanme/events{/privacy}","received_events_url":"https://api.github.com/users/stephanme/received_events","type":"User","site_admin":false},"labels":[{"id":371017947,"node_id":"MDU6TGFiZWwzNzEwMTc5NDc=","url":"https://api.github.com/repos/cloudfoundry/cloud_controller_ng/labels/in%20progress","name":"in progress","color":"3461AD","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-11T16:25:31Z","updated_at":"2018-06-19T17:19:02Z","closed_at":null,"author_association":"NONE","body":"## Issue\r\n\r\nCalls to /v3 count on rate_limiter.unauthenticated_limit in contrast to calls to \"/\" and \"/v2/info\".\r\n\r\n## Context\r\n\r\ncf-deployment 1.38.0\r\ncapi-release  1.59.0\r\n\r\nWe saw sporadic 429 responses from cloud controller in our pipelines after we upgraded from cf cli 6.36.1 to 6.37.0.\r\nIt turned out that they are related to /v3 calls that were introduced by cf cli 6.37.0 (at least we did not see these calls for our cf cli usage with cf cli 6.36.1).\r\n\r\n## Steps to Reproduce\r\n\r\n````\r\ncurl -v https://api.cf.stagingsc7.hanavlab.ondemand.com/v3\r\n*   Trying 157.133.112.73...\r\n* Connected to api.cf.stagingsc7.hanavlab.ondemand.com (157.133.112.73) port 443 (#0)\r\n...\r\n> GET /v3 HTTP/1.1\r\n> Host: api.cf.stagingsc7.hanavlab.ondemand.com\r\n> User-Agent: curl/7.47.0\r\n> Accept: */*\r\n>\r\n< HTTP/1.1 429 Too Many Requests\r\n< Content-Length: 89\r\n< Content-Type: text/plain; charset=utf-8\r\n< Date: Mon, 11 Jun 2018 15:55:49 GMT\r\n< Retry-After: 1528733269\r\n< Server: nginx\r\n< X-Ratelimit-Limit: 500\r\n< X-Ratelimit-Remaining: 0\r\n< X-Ratelimit-Reset: 1528733269\r\n< X-Vcap-Request-Id: 1837f05c-04fa-4830-43fe-bcd0a1030029::1cfd82cd-6266-4ee4-8927-65373f4e2caf\r\n<\r\n* Connection #0 to host api.cf.stagingsc7.hanavlab.ondemand.com left intact\r\n{\"errors\":[{\"detail\":\"Rate Limit Exceeded\",\"title\":\"CF-RateLimitExceeded\",\"code\":10013}]}\r\n````\r\n\r\nA similar call to / doesn't return X-Ratelimit headers:\r\n\r\n````\r\ncurl -v https://api.cf.stagingsc7.hanavlab.ondemand.com\r\n* Rebuilt URL to: https://api.cf.stagingsc7.hanavlab.ondemand.com/\r\n*   Trying 157.133.112.73...\r\n* Connected to api.cf.stagingsc7.hanavlab.ondemand.com (157.133.112.73) port 443 (#0)\r\n...\r\n> GET / HTTP/1.1\r\n> Host: api.cf.stagingsc7.hanavlab.ondemand.com\r\n> User-Agent: curl/7.47.0\r\n> Accept: */*\r\n>\r\n< HTTP/1.1 200 OK\r\n< Content-Length: 1108\r\n< Content-Type: application/json;charset=utf-8\r\n< Date: Mon, 11 Jun 2018 15:55:41 GMT\r\n< Server: nginx\r\n< X-Content-Type-Options: nosniff\r\n< X-Vcap-Request-Id: f85c3a95-4d46-4f71-7b5a-c4458c80b252::97fb3fee-09e9-475b-8881-b9a172d056fe\r\n<\r\n{\r\n  \"links\": {\r\n    \"self\": {\r\n      \"href\": \"https://api.cf.stagingsc7.hanavlab.ondemand.com\"\r\n    },\r\n    \"cloud_controller_v2\": {\r\n      \"href\": \"https://api.cf.stagingsc7.hanavlab.ondemand.com/v2\",\r\n      \"meta\": {\r\n        \"version\": \"2.113.0\"\r\n      }\r\n    },\r\n    \"cloud_controller_v3\": {\r\n      \"href\": \"https://api.cf.stagingsc7.hanavlab.ondemand.com/v3\",\r\n      \"meta\": {\r\n        \"version\": \"3.48.0\"\r\n      }\r\n    },\r\n  ...  \r\n  }\r\n````\r\n\r\n## Expected result\r\n\r\nCalls to /v3 don't count against the unauthenticated_limit, there are no X-Ratelimit headers and no 429 response code. Similar to a call to /.\r\n\r\n## Current result\r\n\r\n429 and X-Ratelimit headers. See above.\r\n"},"comment":{"url":"https://api.github.com/repos/cloudfoundry/cloud_controller_ng/issues/comments/398477544","html_url":"https://github.com/cloudfoundry/cloud_controller_ng/issues/1161#issuecomment-398477544","issue_url":"https://api.github.com/repos/cloudfoundry/cloud_controller_ng/issues/1161","id":398477544,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODQ3NzU0NA==","user":{"login":"ericpromislow","id":108392,"node_id":"MDQ6VXNlcjEwODM5Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/108392?v=4","gravatar_id":"","url":"https://api.github.com/users/ericpromislow","html_url":"https://github.com/ericpromislow","followers_url":"https://api.github.com/users/ericpromislow/followers","following_url":"https://api.github.com/users/ericpromislow/following{/other_user}","gists_url":"https://api.github.com/users/ericpromislow/gists{/gist_id}","starred_url":"https://api.github.com/users/ericpromislow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericpromislow/subscriptions","organizations_url":"https://api.github.com/users/ericpromislow/orgs","repos_url":"https://api.github.com/users/ericpromislow/repos","events_url":"https://api.github.com/users/ericpromislow/events{/privacy}","received_events_url":"https://api.github.com/users/ericpromislow/received_events","type":"User","site_admin":false},"created_at":"2018-06-19T17:19:02Z","updated_at":"2018-06-19T17:19:02Z","author_association":"MEMBER","body":"Thanks for the information. I'll talk to the CLI team about this. Could make a good case for excluding the /v3 endpoint from rate-limiting"}}
{"actor":{"display_login":"ericpromislow"}}