node.js - NodeJS - Will TCP Net and HTTP Server Both Crash on Error? -
i running nodejs server uses both:
- net tcp server on 1 port (connection telematics hardware devices send data messages server)
- and http server on port (to run web app platform)
these both running through 1 server.js file.
if there error on 1 side, both crash , go down, or other still run independently?
running on aws ec2 ubuntu, using forever module keep alive.
if they're both started under same process (and not have appropriate error handling in place), answer yes. can have code structured want (e.g. tcp server in 1 file , http in another), if servers both started same node process, both go down if process dies due unhandled error
events, uncaught exceptions, stack overflow, out of memory errors, etc.
Comments
Post a Comment