One of the major negatives of using Oracle 10g and PHP to build applications is the obvious lack of connection pooling.
Without pooling, frequent connection creation and destruction can be expensive
and crippling to high scalability. Oracle's traditional middle-tier connection pools
were not applicable to the multi-process PHP architecture. Caching connections
within PHP removed connection creation and destruction costs but did not
achieve optimal connection resource utilization, incurring unnecessary memory
overhead in the database.
Oracle has added
Database Resident Connection Pooling (DRCP) as a new feature in Oracle Database 11g. DRCP allows for the sharing of dedicated database server processes across multiple applications running on several hosts. Pooled servers are managed by a connection broker process which pools servers at the database instance level.
With DRCP
Without DRCP
PHP Scalability and High Availability
| Dedicated Servers |
Shared Servers |
Pooled Servers |
| When the PHP connection is created, a network connection to a dedicated server process and associated session are created |
When the PHP connection is created, a network connection to the dispatcher process is established. A session is created in the SGA |
When the PHP connection is created, a network connection to the connection broker is established |
| Activity on a connection is handled by the dedicated server |
Each action on a connection goes through the dispatcher, which hands the work to a shared server |
Activity on a connection wakes the broker, which hands the network connection to a pooled server. The server then handles subsequent requests directly, just like a dedicated server |
| Idle PHP connections hold a server process and session resources |
Idle PHP connections hold session resources but not a server process |
Idle PHP connections hold a server process and session resources |
| Closing a PHP connection causes the session to be freed and the server process to be terminated |
Closing a PHP connection causes the session to be freed |
Closing a PHP connection causes the session to be destroyed and the pooled server to be released to the pool. A network connectionto the connection broker is retained |
| Memory usage is proportional to the number of server processes and sessions. There is one server and one session for each PHP connection |
Memory usage is proportional to the sum of the shared servers and sessions. There is one session for each PHP connection |
Memory usage is proportional to the number of pooled servers and their sessions. There is one session for each pooled server |