[ejabberd] Reduce connection(authentication) time on slow networks (EDGE)

Gaurav Jain monkeyfdude at gmail.com
Mon Nov 14 04:44:29 MSK 2016


Hi,

I ran a test on iOS simulator on mac with Network Link Conditioner with
"EDGE" profile

Downlink (Bandwidth): 240kbs
Uplink (Bandwidth): 200kbps.

I observe extremely slow connection/authentication time ranging from 15 to
45 secs.

Is there a way I can reduce connection establishment time? Please provide
pointers.

I have pasted the client logs below.

------------------------------------------------iOS Simulator
LOGS-----------------------------

2016-11-13 17:24:05:397  SEND: <?xml version='1.0'?>

2016-11-13 17:24:05:398  SEND: <stream:stream xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams' version='1.0' to='
dev.example.com'>

2016-11-13 17:24:08:696  RECV: <stream:stream xmlns="jabber:client"
xmlns:stream="http://etherx.jabber.org/streams" id="" from="dev.example.com"
version="1.0" stream1:lang="en"/>

2016-11-13 17:24:11:535  RECV: <stream:features xmlns:stream="
http://etherx.jabber.org/streams"><c xmlns="http://jabber.org/protocol/caps"
hash="sha-1" node="http://www.process-one.net/en/ejabberd/"
ver=""/><register xmlns="http://jabber.org/features/iq-register"/><starttls
xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><mechanisms
xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>SCRAM-SHA-1</mechanism><mechanism>PLAIN</mechanism><mechanism>X-OAUTH2</mechanism></mechanisms></stream:features>

2016-11-13 17:24:11:536  SEND: <starttls
xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>

2016-11-13 17:24:13:667  RECV: <proceed
xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>

2016-11-13 17:24:13:667  SEND: <stream:stream xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams' version='1.0' to='
dev.example.com'>

2016-11-13 17:24:27:824  RECV: <stream:stream xmlns="jabber:client"
xmlns:stream="http://etherx.jabber.org/streams" id="" from="dev.example.com"
version="1.0" stream1:lang="en"/>

2016-11-13 17:24:27:841  RECV: <stream:features xmlns:stream="
http://etherx.jabber.org/streams"><c xmlns="http://jabber.org/protocol/caps"
hash="sha-1" node="http://www.process-one.net/en/ejabberd/"
ver="AnudLoQ6YzangFOMngKxYf3sht0="/><register xmlns="
http://jabber.org/features/iq-register"/><mechanisms
xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>SCRAM-SHA-1</mechanism><mechanism>PLAIN</mechanism><mechanism>X-OAUTH2</mechanism></mechanisms></stream:features>

2016-11-13 17:24:27:842 SEND: <auth
xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="SCRAM-SHA-1">TY=</auth>

2016-11-13 17:24:27:843  XMPPCapabilities: Unable to hash capabilites (in
order to send in presense element)

Perhaps there are duplicate advertised features...

<query xmlns="http://jabber.org/protocol/disco#info">

  <feature var="http://jabber.org/protocol/disco#info"/>

  <feature var="http://jabber.org/protocol/caps"/>

  <feature var="http://jabber.org/protocol/bytestreams"/>

  <feature var="http://jabber.org/protocol/si"/>

  <feature var="http://jabber.org/protocol/si/profile/file-transfer"/>

  <feature var="http://jabber.org/protocol/muc"/>

  <feature var="http://jabber.org/protocol/chatstates"/>

  <feature var="http://jabber.org/protocol/muc"/>

</query>

2016-11-13 17:24:31:237  RECV: <challenge
xmlns="urn:ietf:params:xml:ns:xmpp-sasl">Dk2</challenge>

2016-11-13 17:24:31:246  SEND: <response
xmlns="urn:ietf:params:xml:ns:xmpp-sasl">PQ==</response>

2016-11-13 17:24:33:007  RECV: <success
xmlns="urn:ietf:params:xml:ns:xmpp-sasl">c9</success>

2016-11-13 17:24:33:007  SEND: <stream:stream xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams' version='1.0' to='
dev.example.com'>

2016-11-13 17:24:35:937  RECV: <stream:stream xmlns="jabber:client"
xmlns:stream="http://etherx.jabber.org/streams" id="" from="dev.example.com"
version="1.0" stream1:lang="en"/>

2016-11-13 17:24:35:954  RECV: <stream:features xmlns:stream="
http://etherx.jabber.org/streams"><c xmlns="http://jabber.org/protocol/caps"
hash="sha-1" node="http://www.process-one.net/en/ejabberd/"
ver="t0="/><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session
xmlns="urn:ietf:params:xml:ns:xmpp-session"><optional/></session><sm
xmlns="urn:xmpp:sm:2"/><sm xmlns="urn:xmpp:sm:3"/><csi
xmlns="urn:xmpp:csi:0"/></stream:features>

2016-11-13 17:24:35:955  SEND: <iq type="set" id=""><bind
xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>iPhone</resource></bind></iq>

2016-11-13 17:24:42:493  RECV: <iq xmlns="jabber:client" id=""
type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>
xyz at dev.example.com/iPhone</jid></bind></iq>

2016-11-13 17:24:42:494  SEND: <iq type="set" id=""><session
xmlns="urn:ietf:params:xml:ns:xmpp-session"/></iq>

2016-11-13 17:24:45:208  RECV: <iq xmlns="jabber:client" type="result"
id=""/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20161113/7f53be58/attachment.html>


More information about the ejabberd mailing list