Link loadbalancer chosen server for http and tcp service

Hi all ,
I'm trying to setup a common entry point for my proxmox cluster.

I have that working config:

  routers:
    proxmox-https:
      entryPoints:
        - "https"
      rule: "Host(`proxmox.mynetwork.net`)"
      middlewares:
        - ALLOW@docker
      tls:
        options: SECURE@file
      service: proxmox

  services:
    proxmox:
      loadBalancer:
        servers:
          - url: "https://10.0.0.1:8006"
          #- url: "https://10.0.0.2:8006"
        healthCheck:
          path: "/#v1:0:18:4:::::::"
          interval: "10s"
          timeout: "3s"
        passHostHeader: true
        serversTransport: "pve"

  serversTransports:
    pve:
      insecureSkipVerify: true

tcp:
  routers:
    vnc:
      rule: HostSNI(`*`)
      entrypoints: vnc
      tls: false
      service: vnc

  services:
    vnc:
      loadbalancer:
        servers:
          - address: "10.0.0.1:5900"
          #- address: "10.0.0.2:5900"

It works with a single proxmox host ( 10.0.0.1 ) but if I enable the second one I don't know how to force to "LINK" the http and the tcp services so when the client is connected to http 10.0.0.1 it should be connected to the same tcp vnc ip.

Is there a way ?

Thank's.

Use 3 backticks before and after code/config to make it more readable and keep spacing.

Can you describe again what you want to achieve?

Hi , I've correct the markdown.

For what I want to archieve:
I have two server/ip , any of those server have two service , a https one ( port 8006 ) and a tcp one ( port 5900 ) , suppose the two servers have address of 10.0.0.1 and 10.0.0.2 .

Now I want that that when a client connect to the proxy https ( on 443 port resirected to 8006 ) and is assigned to backend with ip 10.0.0.1 the same client when connect to the proxy with tcp protocolo ( on port 5900 ) is assigned to the same backend.

Now with the config I'm using the two service are treated as separate , I want that the backend redirection of the two service is treated as the same , one client one https backend and the same tcp backend.

Thank's.

Every router handles it's own load balancing, you can have a sticky cookie for a service to re-connect to the same instance. But this will probably not work across multiple routers, especially not if one is TCP, not http.

For your setup to work, you could create a http/TCP router and service pair for every server, like proxmox1.mynetwork.net and proxmox2.mynetwork.net. But this only works if VNC uses TLS with HostSNI, otherwise you need a different port for the TCP connection.

Ok , so there's no way to make it work, thank's.