Node.js app has periodic slowness and/or timeouts (does not accept incoming requests)

前端 未结 7 462
眼角桃花
眼角桃花 2021-01-30 02:08

This problem is killing the stability of my production servers.

To recap, the basic idea is that my node server(s) sometimes intermittently slow down, sometimes resultin

7条回答
  •  北恋
    北恋 (楼主)
    2021-01-30 03:02

    If you need to get this working now, you can go the NASA redundancy route:

    Bring up a second copy of your production servers, and put a proxy in front of them which routes each request to both stacks and returns the first response. I don't recommend this as a perfect long-term solution but it should help significantly reduce issues in production now, and help you gather log data that you could replay to recreate the issues on non-production servers.

    Obviously, this is straight-forward for read requests, but more complex for commands which write to the db.

提交回复
热议问题