After a (shortish) exchange with @revant_one recently, I looked up some technical details about the socket.io protocol and (just a minute ago!) posted some additions to the frappe_docker FAQ which you can read here (e.g. the last paragraph):
The namespace which socketio etc. talks about is not the name of your site. You seem to conflate the two, but they are very different things.
The namespace of socketio communications is a channel which is part of the data transported over the socketio http path, but not part of the http URI, even if the URI part technically could be the same as a namespace in certain cases.
The closing of the socketio communication is a required feature if the namespace presented doesn’t exist on the socketio server.
The namespace of the socketio communication is more like a grouping of communications, e.g. like a telegram or Raven channel or so.
Edit: The ws(s):// protocol is a confusing protocol. It is not http, but kind of piggybacks on http, using the underlying TCP connection but forking out of http at the moment of the WS connection establishment, while being designed to be compatible with http and its routing. So, in order to get the routing right, you need to know quite some networking, how nginx routes it’s stuff, and how the WS protocol is used in practice, e.g. the API of the relevant libraries. Additional, terminology can change from one protocol to the next built on top. So the “http URI” I mentionend above does not really make sens. The path also is called multiplexer, but then called namespace (which makes sens), but what path is it really? Is it the hostname? Well, maybe, and it depends. No wonder routing in through nginx frontend (getting the proxy configuration right for a “funny” protocol being only “kind of” http, having a path, but that path being part of WS and not HTTP although it looks like it) and over linux’s cgroups borders (which docker uses) into the app with its node WS server and its WSGI python server is not easy and people (me included) struggle with it.