Simple analysis of Linux mainstream architecture operation and maintenance work

With the continuous development of IT operation and maintenance, especially the rapid development of Linux , more and more enterprises have begun to use Linux operating system platforms, such as CentOS , RedHat, Ubuntu, Fedora, etc., and hundreds of millions of websites have emerged on the Internet today. , the Internet has become an indispensable tool, so today we will share with you the most commonly used mainstream website architecture under Linux.

With the continuous development of IT operation and maintenance, especially the rapid development of Linux, more and more enterprises have begun to use Linux operating system platforms, such as CentOS, RedHat, Ubuntu, Fedora, etc., and hundreds of millions of websites have emerged on the Internet today. , the Internet has become an indispensable tool, so today we will share with you the most commonly used mainstream website architecture under Linux: LVS+KEEPALIVED(heartbeat)+Squid+Nginx/Apache+JAVA/PHP+MySQL/MariaDB wait. Share a simple topology diagram for your reference in experiments

General websites are 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, different companies also have a lot of things to expand, and 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:

LVS load balancing layer

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

The simple working principle of LVS: the user requests LVS VIP, LVS forwards the request to the backend server according to the forwarding method and algorithm, and the backend server receives the request and returns it to the user. For the user, the specific application of the WEB backend is invisible .

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

Nginx reverse proxy layer

Nginx is currently the mainstream high-performance WEB server. Nginx is currently developing rapidly because of its excellent stability, rich feature set, sample configuration files, and low system resource consumption.

Nginx is mainly based on 7-layer applications, which can realize various rule forwarding, reverse proxy our back-end JAVA, PHP dynamic server, and the official theory of Nginx's ability to process static pages is 5w/s, and Nginx can also be used as a cache server to store our Static page caching, performance comparable to squid.

As IT operation and maintenance personnel in daily operation and maintenance, they need to pay attention to the overall operation of the website for a long time, analyze the bottleneck of the website, continuously optimize the relevant parameters of Nginx, and ensure that there is no abnormality in the connection between Nginx and the back-end service.

backend service layer

The backend stores our real website and background services, which are called by the frontend Nnginx, common service analysis software in the backend, if it is jsp language, the container is Tomcat, Resin, Weblogic, etc.

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

In daily operation and maintenance, it is necessary to pay attention to the monitoring of the back-end service layer and the number of connections. It is necessary to pay attention to and monitor the normality of the back-end services in real time, and configure multiple instances and redundant cases.

database layer

At present, mainstream Internet databases include Mysql, Mariadb, mongodb, Oracle, etc. For databases, they are the core layer of the entire architecture, and data is the foundation of enterprise survival, so 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.

For IT operation and maintenance personnel, when maintaining the database, they need to pay close attention to changes in the number of concurrent databases, connection pools, etc., pay attention to changes in database master-slave, read-write separation status, and logs, and formulate a complete backup mechanism to complete database backups. deal with.

 

Guess you like

Origin blog.csdn.net/yaxuan88521/article/details/131493906