Tomcat Concepts

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Architecture

Tomcat Architecture

Connector

The Tomcat connector handles the underlying TCP connections with the client. The browser or the proxy web server communicates with the servlet container over TCP connections. The clients will usually attempt to maintain persistent TCP connections to the servlet container, and to reuse a connection for multiple request/response cycles. Once a connection is assigned to a particular request, it will not be used for any others until the request-handling cycle has terminated. Requests are not multiplexed over connections. Once the web server has opened a connection to the servlet container, the connection can be in one of the following states:

  • Idle (No request is being handled over this connection)
  • Assigned (The connecton is handling a specific request)

Once a connection is assigned to handle a particular request, it will stay associated with the request until a response is sent back to the client.

Connector Configuration Example

JMX Monitoring:

Connector Statistics

Implementation details:

Connector Implementation Details

Engine

Host

Context

Request Processing Pipeline

Valve

A valve is a component that belongs to the request processing pipeline of one of the Tomcat containers (Engine, Host or Context)

Writing a Custom Tomcat Valve

Custom Tomcat Valve