Supporting multiplexed connections
A multiplexed connection uses a single network connection between the database server and a client to handle multiple database connections from the client.
Client applications can establish multiple connections to a database server to access more than one database on behalf of a single user. If the connections are not multiplexed, each database connection establishes a separate network connection to the database server. Each additional network connection uses additional computer memory and processor time, even for connections that are not active. Multiplexed connections enable the database server to create multiple database connections without using up the additional computer resources that are required for additional network connections.
To configure the database server to support multiplexed connections:
The following example shows both onconfig file and sqlhosts file entries.
onconfig file:
DBSERVERNAME web_tli
DBSERVERALIASES web_mux
sqlhosts file:#dbservername nettype hostname servicename options
web_tli ontlitcp node5 svc5 m=1
web_mux onsqlmux - -
You are not required to change the sqlhosts information that the database server uses. The client program does not require any special SQL calls to enable connections multiplexing. Connection multiplexing is enabled automatically when the onconfig file and the sqlhosts entries are configured appropriately and the database server starts.
- Multithreaded client connections
- Shared-memory connections
- Connections to subordinate database servers (for distributed queries or data replication, for example)
The Informix® ESQL/C sqlbreak() function is not supported during a multiplexed connection.