{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/17685","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/17685/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/17685/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/17685/events","html_url":"https://github.com/ansible/ansible/issues/17685","id":178353588,"number":17685,"title":"Add Bandwidth Throttling to module_utils/urls.py","user":{"login":"exodusftw","id":10988256,"avatar_url":"https://avatars.githubusercontent.com/u/10988256?v=3","gravatar_id":"","url":"https://api.github.com/users/exodusftw","html_url":"https://github.com/exodusftw","followers_url":"https://api.github.com/users/exodusftw/followers","following_url":"https://api.github.com/users/exodusftw/following{/other_user}","gists_url":"https://api.github.com/users/exodusftw/gists{/gist_id}","starred_url":"https://api.github.com/users/exodusftw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exodusftw/subscriptions","organizations_url":"https://api.github.com/users/exodusftw/orgs","repos_url":"https://api.github.com/users/exodusftw/repos","events_url":"https://api.github.com/users/exodusftw/events{/privacy}","received_events_url":"https://api.github.com/users/exodusftw/received_events","type":"User","site_admin":false},"labels":[{"id":437720635,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.1","name":"affects_2.1","color":"5319e7","default":false},{"id":48457795,"url":"https://api.github.com/repos/ansible/ansible/labels/feature_idea","name":"feature_idea","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-21T13:53:26Z","updated_at":"2016-12-30T15:59:27Z","closed_at":null,"body":"##### ISSUE TYPE\n- Feature Idea\n##### COMPONENT NAME\n\nmodule_utils/urls.py\n##### ANSIBLE VERSION\n\n```\nansible 2.1.0.0\n```\n##### OS / ENVIRONMENT\n\nN/A\n##### SUMMARY\n\nWould like the ability to set bandwidth limiting/throttling on modules that use the various methods provided in urls.py, namely fetch_url. This would be handy for the maven_artifact, get_url, etc. modules.\n##### STEPS TO REPRODUCE\n\n<!---\nFor new features, show how the feature would be used.\n-->\n\n```\n# Download JUnit 4.11 from Maven Central\n- maven_artifact:\n  args:\n    group_id: junit\n    artifact_id: junit\n    version: 4.11\n    dest: /tmp/junit-4.11.jar\n    bandwidth: 100kb\n\n- name: download foo.conf\n  get_url:\n    url: http://example.com/path/file.conf\n    dest: /etc/foo.conf\n    mode: 0440\n    limit: 100kb\n```\n##### EXPECTED RESULTS\n\nProposing support in module_utils/urls.py for throttling the retrieval of HTTP resources to prevent exceeding the specified bandwidth - obviously, this would also require modifications to the core/extras module to support either a `bandwidth` or `limit` parameter\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/269787603","html_url":"https://github.com/ansible/ansible/issues/17685#issuecomment-269787603","issue_url":"https://api.github.com/repos/ansible/ansible/issues/17685","id":269787603,"user":{"login":"pilotmattk","id":19537766,"avatar_url":"https://avatars.githubusercontent.com/u/19537766?v=3","gravatar_id":"","url":"https://api.github.com/users/pilotmattk","html_url":"https://github.com/pilotmattk","followers_url":"https://api.github.com/users/pilotmattk/followers","following_url":"https://api.github.com/users/pilotmattk/following{/other_user}","gists_url":"https://api.github.com/users/pilotmattk/gists{/gist_id}","starred_url":"https://api.github.com/users/pilotmattk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pilotmattk/subscriptions","organizations_url":"https://api.github.com/users/pilotmattk/orgs","repos_url":"https://api.github.com/users/pilotmattk/repos","events_url":"https://api.github.com/users/pilotmattk/events{/privacy}","received_events_url":"https://api.github.com/users/pilotmattk/received_events","type":"User","site_admin":false},"created_at":"2016-12-30T15:59:27Z","updated_at":"2016-12-30T15:59:27Z","body":"Serial or even reducing fork count works if the weak link is the outbound connection.   It does not protect a low bandwidth connection in Mexico or China.   Ansible get_url or maven_artifact will absolutely bury the site pulling artifacts (making it nearly unreachable for other business).   yum (package module) is OK as it already has throttling in yum.cfg.    Additionally, for a 50K node deploy, serial is super impactful (slow) at something like 200 or 500 forks.  strategy: free is actually really sweet after an initial canary/pilot.   \r\n\r\nWe have implemented rudimentary throttling by wrapping wget in a custom module.  Another idea is to throttle upstream via proxy (a local apache based proxy at each site is even on the table).   This may be something we can contribute to upstream once there is an interim/minimum viable solution in place.   Socket level programming in Python isn't something I've accomplished... yet."}}
{"actor":{"display_login":"pilotmattk"}}