Connect multiple users to the same kubernetes pod

Viewed 131

I have created a server named Remote Pipes that get clients connections with streams and transfer data between them.

On one side there is a computer Hub and on the other side there are a number of App clients.

The Hub client connects to the Remote Pipes and a two-way stream remains open.

All the Apps clients connect to the Remote Pipes and a two-way stream remains open.

Whenever the Hub wants to send data for the Apps clients he sends it to the Remote Pipes, and the Remote pipes send each connected App client the data through (already opened) opened stream.

Whenever one of the app clients wants to send data for the Hub he sends it to the Remote Pipes which combines all streams from the Apps and sends them through a single (already opened) stream to the Hub.

enter image description here

Remote Pipes do not store data nor use local storage nor use local DB and each instance is intended for one family.

So I want to create a Kubernetes pod with Remote Pipes for each family and all family members need to connect to the same pod.

No need for a persistent pod, if one pod gets deleted (in case there are no connections) a new one is ok as long as all the family members Apps clients and the Hub client connect to the same pod.

The Question:

Searching for a way to make multiple users connect to the same kubernetes pod (like game/zoom lobbies?) and I am not sure what is the best option.

The routing must be created dynamically and be scalable so routing based on ports and Name-based routing are not a good fit.

Here are a number of terms that I found that may be related

  1. Stateful application
  2. Headless services
  3. Auto-labeling
  4. kube-proxy
  5. Host based routing
  6. Path based routing
  7. Header based routing
  8. Software/Application Load balancer

I am using Linode so using Linode NodeBalancers is preferable if load balancer is required.

1 Answers
Related