Home > Operation and Maintenance > Linux Operation and Maintenance > Analysis of the working principle and process of Linux mainstream framework operation and maintenance

Analysis of the working principle and process of Linux mainstream framework operation and maintenance

巴扎黑
Release: 2017-07-21 17:49:50
Original
1594 people have browsed it

LINUX is open source, which is also the main reason. If you want to learn Windows, Unix is ​​sorry, there is no source code. It is precisely because of this that LINUX can grow bigger and bigger like a snowball and develop to its current scale. Today I will bring you an analysis of the operation and maintenance work of Linux mainstream frameworks. You must read it carefully~

With the continuous development of IT operation and maintenance, especially the rapid development of Linux, more and more enterprises Start using Linux operating system platforms, such as CentOS, RedHat, Ubuntu, Fedora, etc. Hundreds of billions of websites have emerged on the Internet today. The Internet has become an indispensable tool. Today we will share with you and discuss the current The most popular website architecture under Linux:

LVS+KEEPALIVED(heartbeat)+Squid+Nginx/Apache+java/php

+MySQL/MariaDB, etc., share a simple topology diagram for Dear students, experimental reference

Analysis of the working principle and process of Linux mainstream framework operation and maintenance

Generally, the website is generally divided into four layers, which are front-end load balancing, intermediate proxy, back-end service, and database layer.

Of course, in addition to this overall process, there are also many things that different companies have expanded. Various systems are constantly added to this architecture, forming a very large and complex system. Then we need to pay attention to the details of each level of operation and maintenance personnel:

1) The LVS load balancing layer is as follows:

The LVS load balancing layer is mainly used to resist large traffic and forward data functions. , generally forwarded based on the TCP/IP four-layer protocol. The forwarding methods used vary according to different internal environments. Generally, the DR mode is more efficient. With the combination of LVS+keepalived, we can use keepalived to manage our entire configuration file and be responsible for balancing. It becomes simple and practical, and you can use various plans to check whether the backend Nginx or Squid service is normal.

Analysis of the working principle and process of Linux mainstream framework operation and maintenance

The simple working principle of LVS: the user requests LVS VIP, LVS forwards the request to the back-end server according to the forwarding method and algorithm, and the back-end server receives the request and returns it to the user , for users, they cannot see the specific application of the WEB backend.

Operation and maintenance personnel need to pay close attention to the current number of LVS forwarding connections and system LVS logs when maintaining LVS. Monitor VIP, real IP status, and number of connections through the monitoring platform.

2) The Nginx reverse proxy layer is as follows:

Nginx is currently the mainstream high-performance WEB server. Nginx has very good stability, rich feature set, sample configuration files and low system cost. With advantages such as resource consumption, the current development momentum is very hot.

Nginx is mainly based on 7-layer applications, which can realize various rule forwarding and reverse proxy our back-end JAVA and PHP dynamic servers. At the same time, Nginx’s own ability to process static pages has an official theoretical concurrency of 5w/s. At the same time, Nginx also It can be used as a cache server to store our static page cache, and its performance is comparable to Squid.

As IT operation and maintenance personnel, in daily operation and maintenance, you need to pay long-term attention to the overall operation of the website, analyze website bottlenecks, constantly optimize the relevant parameters of Nginx, and ensure that there are no abnormalities in the connection between Nginx and the back-end service. .

 3) The back-end service layer is as follows:

The back-end stores our real website and back-end services, which are called through the front-end Nnginx. The common service parsing software on the back-end, if it is jsp language, Containers are Tomcat, Resin, Weblogic, etc.

If it is a PHP program, we need to install the PHP environment to parse the PHP code, and then provide user access through the front-end Nginx reverse proxy.

In daily operation and maintenance, you need to pay attention to the monitoring of the back-end service layer and the number of connections. You must pay attention and monitor the normality of the back-end service in real time, configure multiple instances, and redundant cases.

4) The database layer is as follows:

At present, the mainstream databases on the Internet include Mysql, Mariadb, mongodb, Oracle, etc. The database is the core layer of the entire architecture, and data is the basis for the survival of the enterprise. Therefore, database architecture and maintenance are also crucial. Medium and large Internet companies have their own full-time DBA personnel responsible for the operation and maintenance of Mysql.

When IT operation and maintenance personnel maintain the database, they need to pay close attention to changes in the number of database concurrencies, connection pools, etc., pay attention to changes in the database master-slave, read-write separation status, and logs, and develop a complete backup mechanism to complete the database. Back up and deal with problems in a timely manner.

Extracurricular knowledge sharing:

In daily life, we seem to deal more with Windows. In fact, we also deal with Linux silently.

Analysis of the working principle and process of Linux mainstream framework operation and maintenance

Android puts Linux into the hands of countless mobile device consumers around the world. This is probably the greatest success Linux has achieved in the mainstream so far.

The reason why Linux can become an important member of the operating system industry and play an increasingly important role is inseparable from its many advantages.

First of all, Linux is a free operating system, which is in sharp contrast to Windows.

Linux users can obtain it for free through the Internet or other channels, and can modify its source code at will.

This is something other operating systems cannot do.

It is precisely because of this that countless programmers from all over the world have participated in the modification and writing of Linux. Programmers can change it according to their own interests and inspirations.

This allows Linux to absorb the essence of countless programmers and continue to grow.

Secondly, Linux is fully compatible with the POSIX 1.0 standard, which allows common DOS and Windows programs to be run under Linux through corresponding emulators.

The above is the detailed content of Analysis of the working principle and process of Linux mainstream framework operation and maintenance. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template