What is the most effective way to query GETAG web services? All in one connection or is it better to constantly open and close the connection?
Our web services are a cluster platform (multi-server with load balancer). The load balancer decides independently on which hardware which query can be answered most effectively. In this regard, the following must be observed when developing your client queries.
It must be avoided that all or several requests are sent to the web services platform in only one connection. Open and close the connection to the web services for each request.
A connection should be closed as soon as possible.
Our web services work "stateless", even logically related requests can be sent in different connections and thus also answered by different servers.
Closing the connection quickly promotes parallel processing of requests, as the load balancer can continue to process your requests on another, possibly less busy server.
Closing the connection quickly also avoids exceptions in your application due to connection resets by us because of maintenance work or data updates. During maintenance work or data updates, the corresponding servers are logged off from the load balancer so that they are no longer occupied with new connections.
The load balancer constantly checks and measures the application servers (green arrows) and decides which server can best answer your requests (red and black arrows).