Optimize web-socket server