In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How to treat the PHP+MySQL website structure, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
At present, the website architecture is generally divided into load balancing layer, WEB layer and database layer.
Load balancing layer-LVS
WEB layer-nginxweb server is used
Database layer-We used the db clustering scheme.
Website overview
Pageviews (PV) unique visitors (UV) visits (VV) individual IP posts registered members average online duration Today 80Magi 97337 99942 Magi 97962414072.27% 00Ru 07purd 56 yesterday 17914072.27% 00Ru 07purd 56 yesterday 179Mei 25074pm 584885848821155028577.48% 00Rd 1000 Historical average 154ju 02060JI 924477J 93620178.24242424242424% 140 10D00 an all-time high of 23899499499499499410Met 55262626606889.04% 00Rod 1102
1 code submission system
This is what you have to go through before the code enters the production environment.
After developing OK on the test server, we submit it to the SVN server and go to the code submission server.
After entering the code submission server, there are two steps to go, which I understand as a pull and a push.
A We use SVN up to update local files
B push to the production environment server using rsync
I wrote each of the above two parts into a shell file.
Just run bash xxx.sh.
(2) the process for users to visit a website is basically as follows:
The site uses dynamic CDN to speed up. Let's put dynamic CDN aside and talk about what happened below.
We used LVS at the front end. I used the encyclopedia article on LVS to explain:
LVS is an open source software founded by Dr. Zhang Wensong, who graduated from the University of Defense Science and Technology, in May 1998. it can realize simple load balancing under the LINUX platform. LVS is the abbreviation of Linux Virtual Server, which means Linux virtual server.
LVS cluster adopts IP load balancing technology and content-based request distribution technology. The scheduler has a good throughput, it transfers the requests to different servers in a balanced way, and the scheduler automatically shields the failure of the server, thus forming a group of servers into a high-performance and highly available virtual server. The structure of the whole server cluster is transparent to customers, and there is no need to modify client-side and server-side programs. For this reason, the transparency, scalability, high availability and manageability of the system need to be considered in the design.
Generally speaking, a LVS cluster has a three-tier structure, and its main components are:
A, load scheduler (load balancer), which is the front-end machine outside the entire cluster, is responsible for sending customers' requests to a group of servers for execution, and customers think that the service comes from an IP address (we can call it a virtual IP address).
B, server pool (server pool), is a group of servers that actually execute customer requests, performing services such as WEB, MAIL, FTP, and DNS.
C, shared storage (shared storage), which provides a shared storage area for the server pool, so it is easy to make the server pool have the same content and provide the same services.
A LVS
1 core is its load scheduler
Tower 2 is responsible for maintaining a routing table
(3) Real-time monitoring of real server health status
B LVS must have a hot backup hot back. If the LVS breaks down, it's over. In this way, in case the LVS breaks down, you can back up the LVS to take over the work.
C origin server 192.168.1.156 VIP 157 external virtual one hundred and fifteen. When DNS resolves the domain name, it resolves to this VIP. As for which server is accessed by specific users, it is transparent to users. LVS assigns origin server addresses to users according to IP load balancing technology.
D two origin server servers, in order to ensure data synchronization in some places, I did:
1 the cache between the two origin server servers is mounted through NFS to keep synchronized
2 write scheduled tasks in crontab and synchronize related ssi files
E backend DB connection, we use a 2 master 2 slave DB cluster
The two main libraries 77 and 78 are externally virtualized into VIP 110. the principle is that when any DB dies, the other will take over it immediately. The two db are masters and slaves of each other. Their survival status was monitored by keepalived.
F the master and slave libraries are synchronized through binlog. All binlog are sent through the main library. The other three slave libraries (one of which is the master database and the role is the slave database) accept binlog and maintain their respective data components.
G in addition, we have an attachment server. Reduce the pressure of WEB.
H in addition, there is a picture server / small icon server, which can be placed in web itself and distinguished by domain name. In fact, pictures, attachments, css and other places are not important, as long as they can be accessed through the domain name, it is completely possible.
We monitor the website through the Borey system. For web sites, the first screen time is the focus of the review, any user does not want to wait for the 3s clock page has not been loaded, the user experience is very poor.
This is the relevant monitoring and performance evaluation of various monitoring sites throughout the country after China's accession to the CDN.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.