Already ping bot but bot response slowly

Answered

5 Comments

  • Jay
    Comment actions Permalink

    Hi Chaiwat, 

    Thanks for reaching us. Could you please provide more details regarding the issue you faced?

    > I already ping my bot every 5 sec.

    how do you ping your bot? by sending message or sending ping command through websocket?

    > Bot response slowly when i send message again after 2-3 hours

    which bot are your referring to? Is the bot powered by Chat Conversations API? 
    how do you send message to bot?

    Regards,
    Jay

    0
  • Chaiwat Wongchuen
    Comment actions Permalink

    Hi Jay

    how do you ping your bot? by sending message or sending ping command through websocket?

     I ping bot via websocket by command : updateAgentStatus(status: ONLINE)

    which bot are your referring to? Is the bot powered by Chat Conversations API? 

    Yes, I create bot with Chat Conversations API and web-sdk.js

    Regards

    Chaiwat

     

    0
  • Jay
    Comment actions Permalink

    Hi Chatwat,

    Thanks for the explanations. Please allow me to rephrase the problem.

    So you have a bot running on cloud, which is powered by Chat Conversations API. And you ping our server every 5 seconds by making updateAgentStatus request. After several hours, while you try to send message to the bot (How do you send message? via widget or web sdk ?), It took 10 ~ 30 seconds for the bot to reply the message. 

    Am I understanding the problem correctly? 

    Regards,
    Jay


    0
  • Chaiwat Wongchuen
    Comment actions Permalink

    Hi Jay,

    How do you send message? via widget or web sdk ?

    I use web-sdk.js to send message and you understand the problem correctly.

    Regards,

    Chaiwat

    0
  • Jay
    Comment actions Permalink

    Hi Chaiwat, 

    Thanks for your information. To debug latency issue, it is desirable to understand the interaction sequence. 

    A. You send message via web-sdk.
    B. The message is delivered to chat server. (you can receive ok through callback)
    C. Chat sever is sending that message to the chatbot.
    D. Chatbot receives the message.
    E. Chatbot tries to send the reply to our chat server.
    F. The reply is delivered to chat server (you can receive ok through response).
    G. Chat sever is sending that reply to web-sdk.
    H. web-sdk receives the reply

    In any interval above, there could be some network congestion that slows down the interaction. What I would suggest is that you can benchmark and measure the time frame for each steps to figure out the bottleneck.  Especially the time frame from A to B, B to D, E to F, F to H. 
    This would help a lot since we could have more insights about the issue. 

    Regards,
    Jay



    0

Please sign in to leave a comment.

Powered by Zendesk