{"action":"created","issue":{"url":"https://api.github.com/repos/cargomedia/cm-janus/issues/249","repository_url":"https://api.github.com/repos/cargomedia/cm-janus","labels_url":"https://api.github.com/repos/cargomedia/cm-janus/issues/249/labels{/name}","comments_url":"https://api.github.com/repos/cargomedia/cm-janus/issues/249/comments","events_url":"https://api.github.com/repos/cargomedia/cm-janus/issues/249/events","html_url":"https://github.com/cargomedia/cm-janus/issues/249","id":148289814,"number":249,"title":"How service failures should be managed?","user":{"login":"zazabe","id":401598,"avatar_url":"https://avatars.githubusercontent.com/u/401598?v=3","gravatar_id":"","url":"https://api.github.com/users/zazabe","html_url":"https://github.com/zazabe","followers_url":"https://api.github.com/users/zazabe/followers","following_url":"https://api.github.com/users/zazabe/following{/other_user}","gists_url":"https://api.github.com/users/zazabe/gists{/gist_id}","starred_url":"https://api.github.com/users/zazabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zazabe/subscriptions","organizations_url":"https://api.github.com/users/zazabe/orgs","repos_url":"https://api.github.com/users/zazabe/repos","events_url":"https://api.github.com/users/zazabe/events{/privacy}","received_events_url":"https://api.github.com/users/zazabe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-04-14T08:30:04Z","updated_at":"2016-04-14T17:28:17Z","closed_at":null,"body":"What we should do if janus is down for example, like here: https://github.com/cargomedia/janus-gateway-rtpbroadcast/issues/83?\r\n\r\nCurrently, the client will not receive any response when the connection between cm-janus and janus has failed with a `ECONNREFUSED` error, so the client will keep trying to establish a connection with cm-janus... \r\n\r\nSome thoughts:\r\n- after some retries, cm-janus could notify the cm app to stop the show session, with the `maintenance` reason   \r\n  then, the client could redirect the user to a maintenance page for example...   \r\n- should we add a way to keep the connection between the client and cm-janus even if cm-janus is not able to send back the session id?\r\n- the client could have a longer \"timeout\" to wait for the session...\r\n     \r\n@njam @vogdb @tomaszdurka wdyt?"},"comment":{"url":"https://api.github.com/repos/cargomedia/cm-janus/issues/comments/210065298","html_url":"https://github.com/cargomedia/cm-janus/issues/249#issuecomment-210065298","issue_url":"https://api.github.com/repos/cargomedia/cm-janus/issues/249","id":210065298,"user":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T17:28:17Z","updated_at":"2016-04-14T17:28:17Z","body":"> - after some retries, cm-janus could notify the cm app to stop the show session, with the `maintenance` reason then, the client could redirect the user to a maintenance page for example...   \r\n\r\nAgree. Lets make 3 retries. If they didn't succeed, close \"downstream\".\r\n> - should we add a way to keep the connection between the client and cm-janus even if cm-janus is not able to send back the session id?\r\n\r\nI would go here in another direction. cm-janus should have a timeout for all \"upstream\" requests. If timeout exceeds, we do 3 retries. If they fail, we close both connections. That makes client to have timeout that equals 4 cm-janus timeouts.\r\n"}}