auto_ping_size
ok, just tested:
crossbar with ping/pong settings: https://gist.github.com/oberstet/da507a03c26743f7738ebeb59ece5f7d
autobahn (twisted/apprunner): https://gist.github.com/oberstet/396325ebfbd4e08d1542dd278c5fb679
I have stopped and restarted crossbar twice while leaving the
client run, and it automatically reconnects correctly (and also
starts the ping/png again)
in the client log, you'll notice the
2019-01-11T10:48:23+0100 WebSocketProtocol.onPing(payload=<4 bytes>)
lines. this is the client responding to crossbar ping requests
the lines
2019-01-11T10:48:24+0100 Auto ping/pong: sending ping
auto-ping/pong
2019-01-11T10:48:24+0100 Expecting ping in 5.0 seconds for
auto-ping/pong
2019-01-11T10:48:24+0100 Auto ping/pong: received pending pong for
auto-ping/pong
2019-01-11T10:48:24+0100 WebSocketProtocol.onPong(payload=<4
bytes>)
are the client initiating the ping, and receiving the crossbar response.
---
above is using autobahn/twisted/apprunner: pip install autobahn[twisted]
(yeah, I know you want asyncio, but this is to track the issues
to their root cause first - I positively know above works;)
---
could you maybe try that in your setup and dump logs here?
also: are you using TLS (secure websocket), and if so terminating TLS at GCP or at crossbar?
could you test the latter? wss and tls termination at crossbar?
reason: otherwise the ping/pong messages might not even be
forwarded by GCP!! a websocket intermediary is allowed to do that
(only for websocket ping/pong messages, not regular websocket
messages). it can completely drop ping/pongs - or only forward
some - or create its own
this could be one issue.
when you terminate TLS at crossbar, and consequently use GCP only as a layer 4 LB, GCP simply cannot look inside and should be sad (stop its weird interference)
if you terminate TLS at GCP, and use GCP at layer 7, the next thing I would try is doing a manual ping/pong using regular websocket messages. gcp is NOT allowed to drop those;) that would suck nevertheless, but we could think about what we can to mitigate.
in any case: if you don't have a hard reason for L7 LB, go for L4 - that is what we do and recommend usually (also for "security reasons": you are in control of your TLS keys/certs, and your traffic is kept confidental right into your VMs).
anyways: above tests will reveal more information .. pls let me
know the results, and I can comment again
--
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.
To post to this group, send email to autob...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/autobahnws/88db33a0-d465-45c4-bf6a-0138b1c09d30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
one more hint: to enable an insane amount of logging on the crossbar side:
./crossbarfx edge start --loglevel trace
here you see the incoming client initiated pings, replies, and
also the crossbar initiated pings, and receive replies:
2019-01-11T11:06:15+0100 [Router 19176
crossbar.router.service.RouterServiceAgent]
RouterServiceAgent.publish("wamp.session.on_join") ->
"wamp.session.on_join" on "realm1"
2019-01-11T11:06:18+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol] Auto
ping/pong: sending ping auto-ping/pong
2019-01-11T11:06:18+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol] Expecting
ping in 2.0 seconds for auto-ping/pong
2019-01-11T11:06:18+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol] Auto
ping/pong: received pending pong for auto-ping/pong
2019-01-11T11:06:18+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol]
WebSocketProtocol.onPong(payload=<4 bytes>)
2019-01-11T11:06:21+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol] Auto
ping/pong: sending ping auto-ping/pong
2019-01-11T11:06:21+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol] Expecting
ping in 2.0 seconds for auto-ping/pong
2019-01-11T11:06:21+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol] Auto
ping/pong: received pending pong for auto-ping/pong
2019-01-11T11:06:21+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol]
WebSocketProtocol.onPong(payload=<4 bytes>)
2019-01-11T11:06:24+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol] Auto
ping/pong: sending ping auto-ping/pong
2019-01-11T11:06:24+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol] Expecting
ping in 2.0 seconds for auto-ping/pong
2019-01-11T11:06:24+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol] Auto
ping/pong: received pending pong for auto-ping/pong
2019-01-11T11:06:24+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol]
WebSocketProtocol.onPong(payload=<4 bytes>)
2019-01-11T11:06:25+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol]
WebSocketProtocol.onPing(payload=<4 bytes>)
2019-01-11T11:06:27+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol] Auto
ping/pong: sending ping auto-ping/pong
2019-01-11T11:06:27+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol] Expecting
ping in 2.0 seconds for auto-ping/pong
2019-01-11T11:06:27+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol] Auto
ping/pong: received pending pong for auto-ping/pong
2019-01-11T11:06:27+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol]
WebSocketProtocol.onPong(payload=<4 bytes>)
2019-01-11T11:06:30+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol] Auto
ping/pong: sending ping auto-ping/pong
2019-01-11T11:06:30+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol] Expecting
ping in 2.0 seconds for auto-ping/pong
2019-01-11T11:06:30+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol] Auto
ping/pong: received pending pong for auto-ping/pong
2019-01-11T11:06:30+0100 [Router 19176
crossbar.router.protocol.WampWebSocketServerProtocol]
WebSocketProtocol.onPong(payload=<4 bytes>)