码迷,mamicode.com
首页 > Web开发 > 详细

Apache Tomcat Architecture

时间:2015-06-24 22:20:32      阅读:148      评论:0      收藏:0      [点我收藏+]

标签:

 

Architecture Overview

Overview

This page provides an overview of the Tomcat server architecture.

Terms
Server

In the Tomcat world, a Server represents the whole container. Tomcat provides a default implementation of theServer interface which is rarely customized by users.

Service

Service is an intermediate component which lives inside a Server and ties one or more Connectors to exactly one Engine. The Service element is rarely customized by users, as the default implementation is simple and sufficient: Service interface.

Engine

An Engine represents request processing pipeline for a specific Service. As a Service may have multiple Connectors, the Engine receives and processes all requests from these connectors, handing the response back to the appropriate connector for transmission to the client. The Engine interface may be implemented to supply custom Engines, though this is uncommon.

Note that the Engine may be used for Tomcat server clustering via the jvmRoute parameter. Read the Clustering documentation for more information.

Host

Host is an association of a network name, e.g. www.yourcompany.com, to the Tomcat server. An Engine may contain multiple hosts, and the Host element also supports network aliases such as yourcompany.com and abc.yourcompany.com. Users rarely create custom Hosts because the StandardHost implementation provides significant additional functionality.

Connector

A Connector handles communications with the client. There are multiple connectors available with Tomcat. These include the HTTP connector which is used for most HTTP traffic, especially when running Tomcat as a standalone server, and the AJP connector which implements the AJP protocol used when connecting Tomcat to a web server such as Apache HTTPD server. Creating a customized connector is a significant effort.

Context

Context represents a web application. A Host may contain multiple contexts, each with a unique path. TheContext interface may be implemented to create custom Contexts, but this is rarely the case because theStandardContext provides significant additional functionality.

Comments

Tomcat is designed to be a fast and efficient implementation of the Servlet Specification. Tomcat came about as the reference implementation of this specification, and has remained rigorous in adhering to the specification. At the same time, significant attention has been paid to Tomcat‘s performance and it is now on par with other servlet containers, including commercial ones.

In recent releases of Tomcat, mostly starting with Tomcat 5, we have begun efforts to make more aspects of Tomcat manageable via JMX. In addition, the Manager and Admin webapps have been greatly enhanced and improved. Manageability is a primary area of concern for us as the product matures and the specification becomes more stable.

Apache Tomcat Architecture

标签:

原文地址:http://www.cnblogs.com/hephec/p/4598678.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!