I'm using haproxy 1.4.22 (latest stable), and i guess i don't need round-robin balancing here, as there is only a single sockjs backend.
I don't have a specific ACL for this sockjs-tornado server, as it also has some other simple RequestHandlers. Basically, I just say:
default_backend www
and all requests (both https requests and sockjs msgs) go to this sockjs backend. Is that right?
One more details (if it matters), in the front-end js code, I'm trying to send this kind of msg:
conn.onopen = function() {
console.log("connected");
// send WAIT_MSG
var wait_msg = JSON.stringify({"id": 101, "content": "blahblahblah"});
conn.send(wait_msg);
console.log("WAIT_MSG sent");
};
I've tried enabling the debugging log like this:
if __name__ == "__main__":
options.parse_command_line()
logging.getLogger().setLevel(logging.DEBUG)
http_server = tornado.httpserver.HTTPServer(Application())
http_server.listen(options.port)
tornado.ioloop.IOLoop.instance().start()
But still don't see anything except for the initial connection information in the log. After the above js code sent the msg, nothing is received by on_message(self, msg) method in sockjs-tornado, and no other error appears.