Friday, 01 March 2024
  1 Replies
  239 Visits
  Subscribe
Hi Sergio

We use sgcWebsocketserver now for several years.
We made an setup where we use IIS as a reverse proxy server and use sgcWebsocketserver with websockets and the delphi webbrokerhttpserver.
We use IIS because that makes it easy to use acme with let's encrypt to host multiple sites on 1 server so IIS takes care of the SSL conversion and
sgcWebsocketserver is used as http application server

We made a very nice site in combination with angular and all works ok.
Our customers are extending the use of the planning application and we need to serve the daily planning of facility company department of 150 hotels and followup of chambermaids clocking with their mobile on every room in/out, all this runs in 1 pwa application.

To deliver a 24/7 robust enviroment we want to extend it to a loadBalanced enviroment.
I am testing with the loadbalancer in this configuration

IIS reverse proxy takes the SSL and converts it http trafiic , send over the traffic to the loadbalancer on same server on port 6000 so rewrite rule in IIS looks like

http://127.0.0.1:6000:{R:1}

I configured a simple Load balacing application on port 6000 and the servers connect to the loadbalancer on port 7070 and i spin up 2 backend server

LoadBalancerHost=127.0.0.1
LoadBalancerPort=7070
LoadBalancerBindings=ws://127.0.0.1:8094
LoadBalancerGuid=Server1;

LoadBalancerHost=127.0.0.1
LoadBalancerPort=7070
LoadBalancerBindings=ws://127.0.0.1:8095
LoadBalancerGuid=Server2;


I see that the backend servers connect to the loadbalancer and that they come into the state ready

Server connected : /sgc@load_balancer_client
Server ready : /sgc@load_balancer_client
Server connected : /sgc@load_balancer_client
Server ready : /sgc@load_balancer_client

If i now make the call http://127.0.0.01:6000/heartbeat to test configuration nothing happens
Also IIS reverse proxy gives an gateway error.

To me it looks like Loadbalancer does not accept incoming http traffic, your manual states it support sgcHttpWebsocketserver

Any Idea ?