Tomcat performance adjustment (2)

xiaoxiao2021-03-13  176

2.

Operating system performance optimization

The operating system herein refers to the system software running the web server. Of course, different operating systems are designed for different purposes. For example, OpenBSD is safe, so there are many restrictions in its kernel to prevent different forms of service attacks (a word of OpenBSD is "the default is the safest"). These limits may be more used to run active web servers.

The goal of the Linux operating system we use is easy to use, so it has a higher limit. The system using the BSD kernel has a kernel called "generic", indicating that all drives are static. This makes the system easy to use, but if you want to create a custom kernel to enhance some of these restrictions, you need to exclude unwanted devices. Many drivers in the Linux kernel are dynamically loaded. But in other words, memory is now getting cheaper, so it is not important because of loading additional equipment drivers. It is important to have more memory and make more free memory on the server.

Tip: Although memory is quite cheap now, try not to buy cheap memory. Those who have a brand of memory is expensive, but from reliability, cost performance will be higher.

If you use Tomcat on a Windows operating system, you'd better select the server version. Because of the number of users licensed, the number of users that the end user authorization or the number of users that the operating system itself, the number of users can afford, or some aspects of the number of network connections or other aspects can be limited. And based on safety considerations, you must always put the latest patches to the operating system.

3.Tomcat integrates with other web servers

Although Tomcat can also make a web server, it is dealing with the static HTML speed than Apache, and its function as a web server is far less than Apache, so we want to integrate Apache and Tomcat, clear the HTML and JSP function. Division, let Tomcat only processes the JSP section, and other WEB servers by Apache, IIS, which greatly saves Tomcat limited work "thread".

4. Load balancing

Under the idea of ​​load balancing, multiple servers are symmetrical, each server has the same status, and can provide services separately without other servers. By load sharing techniques, the external transmission request is assigned to a certain server in a symmetrical structure in a certain rule, and the requested server is independently responding to the client's request.

A set of servers that provide services form an Application Server Cluster and provide a unified address. When a service request is sent to the cluster, select a server according to a certain rule, and the service is assigned to the server, so that the load is balanced.

By applying load balancing technology, the application service exceeds a server to provide services to limited users, and multiple servers can be used to serve a large number of users. When a server fails, the load balancing server automatically detects and stops distributing service requests to the server, and the service continues to serve the service, thereby ensuring the reliability of the service.

转载请注明原文地址:https://www.9cbs.com/read-129033.html

New Post(0)