Siwei
Siwei

Reputation: 21617

how to measure or understand websocket / socket application?

In my understanding, websocket/socket has the ability to:

  1. broadcasting: publish messages to the public channel
  2. private chat room: send messages to a private channel.

so my question is:

  1. when broadcasting to a public channel, will the CPU grow high when receiver increase from 10 to 1000 ?

  2. when send message to a private channel, is there any tools to measure / optimize?

thanks a lot!

Upvotes: 0

Views: 24

Answers (1)

Steffen Ullrich
Steffen Ullrich

Reputation: 123674

A Websocket and also a normal TCP socket are a one-to-one connection between a single client and a single server. There is no way to broadcast anything and there is no concept of public or private channels. There might be applications/protocols which implement such concepts on top of Websockets or plain sockets but the behavior would be specific for this application/protocol then.

Upvotes: 1

Related Questions