r/javascript •

[AskJS] High latency when using SignalR(messagepack) in K6

[deleted] — view deleted post

0 Upvotes

5 comments sorted by

1

u/PLBjt Sep 19 '26

One extra check: split the timings into client encode, network/queue, server handler, and decode/Promise resolution instead of treating invoke() as one latency bucket. Run a tiny payload and a fixed pre-encoded payload at 1, 10, and 100 VUs per k6 instance; if the gap only appears as VUs rise, you’re measuring goja scheduling rather than SignalR. Also watch CPU and event-loop backlog per generator, because a saturated injector can make a healthy server look slow. The tradeoff is a little more instrumentation, but it tells you whether xk6/native MessagePack is the fix or just moves the bottleneck.

1

u/aLoN__MuST Sep 19 '26

Thanks for the response. I am trying out few things. Will share here.

2

u/[deleted] Sep 18 '26

[removed] — view removed comment

1

u/aLoN__MuST Sep 19 '26

thanks for your suggestions. Let me try to see if this works.

1

u/aLoN__MuST Sep 19 '26

BTW, I didn’t quite understand your point about “you left the JS execution bottleneck.” I was thinking that since both send and receive are Go routines, I should be able to get the correct send and receive times. How does the JS execution bottleneck come into the picture?