What are the possible bugs that cause slow response (sometimes but not all the time) for a websocket connection?

297 views Asked by At

I know my question's topic is too broad. Please ask on anything that can help you find my question more answerable.

CONTEXT: The web architecture is like the following description:

  • A front-end view generated by Django View, accessible through ngInx server. The javascript is responsible for send/receive data to/from web socket app.
  • A web socket app written in python that makes use of uwsgi server as its communication protocol.
  • The web socket app communicates with a remote server(C++) using topics and rabbitMQ.
  • The data is serialized using protobuf.
  • Version: Django 1.7.7, Python 2.7.5, rabbitMQ 3.4.4, nginx 1.6.2 and uwsgi 2.0.10

PROBLEM: Right now I'm facing a bug that is very nightmarish in the sense that it is hard to find out the bug's root cause, it happens during production and does not always appear. Sometimes the web socket is responding very slow (1 or 2 minutes) when the user clicks on buttons while the rest of the time the response time is in milliseconds.

I suspect that the bug is due to configuration of the architecture rather than the code itself since the bug only appears sometimes. Also, I can edit the question to add in code if you think I need to. The front-end has a heartbeat back-and-forth connection with the websocket app so internet connection is ruled out. Any idea on how to debug this?

Thank for reading this question. :)

0

There are 0 answers