Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
Marco_Vank #1
Member since Aug 2015 · 8 posts
Group memberships: Members
Show profile · Link to this post
Subject: High traffic to single user
Hi,

In our system (which isn't a chat-application) we're sending messages from a couple of thousand xmpp users (senders) to a single xmpp user (receiver). This receiver-user then sends a response back to the sender.
There are a couple of thousand message per minute send to this receiver and it therefor also send a couple of thousand responses back to the senders.

We're seeing some delays in timing when the messages are received by the receiver. Using WireShark we saw that the messages were received on the network adapter of the receiver immediately after the sender send it, but there's some delay before the OnMessage event is triggered. The XmppClient is inside a singleton wrapper, with OnMessage event attached. The sending of the response is triggered on this singleton from within another thread. The sending of the response seems to be immediately received by the sender user so it looks like the delay is only with the OnMessage receiving part.

Do you have any guidance or samples about what the best way to implement the XmppClient with this high load?
Thanks in advance!
Avatar
Alex #2
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
MatriX does not delay anything internal. Have you checked if your server is throttling the connections?
May servers come with with a configuration out o the box which is optimized for "normal chat usage" and gives a single user only a limited amount of bandwidth.

Quote by Marco_Vank:
Do you have any guidance or samples about what the best way to implement the XmppClient with this high load?

no we don't have something like that. In general there is nothing different whether the load is low or high.

A XMPP client is always using 1 TCP connection, so its first in first out for all stanzas. So until one message handler is processed in your code, MatriX can of course not fire the next message to you. It it possible that you code blocks MatriX here? If this is the case then you could just put all the messages from your OnMessage handler to a stack and let your code pickup and process them from there.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS