面试题: Nginx 的优化思路有哪些?网站的防盗链如何做?

文章目录

  • 拓扑图
  • 推荐步骤
  • 在Centos01上安装Nginx,设置网站根目录/www使用域名www.h.com访问
    • 配置Nginx
    • 配置DNS
  • 验证Nginx日志切割
  • 在www.h.com网站配置防盗链防止www.hy.com盗www.h.com的连接


注:本文提到的网址仅不是实际存在的网站,仅作为技术学习举例之用。

前几天,有个读者向我吐槽,找了很久的工作,好不容易熬到到了二面(技术面,如果过了就基本定了)。谁知道没有准备充分,被一道题给直接挂掉了。

这道题就是:Nginx的优化思路有哪些?网站的防盗链如何做?实际工作中有哪些类似的安全经验?结果支支吾吾半天没讲到重点,结果就可想而知了。。。

所以,今天就带大家来一起重新复习一下这方面的知识点。

拓扑图

图片

推荐步骤

1、在Centos01上安装Nginx,设置网站根目录/www使用域名www.h.com访问

2、在Centos02上安装DNS使用域名访问Centos01上使用域名www.h.com访问,Centos03使用yum安装apache使用域名www.hy.com访问

3、在www.h.com域名的网站隐藏Nginx版本、查看Nginx管理用户、设置网页缓存、配置日志切割、配置Nginx日志切割、设置超时时间

4、在www.h.com网站配置防盗链防止www.hy.com盗 www.h.com的连接

在Centos01上安装Nginx,设置网站根目录/www使用域名www.h.com访问

挂载Centos7系统光盘

[root@centos01 ~]# mount /dev/cdrom /mnt/  

mount: /dev/sr0 写保护,将以只读方式挂载

创建nginx管理账户

[root@centos01 ~]# useradd -M -s /sbin/nologin nginx  

传输nginx1.16.1文件

[root@centos01 ~]# rz  
z waiting to receive.**B0100000023be50  

安装依赖文件

[root@centos01 ~]# yum -y install pcre-devel zlib-devel  

解压nginx配置文件

[root@centos01 ~]# yum -y install pcre-devel zlib-devel  

修改源代码程序

[root@centos01 ~]# vim /usr/src/nginx-1.16.1/src/core/nginx.h  
13 #define NGINX_VERSION    "7.0"  
14 #define NGINX_VER      "IIS/" NGINX_VERSION  
22 #define NGINX_VAR      "IIS"  

修改Nginx数据包请求头部

[root@centos01 ~]# vim/usr/src/nginx-1.16.1/src/http/ngx_http_header_filter_module.c  49 static u_char ngx_http_server_string[] = "Server: IIS" CRLF;li  

配置Nginx

[root@centos01 ~]# cd /usr/src/nginx-1.16.1/  
[root@centos01 nginx-1.16.1]# ./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_stub_status_module  
#编译安装Nginx  
[root@centos01 nginx-1.16.1]# make && make install  # 优化命令  
[root@centos01 nginx-1.16.1]# ln -s /usr/local/nginx/sbin/* /usr/local/sbin/  
[root@centos01 nginx-1.16.1]# cd  
[root@centos01 ~]# nginx -t  
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok  
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful  # 创建网站根目录www 设置网站主页  
[root@centos01 ~]# mkdir /www/  
[root@centos01 ~]# echo "www.h.com" > /www/index.html  

在 Centos03 上安装 DNS 使用域名访问 Centos01 上使用域名http://www.bdqn___.com/访问,Centos02 使用 yum 安装 apache 使用域名http://www.benet___.com/访问。

配置DNS

centos01配置DNS,重启网卡服务

