A
abhi147
Hi ,
I have a program which has 1 client and 4 servers . Client
sends messages(every second) to all these 4 servers and recieves a
response from these servers . It has load balaning and failover logic
in it .
Now my question is , is it a good practice to connect to these servers
outside the while loop or should I connect these inside the loop(so
that client connect to server everytime a message is being sent ) ..
Wouldn't connecting and closing the socket every second be a load on
the system ?
Thanks !
I have a program which has 1 client and 4 servers . Client
sends messages(every second) to all these 4 servers and recieves a
response from these servers . It has load balaning and failover logic
in it .
Now my question is , is it a good practice to connect to these servers
outside the while loop or should I connect these inside the loop(so
that client connect to server everytime a message is being sent ) ..
Wouldn't connecting and closing the socket every second be a load on
the system ?
Thanks !