Skip to main content

Introduction to the Web Gateway

Any InterSystems IRIS® web application relies on three software components that collectively handle HTTP requests and responses for that application:

  • The web server is a software utility that receives incoming HTTP requests and determines how to handle them. InterSystems supports several different web servers, varying by operating system.

  • The InterSystems Web Gateway is a software utility that receives HTTP requests from the web server and then sends them to the appropriate InterSystems IRIS server.

    Depending on the platform, the Web Gateway is a shared library, a .dll file, or a CGI script. You can install the Web Gateway as part of InterSystems IRIS or as a standalone utility, depending on your architecture needs.

    The Web Gateway includes management pages via which you can perform global configuration, configure servers, configure web applications, and monitor the Web Gateway.

  • The CSP server receives HTTP requests from the Web Gateway and then handles them by calling code within InterSystems IRIS. The CSP server is actually a process running within an InterSystems IRIS server. This process is dedicated to serving requests received from the Web Gateway.

Purposes of the Web Server, Web Gateway, and CSP Server

The web server does the following:

  • Accepts incoming HTTP requests, usually from browsers.

  • Checks permissions.

  • Possibly serves static content (see the next item).

  • Sends requests for specific forms of URLs to the Web Gateway. This is determined by the configuration of the web server. In all cases, URLs with the following endings should be processed by the Web Gateway:

    .csp .cls .zen .cxw 

    The first three extensions refer to kinds of code that can run in InterSystems IRIS. The last one (.cxw) is a reserved extension used by the Web Gateway management pages. Within the context of the Web Gateway, these extensions represent the InterSystems file types.

    The web server can be configured to send additional types of files to the Web Gateway.

The Web Gateway does the following:

  • Determines which InterSystems IRIS server to send a request to.

  • Sends requests to the correct InterSystems IRIS server, specifically to the CSP server in that InterSystems IRIS server. (For URLs that end with .cxw, the Web Gateway instead invokes the separate Web Gateway management module.)

  • Maintains connections to the InterSystems IRIS server, to avoid having to continually open new connections.

Within InterSystems IRIS, the CSP server does the following:

  • Receives an HTTP request for an application.

  • Checks the configuration settings for the web application, which are specified in the InterSystems Management Portal and saved in the CPF file for InterSystems IRIS.

  • Executes a callback in the requested code, which sends HTML back to the Web Gateway, which sends it to the web server and back to the browser.

How the Web Server, Web Gateway, and CSP Server Work Together

When a client requests information from a web application, the flow of information is as follows:

  1. An HTTP client, typically a web browser, requests a page from a web server using the standard HTTP (or HTTPS) protocol.

  2. The web server recognizes this as a CSP request and forwards it to the Web Gateway using a fast server API.

  3. The Web Gateway determines the InterSystems IRIS server to talk to and forwards requests to the CSP server on that target system.

  4. The CSP server running in InterSystems IRIS processes the request and returns a page to the Web Gateway, which passes it back to the web server.

  5. The web server sends it to the browser for display.

Structure of an InterSystems Web Application URL

The Web Gateway allows you to serve InterSystems IRIS web applications at URLs which follow the following format:

URL Part Description

http or https, depending on whether or not you have configured your web server to use TLS. InterSystems strongly recommends the use of TLS.


The IP address or DNS name where your web server is available. When the web server is on the same machine as the client, this is usually localhost.


The port number over which your web server is listening for requests. If you are serving your instance’s web applications using the web server installed with your instance, this is the port at which that private web server is listening. By default, the installer assigns port 52773 to the web server for the first instance on a given system. For each additional instance you install, the default port for the private web server increments: 52774, 52775, and so on.

If you are serving your instance using an external web server and your web server is listening over the standard ports for HTTP (80) or HTTPS (443), you generally do not need to specify the port number when constructing a URL.


An optional string which uniquely identifies one of your InterSystems IRIS application servers.

If you serve multiple InterSystems IRIS instances using a single web server and you must access a web application unique to one instance (such as an instance’s Management Portal), you must configure your web server and Web Gateway to route requests to the instance using this identifier as a prefix to the application path. This identifier is the CSPConfigName for the instance. By default, an instance’s CSPConfigName is its instance name, in all lowercase characters. However, it can be configured.

If the application in the preceding example were exclusively available on the InterSystems IRIS application server named iris2, then you could configure the /iris2 path within the web server and Web Gateway configurations to serve the application at the following URL:

[appPath] The relative path unique to the application within each InterSystems IRIS application server. When you define an application within an InterSystems IRIS application server, this is the application’s Name.
[fileOrQuery] Optional. Any combination of subordinate path, file name, and query parameters which the application may use to process the request.
FeedbackOpens in a new tab