| Lesson 3 | Using Web Request Broker (WRB) |
| Objective | Describe the function of the Oracle Web architecture. |
Oracle's web architecture is composed of several components that work together to provide a complete application environment. Not all components apply to every deployment — the specific components present depend on the Oracle version, deployment model, and application requirements. Understanding the original Web Request Broker architecture and its evolution into Oracle REST Data Services (ORDS) is essential for tuning Oracle web-facing workloads in any era.
The classic Oracle web architecture (Oracle 8i and 9i era) was built from the following components, each handling a distinct layer of the request-to-database pipeline:
In Oracle 23ai, all of these components have been consolidated into a simpler, more scalable stack:
The Common Gateway Interface was the first major gateway between the web and Oracle database systems. A CGI program is executed in real time to produce dynamic documents that respond to user requests. The mechanism is straightforward: an HTTP request arrives at the web listener, the listener spawns a new OS process to execute the CGI program, the program queries the database and generates HTML output, and the process terminates when the response is complete.
This per-request process model was simple to implement but not scalable under load. Spawning a new OS process for every incoming HTTP request consumes significant CPU and memory. On a server handling hundreds of concurrent web requests, the process creation overhead becomes the dominant performance bottleneck — not the database queries themselves. CGI remained the primary gateway mechanism through the late 1990s and early 2000s, but its limitations drove Oracle to develop the Web Request Broker architecture as a more scalable alternative.
The Oracle Web Request Broker was introduced to address CGI's fundamental scalability problem. Rather than spawning a new process for each request, the WRB maintained a pool of persistent cartridge processes that handled requests as they arrived. The three core WRB components were:
The cartridge pool model was a significant improvement over CGI for sustained concurrent load. Process creation overhead was eliminated — the cartridge processes were already running when requests arrived. The WRB's architectural descendant in Oracle 23ai is the ORDS JDBC connection pool, which solves the same problem at the database connection layer rather than the OS process layer.
Oracle REST Data Services is the direct replacement for the entire legacy WRB stack. Every legacy component maps to a modern ORDS equivalent:
| Legacy Component | Oracle 23ai Equivalent |
|---|---|
| CGI scripts | ORDS REST handlers and APEX processes |
| Web Request Broker (WRB) | ORDS mid-tier |
| PL/SQL Agent | ORDS PL/SQL Gateway |
| Oracle Java Cartridge | Custom ORDS REST services in Java |
| Oracle LiveHTML Cartridge | APEX dynamic pages |
| Web Listener (Oracle HTTP Server) | Standalone ORDS/Jetty, Tomcat, or WebLogic |
ORDS runs as a Java web application inside a servlet container. It accepts HTTP/HTTPS requests from browsers, mobile clients, and REST consumers; routes requests to the appropriate handler (REST API, APEX, PL/SQL Gateway, or Database Actions); manages a pool of JDBC connections to Oracle Database 23ai; and bridges stateless HTTP requests to stateful Oracle database sessions. Responses are returned as HTML, JSON, APEX pages, or binary data depending on the request type and Accept header.
The ORDS JDBC connection pool is the most significant performance advantage over the legacy CGI model. A single ORDS instance handles hundreds of concurrent HTTP requests using a pool of database connections that is an order of magnitude smaller than the number of active HTTP connections. This is possible because database work — SQL execution, result set fetch — occupies only a small fraction of the total HTTP request lifecycle. The remainder of the request time is spent on network I/O and client-side rendering, during which the JDBC connection can be returned to the pool and reused by another request.
As shown in Panel 3 of the diagram above, four distinct input types route through ORDS to Oracle 23ai:
All four input types are handled by the same ORDS mid-tier and the same Oracle Database 23ai instance — ORDS provides a unified gateway that the legacy WRB architecture with its separate cartridge types could not match.
Understanding the architectural evolution from WRB to ORDS has direct tuning implications for Oracle DBAs managing web-facing workloads:
The next lesson examines the Web Listener — the component that receives incoming HTTP requests and routes them to the application tier.