Autobahn Connection Performance

#1

Hi all, so I’ve been playing around with the AutobahnJS client and I’ve noticed something particular. It takes about ~3000ms (!) to connect to a server:

var start = new Date().getTime();
ab.connect(‘ws://server-ip-address:8888’, function () {
console.log(‘Connected in’, (new Date().getTime() - start), ‘ms’);
});

Whenever I use standard HTML5 sockets, I get around ~500ms load time to connect, which seems quite OK (connection is ready when page is finished loading):

ws = new WebSocket(‘ws://server-ip-address:8888’);
ws.onopen = function() {
console.log(‘Connected in’, (new Date().getTime() - start), ‘ms’);
};

Is this normal for AutobahnJS? If not, what could be causing this huge delay in connection time?

0 Likes

#2

Hi all, so I've been playing around with the AutobahnJS client and I've
noticed something particular. It takes about ~3000ms (!) to connect to a
server:

    var start = new Date().getTime();
    ab.connect('ws://server-ip-address:8888', function () {
         console.log('Connected in', (new Date().getTime() - start), 'ms');
    });

Whenever I use standard HTML5 sockets, I get around ~500ms load time to
connect, which seems quite OK (connection is ready when page is finished
loading):

    ws = new WebSocket('ws://server-ip-address:8888');
    ws.onopen = function() {
         console.log('Connected in', (new Date().getTime() - start), 'ms');
    };

Is this normal for AutobahnJS? If not, what could be causing this huge
delay in connection time?

No, this is not normal. You might tell us what WAMP server you are using, and provide logs of both the client and the server ..

/Tobias

···

Am 07.12.2013 08:34, schrieb siric:

--
You received this message because you are subscribed to the Google
Groups "Autobahn" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to autobahnws+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Likes

#3

I’ve been testing various things and one thing I tried was change the port from 8888 to a random one. As soon as I changed the port, the connection delay was no more.

Which is quite odd because port 8888 is not being used at all on the server (netstat -ltnp) and is actually working properly with regular html5 websockets.

For now I’ll be staying away from port 8888 until I can figure out the issue with this port.

For those that need to know, I’m running nginx with varnish and php5.5 with libevent enabled. I’m using the Ratchet WAMP server. Things are running smooth now.

···

Op zaterdag 7 december 2013 15:19:02 UTC+1 schreef Tobias Oberstein:

Am 07.12.2013 08:34, schrieb siric:

Hi all, so I’ve been playing around with the AutobahnJS client and I’ve

noticed something particular. It takes about ~3000ms (!) to connect to a

server:

var start = new Date().getTime();
ab.connect('ws://server-ip-address:8888', function () {
     console.log('Connected in', (new Date().getTime() - start), 'ms');
});

Whenever I use standard HTML5 sockets, I get around ~500ms load time to

connect, which seems quite OK (connection is ready when page is finished

loading):

ws = new WebSocket('ws://server-ip-address:8888');
ws.onopen = function() {
     console.log('Connected in', (new Date().getTime() - start), 'ms');
};

Is this normal for AutobahnJS? If not, what could be causing this huge

delay in connection time?

No, this is not normal. You might tell us what WAMP server you are
using, and provide logs of both the client and the server …

/Tobias

You received this message because you are subscribed to the Google

Groups “Autobahn” group.

To unsubscribe from this group and stop receiving emails from it, send

an email to autobahnws+...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

0 Likes

#4

I've been testing various things and one thing I tried was change the
port from 8888 to a random one. As soon as I changed the port, the
connection delay was no more.

Which is quite odd because port 8888 is not being used at all on the
server (netstat -ltnp) and is actually working properly with regular
html5 websockets.

For now I'll be staying away from port 8888 until I can figure out the
issue with this port.

Ok. Odd. Well, anyway, great that you got it working!

For those that need to know, I'm running nginx with varnish and php5.5
with libevent enabled. I'm using the Ratchet WAMP server. Things are
running smooth now.

Ah, ok. Ratchet;) But Chris (Ratchet dev) is a nice guy .. so you are excused not using Autobahn on server;) [just kidding .. its WAMP .. use what fits your needs]

Cheers,
Tobias

···

Am 08.12.2013 00:28, schrieb siric:

Op zaterdag 7 december 2013 15:19:02 UTC+1 schreef Tobias Oberstein:

    Am 07.12.2013 08:34, schrieb siric:
     > Hi all, so I've been playing around with the AutobahnJS client
    and I've
     > noticed something particular. It takes about ~3000ms (!) to
    connect to a
     > server:
     >
     > var start = new Date().getTime();
     > ab.connect('ws://server-ip-address:8888', function () {
     > console.log('Connected in', (new Date().getTime() -
    start), 'ms');
     > });
     >
     > Whenever I use standard HTML5 sockets, I get around ~500ms load
    time to
     > connect, which seems quite OK (connection is ready when page is
    finished
     > loading):
     >
     > ws = new WebSocket('ws://server-ip-address:8888');
     > ws.onopen = function() {
     > console.log('Connected in', (new Date().getTime() -
    start), 'ms');
     > };
     >
     > Is this normal for AutobahnJS? If not, what could be causing this
    huge
     > delay in connection time?

    No, this is not normal. You might tell us what WAMP server you are
    using, and provide logs of both the client and the server ..

    /Tobias

     >
     > --
     > You received this message because you are subscribed to the Google
     > Groups "Autobahn" group.
     > To unsubscribe from this group and stop receiving emails from it,
    send
     > an email to autobah...@googlegroups.com <javascript:>.
     > For more options, visit https://groups.google.com/groups/opt_out
    <https://groups.google.com/groups/opt_out>.

--
You received this message because you are subscribed to the Google
Groups "Autobahn" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to autobahnws+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Likes