[root@centos01 ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens32  
[root@centos01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens32  
TYPE=Ethernet  
BOOTPROTO=static  
NAME=ens32  
DEVICE=ens32  
ONBOOT=yes  
IPADDR=192.168.100.10  
NATMACK=255.255.255.0  
DNS1=192.168.100.30  [root@centos01 ~]# systemctl restart network  
[root@centos01 ~]# cat /etc/resolv.conf   
# Generated by NetworkManager  
nameserver 192.168.100.30  

centos02配置DNS 重启网卡服务

[root@centos02 ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens32  
[root@centos02 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens32  
TYPE=Ethernet  
BOOTPROTO=static  
NAME=ens32  
DEVICE=ens32  
ONBOOT=yes  
IPADDR=192.168.100.20  
NATMACK=255.255.255.0  
DNS1=192.168.100.30  [root@centos02 ~]# systemctl restart network  
[root@centos02 ~]# cat /etc/resolv.conf   
# Generated by NetworkManager  
nameserver 192.168.100.30  

centos03配置DNS 重启网卡服务

[root@centos03 ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens32  
[root@centos03 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens32  
TYPE=Ethernet  
BOOTPROTO=static  
NAME=ens32  
DEVICE=ens32  
ONBOOT=yes  
IPADDR=192.168.100.30  
NATMACK=255.255.255.0  
DNS1=192.168.100.30  
[root@centos03 ~]# systemctl restart network  
[root@centos03 ~]# cat /etc/resolv.conf   
# Generated by NetworkManager  
nameserver 192.168.100.30  

挂载centos7系统光盘 安装DNS

[root@centos03 ~]# mount /dev/cdrom /mnt/  
mount: /dev/sr0 写保护,将以只读方式挂载  
[root@centos03 ~]# ls /mnt/  
CentOS_BuildTag  EULA  images   LiveOS   repodata        RPM-GPG-KEY-CentOS-Testing-7  
EFI        GPL  isolinux  Packages  RPM-GPG-KEY-CentOS-7  TRANS.TBL  
root@centos03 ~]# rpm -ivh /mnt/Packages/bind-9.9.4-50.el7.x86_64.rpm   
[root@centos03 ~]# rpm -ivh /mnt/Packages/bind-chroot-9.9.4-50.el7.x86_64.rpm  

配置DNS主配置文件

[root@centos03 ~]# echo "" > /etc/named.conf  
[root@centos03 ~]# vim /etc/named.conf  
options {  listen-on port 53 { any; };  directory "/var/named/";  
};  
zone "h.com" IN {  type master;  file "/var/named/h.com.zone";  
};  
zone "hy.com" IN {  type master;  file "/var/named/hy.com.zone";  
};  

配置DNS区域配置文件第一台服务器

[root@centos03 ~]# vim /var/named/h.com.zone  
$TTL       86400  
@        SOA       h.com.    root.h.com. (  2023021015  1H  15M  1W  1D  
)  
@        NS        centos03.h.com.  
centos03     A        192.168.100.30  
www       A        192.168.100.10  
[root@centos03 ~]# named-checkzone h.com /var/named/h.com.zone  
zone h.com/IN: loaded serial 2023021015  
OK  

配置第二台DNS区域配置文件

[root@centos03 ~]# vim /var/named/hy.com.zone  
$TTL       86400  
@        SOA       hy.com.    root.hy.com. (  2023021015  1H  15M  1W  1D  
)  
@        NS        centos03.hy.com.  
centos03     A        192.168.100.30  
www       A        192.168.100.20  
[root@centos03 ~]# named-checkzone hy.com /var/named/hy.com.zone  
zone hy.com/IN: loaded serial 2023021015  
OK  

启动DNS服务监听端口

[root@centos03 ~]# systemctl stop named  
[root@centos03 ~]# systemctl start named  
[root@centos03 ~]# netstat -anptu | grep named  
tcp     0    0 192.168.100.30:53    0.0.0.0:*        LISTEN    2430/named        
tcp     0    0 127.0.0.1:53       0.0.0.0:*        LISTEN    2430/named        
tcp     0    0 127.0.0.1:953      0.0.0.0:*        LISTEN    2430/named        
tcp6    0    0 ::1:953         :::*           LISTEN    2430/named        
udp     0    0 192.168.122.1:53     0.0.0.0:*              2430/named        
udp     0    0 192.168.100.30:53    0.0.0.0:*              2430/named        
udp     0    0 127.0.0.1:53       0.0.0.0:*              2430/named  

验证访问 www.h.com
图片

挂centos7系统光盘 yum安装apache

[root@centos02 ~]# mount /dev/cdrom /mnt/  
mount: /dev/sr0 写保护,将以只读方式挂载  
[root@centos02 ~]# ls mn  
ls: 无法访问mn: 没有那个文件或目录  
[root@centos02 ~]# ls /mnt/  
CentOS_BuildTag  EFI  EULA  GPL  images  isolinux  LiveOS  Packages  repodata  RPM-GPG-KEY-CentOS-7  RPM-GPG-KEY-CentOS-Testing-7  TRANS.TBL  
[root@centos02 ~]# yum -y install httpd  

设置开机自启 设置网站主页

[root@centos02 ~]# systemctl restart httpd  
[root@centos02 ~]# systemctl enable httpd  
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.  
[root@centos02 ~]# echo "www.hy.com" > /var/www/html/index.html  

验证访问www.hy.com
图片

在www.h.com域名的网站隐藏Nginx版本、查看Nginx管理用户、设置网页缓存、配置日志切割、配置Nginx日志切割、设置超时时间。

#隐藏版本和优化管理Nginx进程用户 修改Nginx主配置文件  
vim /usr/local/nginx/conf/nginx.conf  
user  nginx;  
worker_processes  1;  
pid     logs/nginx.pid;  
events {  worker_connections  1024;  
}  
http {  include    mime.types;  default_type  application/octet-stream;  sendfile     on;  keepalive_timeout  65;  server_tokens Off;  server {  listen    192.168.100.10:80;  server_name  www.h.com;  charset utf-8;  access_log  logs/www.h.com.access.log;  location / {  root  /www/;  index  index.html index.htm;  }  }  
}  
[root@centos01 ~]# nginx -t  
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok  
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful  #查看Nginx进程  
[root@centos01 ~]# ps -ef | grep nginx  
root    5469    1  0 00:03 ?     00:00:00 nginx: master process nginx  
nginx    5470  5469  0 00:03 ?     00:00:00 nginx: worker process  
root    5472  1186  0 00:03 pts/0   00:00:00 grep --color=auto nginx  

验证隐藏版本

图片

# 设置网页缓存时间 修改Nginx主配置文件支持图片缓存  
[root@centos01 ~]# vim /usr/local/nginx/conf/nginx.conf  
user  nginx;  
worker_processes  1;  
pid     logs/nginx.pid;  
events {  worker_connections  1024;  
}  
http {  include    mime.types;  default_type  application/octet-stream;  sendfile     on;  keepalive_timeout  65;  server_tokens Off;  server {  listen    192.168.100.10:80;  server_name  www.h.com;  charset utf-8;  access_log  logs/www.h.com.access.log;  location ~ \.(gif|jpg|png|jpeg|bmp|swf)$ {  root /www;  expires 1d;  }  location / {  root  /www;  index  index.html index.htm;  }  }  
}  
[root@centos01 ~]# nginx -t  
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok  
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful  #设置网页加载图片  
[root@centos01 ~]# cd /www/  
[root@centos01 www]# rz  
[root@centos01 www]# ls  
index.html  logo.jpg  #重启Nginx服务  
[root@centos01 www]# killall nginx  
[root@centos01 www]# killall nginx  
nginx: no process found  
[root@centos01 www]# nginx  
[root@centos01 www]# cd  

验证网页缓存

图片

图片

#配置Nginx日志切割、设置超时时间 创建存储日志切割目录  
[root@centos01 ~]# mkdir /nginx_log  #编写日志切割脚本  
[root@centos01 ~]# vim /opt/nginx_log_.sh  
#!/bin/bash  
d=$(date -d "-1 day" "+%Y%m%d")  
logs_path="/nginx_log/"  
pid_path="/usr/local/nginx/logs/nginx.pid"  
[ -d $logs_path ] || mkdir -p $logs_path  
mv /usr/local/nginx/logs/www.h.com.access.log ${logs_path}/www.h.com-access.log-$d  
kill -USR1 $(cat $pid_path)   
find $logs_path -mtime +30 |xargs rm -rf  #添加执行权限  
[root@centos01 ~]# chmod +x /opt/nginx_log_.sh  #执行脚本  
[root@centos01 ~]# sh /opt/nginx_log_.sh  #验证切割  
[root@centos01 ~]# ls /nginx_log/  
www.h.com-access.log-20230210  #编辑计划任务,十分钟切割一次  
[root@centos01 ~]# crontab -e  
*/10   *    *    *    *    /opt/nginx_log_.sh  

验证Nginx日志切割

图片

#优化Nginx保持连接 修改Nginx主配置文件  
[root@centos01 ~]# vim /usr/local/nginx/conf/nginx.conf  
user  nginx;  
worker_processes  2;  
pid     logs/nginx.pid;  
events {  worker_connections  2048;  
}  
http {  include    mime.types;  default_type  application/octet-stream;  sendfile     on;  keepalive_timeout  5;  server_tokens Off;  client_header_timeout 5;  client_body_timeout 5;  server {  listen    192.168.100.10:80;  server_name  www.h.com;  charset utf-8;  access_log  logs/www.h.com.access.log;  location ~ \.(gif|jpg|png|jpeg|bmp|swf)$ {  root /www;  expires 1d;  }  location / {  root  /www;  index  index.html index.htm;  }  }  
}  #重新启动Nginx  
[root@centos01 ~]# killall nginx  
[root@centos01 ~]# killall nginx  
nginx: no process found  
[root@centos01 ~]#   
[root@centos01 ~]# nginx  #验证优化Nginx保持连接  
[root@centos01 ~]# curl -I www.h.com  
HTTP/1.1 200 OK  
Server: IIS  
Date: Fri, 10 Feb 2023 16:45:44 GMT  
Content-Type: text/html; charset=utf-8  
Content-Length: 13  
Last-Modified: Fri, 10 Feb 2023 14:56:16 GMT  
Connection: keep-alive  
ETag: "63e65b10-d"  
Accept-Ranges: bytes  

在www.h.com网站配置防盗链防止www.hy.com盗www.h.com的连接

#上传错误图片  
[root@centos01 ~]# cd /www/  
[root@centos01 www]# ls  
index.html  logo.jpg  
[root@centos01 www]# rz  
z waiting to receive.**B0100000023be50  
[root@centos01 www]# ls  
error.png  index.html  logo.jpg  #修改Nginx主配置文件  
user  nginx;  
worker_processes  2;  
pid     logs/nginx.pid;  
events {  worker_connections  2048;  
}  
http {  include    mime.types;  default_type  application/octet-stream;  sendfile     on;  server {  listen    192.168.100.10:80;  server_name  www.h.com;  charset utf-8;  access_log  logs/www.h.com.access.log;  location ~* \.(gif|jpg|swf)$ {  valid_referers none blocked *.h.com h.com;  if ($invalid_referer) {  rewrite ^/ http://www.h.com/error.png;  }  
}  location / {  root  /www;  index  index.html index.htm;  }  }  
}  
[root@centos01 ~]# nginx -t  
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok  
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful  #重新启动Nginx  
[root@centos01 ~]# killall nginx  
[root@centos01 ~]# killall nginx  
nginx: no process found  
[root@centos01 ~]#   
[root@centos01 ~]# nginx  #centos02模拟盗取centos01链接  
[root@centos02 ~]# vim /var/www/html/index.html  
www.hy.com  
<img src="http://www.h.com/logo.jpg" />  

图片

重启服务

[root@centos02 ~]# systemctl restart httpd  

验证防盗链

图片

centos01图片

图片

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/244186.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

写Shell以交互方式变更Ubuntu的主机名

以下是一个简单的 Bash 脚本&#xff0c;用于以交互方式更改 Ubuntu 20 系统的主机名&#xff1a; 1#!/bin/bash 2 3# 提示用户输入新的主机名 4read -p "请输入新的系统名称&#xff08;主机名&#xff09;: " new_hostname 5 6# 检查是否输入了新的主机名 7if [ -…

Qt解析含颜色的QString字符串显示到控件

1、需求 开发接收含颜色字符串显示到窗口&#xff0c;可解析字符串颜色配置窗口属性&#xff0c;且分割字符串显示。 mprintf(“xxxxxx”)&#xff1b;打印的xxxxxx含有颜色配置。 2、实现方法 2.1、条件 选用Qt的PlainTextEdit控件显示字符串&#xff0c;配置为只读模式 …

31、WEB攻防——通用漏洞文件上传JS验证mimeuser.ini语言特性

文章目录 文件上传一、前端验证二、.user.ini 文件上传 检测层面&#xff1a;前端、后端等检测内容&#xff1a;文件头、完整性、二次渲染等检测后缀&#xff1a;黑名单、白名单、MIME检测等绕过技巧&#xff1a;多后缀解析&#xff08;php5、php7&#xff09;、截断、中间件特…

检查字符串数组中的每个字符串是否全为“不显示元素”(如空格、制表符、换行符等)numpy.char.isspace()

【小白从小学Python、C、Java】 【计算机等级考试500强双证书】 【Python-数据分析】 检查字符串数组中的每个字符串 是否全为“不显示元素” &#xff08;如空格、制表符、换行符等&#xff09; numpy.char.isspace() [太阳]选择题 请问以下代码最终输出结果是&#xff1f; i…

机器学习实验3——支持向量机分类鸢尾花

文章目录 &#x1f9e1;&#x1f9e1;实验内容&#x1f9e1;&#x1f9e1;&#x1f9e1;&#x1f9e1;数据预处理&#x1f9e1;&#x1f9e1;代码认识数据相关性分析径向可视化各个特征之间的关系图 &#x1f9e1;&#x1f9e1;支持向量机SVM求解&#x1f9e1;&#x1f9e1;直觉…

HuoCMS|免费开源可商用CMS建站系统HuoCMS 2.0下载(thinkphp内核)

HuoCMS是一套基于ThinkPhp6.0Vue 开发的一套HuoCMS建站系统。 HuoCMS是一套内容管理系统同时也是一套企业官网建设系统&#xff0c;能够帮过用户快速搭建自己的网站。可以满足企业站&#xff0c;外贸站&#xff0c;个人博客等一系列的建站需求。HuoCMS的优势: 可以使用统一后台…

从规则到神经网络:机器翻译技术的演化之路

文章目录 从规则到神经网络&#xff1a;机器翻译技术的演化之路一、概述1. 机器翻译的历史与发展2. 神经机器翻译的兴起3. 技术对现代社会的影响 二、机器翻译的核心技术1. 规则基础的机器翻译&#xff08;Rule-Based Machine Translation, RBMT&#xff09;2. 统计机器翻译&am…

一文掌握SpringBoot注解之@Component 知识文集(1)

&#x1f3c6;作者简介&#xff0c;普修罗双战士&#xff0c;一直追求不断学习和成长&#xff0c;在技术的道路上持续探索和实践。 &#x1f3c6;多年互联网行业从业经验&#xff0c;历任核心研发工程师&#xff0c;项目技术负责人。 &#x1f389;欢迎 &#x1f44d;点赞✍评论…

基本语法和 package 与 jar

3.基本语法 1.输入输出 // 导入 java.util 包中的 Scanner 类 import java.util.Scanner;// 定义名为 ScannerExample 的公共类 public class ScannerExample {// 主方法&#xff0c;程序的入口点public static void main(String[] args) {// 创建 Scanner 对象&#xff0c;用…

远程git开发

两种本地与远程仓库同步 """ 1&#xff09;你作为项目仓库初始化人员&#xff1a;线上要创建空仓库 > 本地初始化好仓库 > 建立remote链接(remote add) > 提交本地仓库到远程(push)2&#xff09;你作为项目后期开发人员&#xff1a;远程项目仓库已经创…

OpenHarmony 鸿蒙使用指南——概述

简介 OpenHarmony采用多内核&#xff08;Linux内核或者LiteOS&#xff09;设计&#xff0c;支持系统在不同资源容量的设备部署。当相同的硬件部署不同内核时&#xff0c;如何能够让设备驱动程序在不同内核间平滑迁移&#xff0c;消除驱动代码移植适配和维护的负担&#xff0c;…

深入浅出理解目标检测的NMS非极大抑制

一、参考资料 物体检测中常用的几个概念迁移学习、IOU、NMS理解 目标定位和检测系列&#xff08;3&#xff09;&#xff1a;交并比&#xff08;IOU&#xff09;和非极大值抑制&#xff08;NMS&#xff09;的python实现 Pytorch&#xff1a;目标检测网络-非极大值抑制(NMS) …

【软考中级】3天擦线过软考中级-软件设计师

前提&#xff1a;已有数据结构、操作系统、计算机网络、数据库基础 &#xff08;风险系数较高&#xff0c;请谨慎参考&#xff09; 贴一个成绩单hhhh 弯路&#xff1a;很早之前有看过一遍网上的软考课程&#xff0c;也记录了一些笔记&#xff0c;然而听完还是啥都记不住。 推…

【超简版,代码可用!】【0基础Python爬虫入门——下载歌曲/视频】

安装第三方模块— requests 完成图片操作后输入&#xff1a;pip install requests 科普&#xff1a; get:公开数据 post:加密 &#xff0c;个人信息 进入某音乐网页&#xff0c;打开开发者工具F12 选择网络&#xff0c;再选择—>媒体——>获取URL【先完成刷新页面】 科…

Pycharm详细安装 配置教程

继上次安装完Anaconda之后&#xff0c;现在更新最新版本的pycharm的安装和使用教程~~~ Anaconda&#xff1a;是一个开源的Python发行版本&#xff0c;其中包含了conda、Python等180多个科学包及其依赖项。【Anaconda和Pycharm详细安装 配置教程_anconda安装时clear the packag…

【Emgu CV教程】6.1、图像平滑之添加雪花噪声

文章目录 前言一、什么样的图像需要平滑&#xff1f;二、平滑的办法有哪些三、制作需要平滑的图片1.制作微小斑点的噪声2.制作稍大一点的噪声 总结 前言 首先说三点&#xff1a; 图像平滑&#xff0c;一般就是指对图像进行模糊或去噪&#xff0c;平滑后的图像减少了噪声&…

​ElasticSearch

目录 简介 基本概念 倒排索引 FST 简介 ES是一个基于lucene构建的&#xff0c;分布式的&#xff0c;RESTful的开源全文搜索引擎。支持对各种类型的数据的索引&#xff1b;搜索速度快&#xff0c;可以提供实时的搜索服务&#xff1b;便于水平扩展&#xff0c;每秒可以处理 …

【深度学习:Collaborative filtering 协同过滤】深入了解协同过滤:技术、应用与示例

此图显示了使用协作筛选预测用户评分的示例。起初&#xff0c;人们会对不同的项目&#xff08;如视频、图像、游戏&#xff09;进行评分。之后&#xff0c;系统将对用户对项目进行评分的预测&#xff0c;而用户尚未评分。这些预测基于其他用户的现有评级&#xff0c;这些用户与…

npm install运行报错npm ERR! gyp ERR! not ok问题解决

执行npm install的时候报错&#xff1a; npm ERR! path D:..\node_modules\\**node-sass** npm ERR! command failed ...npm ERR! gyp ERR! node -v v20.11.0 npm ERR! gyp ERR! node-gyp -v v3.8.0 npm ERR! gyp ERR! not ok根据报错信息&#xff0c;看出时node-sass运行出现…

Thinkphp框架,最新ICP备案查询系统源码,附搭建教程

源码介绍 最新ICP备案查询系统源码 附教程 thinkphp框架 本系统支持网址备案&#xff0c;小程序备案&#xff0c;APP备案查询&#xff0c;快应用备案查询 优势&#xff1a; 响应速度快&#xff0c;没有延迟&#xff0c;没有缓存&#xff0c;数据与官方同步