Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Tomcat components illustrate the architectural evolution history of a web server

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

1. Who is tomcat?

2. What can tomcat do?

Tomcat is a web container that can deploy web applications to tomcat and provide web services. Multiple web applications can be deployed in a web container. These web applications can be the same domain name or multiple domain name services.

3. What are the components of tomcat

4. How to quickly understand these components?

We can assume that we are going to design a web container. What should we design?

The first generation: receive requests, process requests, and centralize the returned results into the entire web container, as shown in the following figure:

Second generation: separation of connection management and processing logic

In the process of using it, it is found that it is annoying to open the connection of socket every time, call the processing logic, and then close the connection of socket. Simply close the connection of socket to Connector to handle, and leave the requested business logic to Container to handle. This is what happens.

The third generation: support multiple network protocols

The original goal was to design a web server or container, so if you want to support more protocols, you need to create different Connector and Container, where service wraps Connector and Container

Fourth generation: support for multiple web applications

Since it is a container, it is necessary to support multiple applications. Each application has a Context and is isolated from each other. The architecture that supports multiple Context is as follows:

Fifth generation: support for multiple domain names

Context context requires not only physical isolation, but also logical isolation, such as app1.example.com access context1,app1.test.com access context2.

The architecture at this point should look like this, and host can support multiple context.

5. Summary:

The components of web server are server-- > satisfying function server+connector+Container-- > responsibility separation server+service+connector+Container-- > supporting multiple protocols server+service+connector+Container+context-- > supporting multiple applications server+service+connector+Container+host+context-> supporting multiple applications with multiple domain names.

In fact, it is a process of refinement of division of labor components, similar to the refinement of social division of labor. Note that Container is also called engine in tomcat.

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report