Creating Kong WebSocket Plugin

Hi All,
We have 2 use cases:

Use case 1: Any external client (mobile, browser) will first connect to “kong api gateway” using “web-socket” and post successful connection establishment next all by directional message transportation will done using same connection.

eq: Client will connect to “KONG API GATEWAY” using “ws://localhost:8000

User case 2: Message board casting to all socket connections.

Current Setup:

  • Running KONG API GATEWAY on post 8000 and complete URL is localhost:8000

Here we are looking for assistance, first is this is possible? if yes then what will be best way to go with (plugin or other way) and it will grate if you guide with some sample/working code .

We wanted to test 0.2 - 0.3 billions connection in 30 min time.

Help is really appreciated :slight_smile:

Thanks & Regards
Jaiswar Vipin Kumar R.

@hbagdi kindly assist.

Yes, websockets are supported by Kong but Kong can only forward all the traffic to one specific service.

I’m not 100% sure but as far as I know, you can’t broadcast the websocket level messages from Kong.
Kong/Nginx treat a websocket connection as a blackbox.