{"action":"closed","issue":{"url":"https://api.github.com/repos/ipython/ipython/issues/6976","labels_url":"https://api.github.com/repos/ipython/ipython/issues/6976/labels{/name}","comments_url":"https://api.github.com/repos/ipython/ipython/issues/6976/comments","events_url":"https://api.github.com/repos/ipython/ipython/issues/6976/events","html_url":"https://github.com/ipython/ipython/issues/6976","id":49306178,"number":6976,"title":"multiplex channels over a single websocket","user":{"login":"minrk","id":151929,"avatar_url":"https://avatars.githubusercontent.com/u/151929?v=3","gravatar_id":"","url":"https://api.github.com/users/minrk","html_url":"https://github.com/minrk","followers_url":"https://api.github.com/users/minrk/followers","following_url":"https://api.github.com/users/minrk/following{/other_user}","gists_url":"https://api.github.com/users/minrk/gists{/gist_id}","starred_url":"https://api.github.com/users/minrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minrk/subscriptions","organizations_url":"https://api.github.com/users/minrk/orgs","repos_url":"https://api.github.com/users/minrk/repos","events_url":"https://api.github.com/users/minrk/events{/privacy}","received_events_url":"https://api.github.com/users/minrk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ipython/ipython/milestones/21","labels_url":"https://api.github.com/repos/ipython/ipython/milestones/21/labels","id":811827,"number":21,"title":"4.0","description":"IPython 4.0","creator":{"login":"minrk","id":151929,"avatar_url":"https://avatars.githubusercontent.com/u/151929?v=3","gravatar_id":"","url":"https://api.github.com/users/minrk","html_url":"https://github.com/minrk","followers_url":"https://api.github.com/users/minrk/followers","following_url":"https://api.github.com/users/minrk/following{/other_user}","gists_url":"https://api.github.com/users/minrk/gists{/gist_id}","starred_url":"https://api.github.com/users/minrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minrk/subscriptions","organizations_url":"https://api.github.com/users/minrk/orgs","repos_url":"https://api.github.com/users/minrk/repos","events_url":"https://api.github.com/users/minrk/events{/privacy}","received_events_url":"https://api.github.com/users/minrk/received_events","type":"User","site_admin":false},"open_issues":111,"closed_issues":1,"state":"open","created_at":"2014-10-02T18:55:15Z","updated_at":"2015-01-09T19:37:51Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2014-11-18T23:05:25Z","updated_at":"2015-01-09T19:37:51Z","closed_at":"2015-01-09T19:37:51Z","body":"Connecting a frontend to a kernel involves 3 zmq connections. There are various message pattern reasons for this. In the HTML notebook, we turn each zmq connection into a websocket connection. The message pattern differences no longer apply, so we could easily have only one websocket connection from client to server, and let the server multiplex zmq channels onto a single websocket.\r\n\r\nThe costs of the multiple websockets start showing up when there is a proxy in front of one or more notebook servers, such as [tmpnb](https://github.com/jupyter/tmpnb) or  [JupyterHub](https://github.com/jupyter/jupyterhub), because each open notebook page has **6** persistent sockets in the proxy. Running out of FDs in the proxy seems to be the most common first wall hit when scaling any of these services. If only one websocket connection were open, three times as many notebooks could be open at a time behind a given proxy."}}