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 > Servers >
Share
Shulou(Shulou.com)06/03 Report--
First, the basis of stand-alone performance optimization 1. Stand-alone era-static and dynamic separation Nginx + Tomcat to achieve dynamic and static separation
Advantages:
1.Nginx records access logs, and Tomcat turns off logging to improve the performance of Tomcat.
two。 Use Nginx to do seven-layer processing, such as ssl certificate, let Nginx implement it, such as judging from url, if pc access is redirected to where, where is the mobile phone call redirected?
Nginx+PHP to achieve dynamic and static separation 2. Stand-alone era-Database separation deploys web server and database separately. 3. Stand-alone era-component separation
Static servers use separate servers
Static servers use independent first-level domain names to prevent cookie from submitting
If there is no relationship between http links and links, session is introduced at this time, stored on the server side, and cookie is introduced on the client side to record session ID
Static servers can use multiple second-level domain names to improve loading speed
Static resources are stored on NFS as NFS, Socket Foundation and TCP three-way handshake 1. What is socket?
In the field of computer communication, socket is translated as "socket", which is a convention or a way of communication between computers. Through the convention of socket, one computer can receive data from other computers and send data to other computers.
Socket quintuple
1. Source IP address
two。 Source port
3. Destination IP address
4. Destination port
5. Type: tcp or udp
How do I view the linux random port range? Cat / proc/sys/net/ipv4/ip_local_port_range32768 60999
This range can be modified and optimized.
Echo "10000 61000" > / proc/sys/net/ipv4/ip_local_port_range2. Create an analog socket connection on the vm2 host create a listening port [root@vm2 ~] # nc-l-4-p 9999-k connect the port on the vm1 host And send the message [root@vm1 ~] # nc 192.168.100.108 9999qweq to check the connection status in the vm2 host [root@vm2 ~] # netstat-na | grep 9999tcp 00 0.0.0.09999qweq 9999 0.0.0.09999qweq * LISTEN tcp 00 192.168.100.1173vm2 4492 ESTABLISHED [root@vm2 ~] # lsof -i:9999COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEnc 9241 root 3U IPv4 46442 0t0 TCP *: distinct (LISTEN) nc 9241 root 4U IPv4 44975 0t0 TCP vm2:distinct- > 192.168.100.117 IPv4 34492 (ESTABLISHED) 3.TCP three-way handshake four times disconnect
TCP three-way handshake
TCP disconnected four times (based on full duplex)
4.Time_wait tuning time_wait takes up socket, so it can be used as an optimization point [root@vm1 ~] # cat / proc/sys/net/ipv4/tcp_tw_recycle 0 # to quickly destroy the policy. Generally, the client cannot enable the nat network. 0 means to disable the 1 means to enable [root@vm1 ~] # cat / proc/sys/net/ipv4/tcp_tw_reuse 0 # reuse policy, which can be enabled, but the tcp_timestamps should also be enabled. Change 0 to 1, and [root@vm1 ~] # cat / proc/sys/net/ipv4/tcp_timestamps 1 # enables the timestamp, which needs to be enabled.
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.