Use the connection caching feature of OpenSwitch to improve the performance of applications that rapidly create and destroy connections while running. For example:
Web applications – the majority of Web applications are built around small common gateway interface (CGI) programs or scripts that run independently of the actual Web server. Due to the transitory nature of CGI applications, these programs are implemented to hold a database connection only for the duration of the query issued by the CGI.
Site handlers – a site handler refers to a special Adaptive Server connection that is created when a query is issued between two servers, such as:
exec SERVER2...sp_helpdb
When this type of query is issued, the source Adaptive Server creates a site handler to multiplex all future queries to SERVER2. Only one physical connection is maintained between the two servers and future queries are initiated faster.
However, when SERVER2 is an instance of OpenSwitch, even though only one physical connection is coming in, multiple outgoing connections must still be maintained by OpenSwitch, one for each query issued over the site handler. OpenSwitch drops its outgoing connection after each remote procedure call (RPC) that is issued over the site handler.