kenton
09/04/2021, 3:35 PMwrangler tail
and durable objects, but I believe it'll properly report the reason for an object reset)kenton
09/04/2021, 3:36 PMfetch()
call to the object at the time of reset, then an exception will be thrown on the caller side explaining the problem... but the fetch()
call has to be still awaiting response headers for this to work, if it has already established a stream or a WebSocket, then there's nowhere to throw the exception unfortunately, so then you just see a disconnect.kenton
09/04/2021, 3:37 PMfetch()
it (like it could just do await new Promise()
)... and then you could curl that, and when your object resets, you should get an exceptionraRaRa
09/04/2021, 3:41 PMkenton
09/04/2021, 3:42 PMraRaRa
09/04/2021, 3:59 PMraRaRa
09/04/2021, 3:59 PMraRaRa
09/04/2021, 4:05 PMraRaRa
09/04/2021, 5:03 PMraRaRa
09/04/2021, 5:04 PMraRaRa
09/04/2021, 5:04 PMraRaRa
09/04/2021, 5:08 PMItsWendell
09/04/2021, 5:08 PMItsWendell
09/04/2021, 5:09 PMItsWendell
09/04/2021, 5:14 PMdo_clients............: avg=12532.232088 min=1699 med=12518 max=22793 p(90)=20942 p(95)=22081.65
gateway_clients.......: avg=1.528421 min=1 med=2 max=2 p(90)=2 p(95)=2
But getting timeouts at around 10K but I can 'force' through that to get to +-22K. Which is interesting. The workers hold 2 clients at the most. This is me running 30K connections through it in a span of 2 minutes.
Which means that realistically it could hold 1.5*10K? Since I can re-use connections on the worker on average 1.5 times. ๐คkenton
09/04/2021, 5:14 PMclose()
method only closes the socket in one direction (the sending direction). Both sides need to call close()
to completely close the socket.raRaRa
09/04/2021, 5:15 PMraRaRa
09/04/2021, 5:16 PMItsWendell
09/04/2021, 5:17 PMkenton
09/04/2021, 5:19 PMclose()
method actually sends a close message, and the "close"
event tells you the message was received... these aren't actually telling you that the underling network socket is closed. They should probably have used a different name for that message...raRaRa
09/04/2021, 5:20 PMraRaRa
09/04/2021, 5:20 PMkenton
09/04/2021, 5:21 PMws.close(4321, "Hello")
, and then on the receiving end event.code
will be 4321
and event.reason
will be "Hello"
raRaRa
09/04/2021, 5:26 PMraRaRa
09/04/2021, 6:17 PMraRaRa
09/04/2021, 6:18 PMraRaRa
09/04/2021, 6:18 PMElectroid
09/04/2021, 6:30 PMElectroid
09/04/2021, 6:30 PMraRaRa
09/04/2021, 6:37 PM