How to catch/record a “Burst” in HAProxy and/or NodeJS traffic

随声附和 提交于 2019-12-13 03:41:31

问题


We have a real-time service, which gets binary messages from different sources (internal and external), then using a couple of NodeJS instances and one HAProxy instance, configured to route TCP traffic, we deliver them to our end-users and different services who consume the messages. HAProxy version is 1.8.14, NodeJS is 6.14.3, both hosted on a CentOS 7 machine.

Now we've got a complex problem with some "burst"s in the outbound interface of HAProxy instance. We are not sure whether the burst is real (e.g. some messages got stuck in Node and then network gets flooded with messages) or the problem is some kind of misconfig or an indirect effect of some other service (Both latter reasons are more likely, as sometimes we get these bursts during midnight, which we have minimal to zero load).

The issue is annoying right now, but it might get critical as it floods our outbound traffic so our real-time services experience a lag or a small downtime during working hours.

My question is, how can we track and record the nature or the content of these messages with minimum overhead? I've been reading through HAProxy docs to find a way to monitor this, which can be achieved by using a Unix socket, but we are worried about a couple of things:

  1. How much is the overhead of using this socket?
  2. Can we track what is going on in the servers using this socket? Or it only gives us stats?
  3. Is there a way to "catch/echo" the contents of these messages, or find out some information about them? with minimum overhead?

Please let me know if you have any questions regarding this problem.

来源:https://stackoverflow.com/questions/53690642/how-to-catch-record-a-burst-in-haproxy-and-or-nodejs-traffic

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!