{"action":"opened","issue":{"url":"https://api.github.com/repos/Shopify/toxiproxy/issues/148","repository_url":"https://api.github.com/repos/Shopify/toxiproxy","labels_url":"https://api.github.com/repos/Shopify/toxiproxy/issues/148/labels{/name}","comments_url":"https://api.github.com/repos/Shopify/toxiproxy/issues/148/comments","events_url":"https://api.github.com/repos/Shopify/toxiproxy/issues/148/events","html_url":"https://github.com/Shopify/toxiproxy/issues/148","id":185200002,"number":148,"title":"making sure all connections are subject to a toxic / creating proxy-toxic atomically","user":{"login":"Dieterbe","id":20774,"avatar_url":"https://avatars.githubusercontent.com/u/20774?v=3","gravatar_id":"","url":"https://api.github.com/users/Dieterbe","html_url":"https://github.com/Dieterbe","followers_url":"https://api.github.com/users/Dieterbe/followers","following_url":"https://api.github.com/users/Dieterbe/following{/other_user}","gists_url":"https://api.github.com/users/Dieterbe/gists{/gist_id}","starred_url":"https://api.github.com/users/Dieterbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dieterbe/subscriptions","organizations_url":"https://api.github.com/users/Dieterbe/orgs","repos_url":"https://api.github.com/users/Dieterbe/repos","events_url":"https://api.github.com/users/Dieterbe/events{/privacy}","received_events_url":"https://api.github.com/users/Dieterbe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-25T18:40:43Z","updated_at":"2016-10-25T18:40:43Z","closed_at":null,"body":"Hello again Jacob & co,\r\n\r\nI'm currently seeing something weird with a proxy that has a latency toxic applied to it with toxicity of 1.0, \r\nfor some reason some of the connections that go through it have no latency.\r\n\r\nI've tried a few tactics:\r\n1) doing an update on the toxic. because the code looks like it may apply the latency toxic to all active connections going through a proxy, i need to study the code a bit more. this tactic doesn't seem to work: some connections are still undelayed. \r\n2) execute 3 commands (proxy delete, proxy add, and add toxic to proxy) in sequence from a script, trying to minimize the timeframe between them, \"hopefully\" faster than my application reconnecting. doesn't seem to work: some connections are still undelayed.\r\n\r\nIs 1 supposed to work at all? 2 is obviously racey.\r\nNote: I'm using the latest code in git master.\r\nIs there a better way to solve or diagnose this problem? (idea:  `toxiproxy-cli inspect` could do a dump of connections through a proxy and whether they are in noop or toxic mode)\r\n\r\nwould it make sense to add a mode to toxiproxy-cli to add a proxy and a toxic atomically?  So that as soon as the proxy listens, the toxic is ready to be applied for any new incoming connections?\r\nI maybe be able to contribute such a feature, I would just need some direction on how the code should fit together.\r\nOr is there another/better way to enforce a toxic is applied to all connections through a proxy?\r\n\r\n"}}
{"actor":{"display_login":"Dieterbe"}}