node.js - How to protect the nodejs websocket process, in addition to making the code more rigorous
天蓬老师
天蓬老师 2017-05-16 13:37:34
0
1
807

Nodejs is a single process. The general method is to use a daemon process. As far as I know, there is a nodemon library that will be automatically opened when the machine is down. However, this method is not applicable to websockets. Even if the daemon process is restarted, the previous socket will be no longer available. It crashes. Although the server is guaranteed to be normal, it still affects the user experience. Should we try to catch all possible problems? If a third-party library is called in the socket, this method of plugging the loophole seems impossible to execute perfectly.

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
过去多啦不再A梦

At this time, the client also needs to have a local cache of reconnection and key information. Other information that needs to be maintained can be cached on the server at any time

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template