7 ms·
" the connection is not getting established all the time" Which connection does not get established? The webhook connection to your backend or the websocket con
by blablablub 4y ago
" the connection is not getting established all the time"
Which connection does not get established? The webhook connection to your backend or the websocket connection to your backend?
Or do you get a webhook response, but failing to send a response via websocket?
- ravirajx7 4y agoIt's the websocket connection which is not getting established. Webhook response is a simple Post request and it's coming fine. The problem here is sometimes this webhook response comes to that particular instance where the websocket connection was not established with the client.Ideally I would be happy if this response comes to both of the instance through some configuration on loadbalancer.
- blablablub 4y agoEasiest way is to check on the client side if the websocket connection is established, if not, just try to reconnect after a couple of seconds. Maybe there is a problem on the backend that dns is faster than establishing a new instance, so retrying is your best option.
- blablablub 4y agoAs per your other answer, websocket connections are established just fine "Now, whenever a new Webhook response comes ... it doesn't have information regarding which instance was used earlier for making the websocket connection, it may send request to one of the instance where the connection was not established and thus our backend is not able to process this request from this particular instance." just include the internal ip of the websocket connection to the data you send to your billing operator and then forward the post request appropiately.