tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niki Dokovski <nick...@gmail.com>
Subject Re: Can Tomcat 7 jsr-356 plumbing be configured to automatically send websocket ping/pong on a specified interval?
Date Mon, 04 Nov 2013 07:23:33 GMT
On Mon, Nov 4, 2013 at 5:52 AM, Bob DeRemer <bob.deremer@thingworx.com>wrote:

>
>
> > -----Original Message-----
> > From: Bob DeRemer [mailto:bob.deremer@thingworx.com]
> > Sent: Sunday, November 03, 2013 8:31 PM
> > To: Tomcat Users List
> > Subject: Can Tomcat 7 jsr-356 plumbing be configured to automatically
> send
> > websocket ping/pong on a specified interval?
> >
> > During our testing of large scale websocket connections going through
> Amazon
> > ELB, we've found that ELB will timeout idle TCP connections after 60
> seconds.
> > Our testing scenarios is one where we want to ramp up 10(s) of 1000s of
> > websocket connections - then, after they are all connected, start them
> sending
> > request/response messages for some specified duration.
> >
> > To avoid ELB closing our connection, we'd like to see if we can
> configure the
> > tomcat plumbing to automatically send ping(s) on some interval.  And, the
> > follow-up question: if we can have a ping being sent automatically, will
> the
> > other end of the pipe respond with a pong?
>

Sending ping control frame is handled by the application entirely. The
container will not send those frames on its own. The other peer will
respond with a pong as described by WSC 2.2.5-1 [1] and WebSocket RFC [2]

> >
> > Thanks,
> > Bob
>
> FOLLOW-UP: will the Ping message be sent if an empty byte[] is passed, or
> must it contain at least 1 byte?
>

The payload of the ping control frame is optional, by definition.


> >
> > http://www.thingworx.com<http://www.thingworx.com/>
> > Skype: bob.deremer.thingworx
> > O: 610.594.6200 x812
> > M: 717.881.3986
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

[1] JSR356 WebSocket for Java API http://jcp.org/en/jsr/detail?id=356
[2] RFC 6455 http://tools.ietf.org/html/rfc6455#section-5.5.2

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message