Gen Comms Bridge has ~5 second latency via F5 load balancer
search cancel

Gen Comms Bridge has ~5 second latency via F5 load balancer

book

Article ID: 124103

calendar_today

Updated On:

Products

Gen Gen - Run Time Distributed

Issue/Introduction

The Gen Communications Bridge (Comms Bridge) server is experiencing a strange ~ 5 second latency on the first transaction execution when the Gen client application is connecting to the Comms Bridge via an F5 Load Balancer.
If the Gen client application is connected directly to the Comms Bridge, the problem does not occur.

Environment

Gen Communications Bridge (any version)

Cause

On an initial client connection, the Comms Bridge does a reverse DNS lookup on the client IP address using function getnameinfo() to get the client's hostname (older Comms Bridge versions used function gethostbyaddr()). The hostname is used purely for informational/logging purposes.
Therefore, any delay in the Comms Bridge receiving the result of the reverse DNS lookup will cause latency symptoms. 
In this case, the hostname lookup for the Load Balancer client IP address is for some reason taking a lot longer than the lookup for the direct client IP address.

Resolution

The reason for the delayed reverse DNS lookup is unrelated to the Comms Bridge and can be investigated further. However in the meantime one of these 2 workarounds can be implemented:

a. Add the client IP address and hostname Load Balancer to the Comms Bridge server local hosts file (C:\Windows\System32\drivers\etc\hosts). This will resolve a slow DNS reverse lookup because the local hosts file is used for the lookup before any contact is attempted to the DNS server. 

b. Disable the DNS reverse lookup in the Comms Bridge user exit INETIPUX.C i.e edit the file to return the IP address instead of hostname
Use INETIPUX.NT to rebuild the Comms Bridge runtime dll tcpuxn.dll (tcpux<version>n.dll for older Gen versions):
Gen™ 8.6 > Reference > User Exits > Windows C User Exits > Windows Client Middleware User Exits - Communications Bridge > GETTCPHOSTNAME - Host Name Lookup Exit (Windows)
This would be the best option if this problem is occurring in an environment without a Load Balancer where it is not feasible to add the IP address/hostname of all possible clients to the Comms Bridge server local hosts file.