This article introduces the concept and working principle of DB2 Universal Database proxy, the concept and features of the connection concentrator, and analyzes common problems and proxy Optimization on DB2 connections in detail. For your reference, I hope to help you.
The DB2 agent is a process or thread located on the DB2 server that serves application requests. When an external application connects to a DB2 instance to request access, the DB2 proxy is activated to respond to these requests. Generally, DB2 proxies are called work proxies. There are three types of work proxies: idle proxies, active coordination proxies, and sub-proxies.
◆ Idle Proxy: A proxy without any tasks. This proxy does not serve any remote connection or local connection, and is in a standby or standby status.
◆ Activity Coordination Proxy: it refers to a working agent. Each database activity connection generated by an external application has an Activity Coordination proxy to serve it.
◆ Sub-agent: refers to the next-level agent that accepts the work distributed by the coordination agent. Before DB2 V95, A subproxy exists only in a multi-partition environment (MPP) or in-node parallel environment (SMP), and may exist in all environments of DB2 V95.
There is a proxy pool in the DB2 server. When the instance is started, the number of proxies depends on the instance parameter NUM_INITAGENTS ). When there is no database connection, they are in standby status, that is, idle proxy. When an external program connects to the database, these agents start to get commands to serve these new connections, and then they become active Coordination Agents. These coordination proxies further split requests and allocate them to the next level of proxies, that is, the subproxies. If the current proxy is already working and a new request is sent, the Database Manager generates a new proxy to respond. After the transaction is processed and the database connection is disconnected, the Coordination proxy either returns the proxy pool to idle proxy, or automatically disappears depending on the instance parameter NUM_POOLAGENTS ). This is the life cycle of a proxy.
Related configuration parameters
Run DB2 get dbm cfg to view the following proxy-related instance parameters: MAXAGENTS, NUM_POOLAGENTS, NUM_INITAGENTS, MAX_COORDAGENTS, MAX_CONNECTIONS, and MAXCAGENTS. Next we will give a brief introduction to them:
◆ MAXAGENTS: this parameter indicates the total number of proxies in the current instance, including the sum of the Coordinated proxies, idle proxies, and sub-proxies. However, this parameter is no longer used in DB2 V95.