Nignx及负载均衡动静分离

目录

一.Nginx负载均衡

1.1.下载

1.2.安装

1.3.负载均衡

二.前端部署

2.1. 准备工作

2.2.部署

         好啦今天就到这里了哦!!!希望能帮到你哦!!!


一.Nginx负载均衡

1.1.下载

输入命令 :  cd javaCloudJun/software  进入到资源文件目录

安装 Nginx 的4个依赖

输入命令 : yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel

输入命令 :  tar -xvf nginx-1.13.7.tar.gz   ( 解压 Nginx

 

解压后进入其文件

命令 :  cd nginx-1.13.7  

编译,执行配置: 考虑到后续安装ssl证书 添加两个模块

命令 : ./configure --with-http_stub_status_module --with-http_ssl_module

1.2.安装

之后进行安装

命令 :   make && make install

安装完后,进入该目录

输入命令 :  cd /usr/local/nginx

进入 /usr/local/nginx/sbin 目录下启动:

输入命令 :  cd sbin/

启动前安装 lsof 命令

输入命令 :  yum install -y  lsof

设置防火墙 开放 80 端口

输入命令 : firewall-cmd --zone=public --add-port=80/tcp --permanent

更新防火墙的端口并且查看已开放的端口

输入命令 :  firewall-cmd --reload && firewall-cmd --list-port

# 启动

命令 :  ./nginx

#查看 

命令 :  lsof -i:80

在浏览器中,输入虚拟机【Linux】-Centos的IP地址进行搜索

以上就是Nginx 的使用配置并且开启完成了哦。

1.3.负载均衡

在资源文件夹中,创建一个tomcat文件夹,来存放Tomcat

输入命令 :  mkdir tomcat

并且将tomcat服务解压到指定目录,刚刚创建的tomcat文件夹中。

输入命令 : tar -xvf apache-tomcat-8.5.tar.gz -C tomcat

进入tomcat文件夹中

命令 :  cd tomcat/

复制一个tomcat,准备2个tomcat

命令 : cp -r apache-tomcat-8.5.20/ apache-tomcat-8.5.20_8081/

查看命令 : ll

将其中的一个tomcat修改端口,避免两个服务同时开启时端口被占用的情况。

命令 :  cd apache-tomcat-8.5.20/conf   ( 进入到tomcat的conf文件中 )

找到server.xml 文件进行修改端口

命令 : vim server.xml   ( 编辑文件修改端口 )

 

修改端口号:

 

 

 修改后的所以代码 : 

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- Note:  A "Server" is not itself a "Container", so you may not
     define subcomponents such as "Valves" at this level.
     Documentation at /docs/config/server.html
 -->
<Server port="8006" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
  <!-- Security listener. Documentation at /docs/config/listeners.html
  <Listener className="org.apache.catalina.security.SecurityListener" />
  -->
  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
 
  <!-- Global JNDI resources
       Documentation at /docs/jndi-resources-howto.html
  -->
  <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>
 
  <!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" Note:  A "Service" is not itself a "Container",
       so you may not define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/service.html
   -->
  <Service name="Catalina">
 
    <!--The connectors can use a shared executor, you can define one or more named thread pools-->
    <!--
    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
        maxThreads="150" minSpareThreads="4"/>
    -->
 
 
    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
    -->
    <Connector port="8081" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    -->
    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
         This connector uses the NIO implementation. The default
         SSLImplementation will depend on the presence of the APR/native
         library and the useOpenSSL attribute of the
         AprLifecycleListener.
         Either JSSE or OpenSSL style configuration may be used regardless of
         the SSLImplementation selected. JSSE style configuration is used below.
    -->
    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="150" SSLEnabled="true">
        <SSLHostConfig>
            <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>
    -->
    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
         This connector uses the APR/native implementation which always uses
         OpenSSL for TLS.
         Either JSSE or OpenSSL style configuration may be used. OpenSSL style
         configuration is used below.
    -->
    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
               maxThreads="150" SSLEnabled="true" >
        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
        <SSLHostConfig>
            <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
                         certificateFile="conf/localhost-rsa-cert.pem"
                         certificateChainFile="conf/localhost-rsa-chain.pem"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>
    -->
 
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8010" protocol="AJP/1.3" redirectPort="8443" />
 
 
    <!-- An Engine represents the entry point (within Catalina) that processes
         every request.  The Engine implementation for Tomcat stand alone
         analyzes the HTTP headers included with the request, and passes them
         on to the appropriate Host (virtual host).
         Documentation at /docs/config/engine.html -->
 
    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
    -->
    <Engine name="Catalina" defaultHost="localhost">
 
      <!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)
          /docs/config/cluster.html (reference documentation) -->
      <!--
      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
      -->
 
      <!-- Use the LockOutRealm to prevent attempts to guess user passwords
           via a brute-force attack -->
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <!-- This Realm uses the UserDatabase configured in the global JNDI
             resources under the key "UserDatabase".  Any edits
             that are performed against this UserDatabase are immediately
             available for use by the Realm.  -->
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase"/>
      </Realm>
 
      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
 
        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->
 
        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html
             Note: The pattern used is equivalent to using pattern="common" -->
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log" suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
 
      </Host>
    </Engine>
  </Service>
</Server>

注 : 将该服务器tomcat的所以端口都进行了修改,以免其他所有端口也有冲突。

并且将这个服务器的页面显示内容进行修改,访问时容易分辨是哪个tomcat端口进入的

在tomcat根目录的webapps中的ROOT目录中,找到index.jsp文件,在MobaXterm工具的左边选中这个文件,右键点击第二个进行打开文件,并且修改编辑文件。

 

编辑后的所有内容如下  : 

<%--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements.  See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License.  You may obtain a copy of the License at
 
    http://www.apache.org/licenses/LICENSE-2.0
 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--%>
<%@ page session="false" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy");
request.setAttribute("year", sdf.format(new java.util.Date()));
request.setAttribute("tomcatUrl", "http://tomcat.apache.org/");
request.setAttribute("tomcatDocUrl", "/docs/");
request.setAttribute("tomcatExamplesUrl", "/examples/");
%>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <title><%=request.getServletContext().getServerInfo() %></title>
        <link href="favicon.ico" rel="icon" type="image/x-icon" />
        <link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <link href="tomcat.css" rel="stylesheet" type="text/css" />
    </head>
 
    <body>
    <h1>8081</h1>
       
    </body>
 
</html>

返回到tomcat目录,并且开其两个服务(tomcat)

命令:  cd apache-tomcat-8.5.20/bin  ( 进入到tomcat的bin目录中 )

 命令:  ./startup.sh   ( 开启服务 )

再到 nginx的目录中

命令:  cd /usr/local/nginx

并且进入 : sbin目录

输入 :  cd sbin

命令 :  ./nginx -s reload   

注 : 重新开启nginx

之后在浏览器中访问,就有两个服务在运行用一个了

8080:

8081:

二.前端部署

2.1. 准备工作

前端项目打包之前需要增加以下的设置

在前端项目中 config文件下的index.js中要增加以下代码 : 

 assetsPublicPath: './',//修改后

在前端项目中 build文件下的 utils.js 中增加以下代码 : 


 // 解决icon路径加载错误
        publicPath:'../../'

在前端项目的跟目录中,cmd打开命令窗口

输入命令 : npm run build   ( 进行前端项目打包 )

命令执行后,会出现如图中以下文件  dist

在 /usr/local/ 目录下创建一个文件夹,为mypor ,并且进入文件夹,之后将dist文件拖入mypor文件夹中

并且选中zip解压的命令 :  yum install -y unzip

将该文件进行解压 

输入命令 : unzip dist.zip

2.2.部署

输入命令 :  cd /usr/local/nginx/conf/    找到nginx.conf进行编辑

以下是所有代码 :  

 
#user  nobody;
worker_processes  1;
 
#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
 
#pid        logs/nginx.pid;
 
 
events {
    worker_connections  1024;
}
 
 
http {
    include       mime.types;
    default_type  application/octet-stream;
 
    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';
 
    #access_log  logs/access.log  main;
 
    sendfile        on;
    #tcp_nopush     on;
 
    #keepalive_timeout  0;
    keepalive_timeout  65;
 
    #gzip  on;
    
    
        #服务器的集群
    upstream  tomcat_list {  #服务器集群名字
        server    127.0.0.1:8080  weight=1;   #服务器1   weight是权重的意思,权重越大,分配的概率越大。
        server    127.0.0.1:8081  weight=2;   #服务器2   weight是权重的意思,权重越大,分配的概率越大
    } 
    
 
    server {
        listen       80;
        server_name  localhost;
 
        #charset koi8-r;
 
        #access_log  logs/host.access.log  main;
 
        location / {
            root   /usr/local/mypro/dist;
            #proxy_pass   http://tomcat_list;
            index  index.html index.htm;
        }
        
       	location  ^~/api/ {
	       #^~/api/表示匹配前缀是api的请求,proxy_pass的结尾有/, 则会把/api/*后面的路径直接拼接到后面,即移除api
        proxy_pass http://tomcat_list/;
        }
        
 
        #error_page  404              /404.html;
 
        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
 
        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}
 
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}
 
        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }
 
 
    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;
 
    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}
 
 
    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;
 
    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;
 
    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;
 
    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;
 
    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}
 
}

输入命令 : cd /usr/local/nginx/sbin/   

 输入命令 :./nginx -s reload   重启nginx

在将后端的war包 传入tomcat服务器中。

并且输入命令 :   ./startup.sh    (开启访问)

在浏览器中进行访问 使用虚拟机的IP加tomcat的端口

在到文件资源管理器中进入到 以下本地目录

C:\Windows\System32\drivers\etc

找到 hosts 文件进行修改IP的请求

在进浏览器中进行访问 使用虚拟机的IP加tomcat的端口,即可哦!!!

         好啦今天就到这里了哦!!!希望能帮到你哦!!!

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

玻色量子“揭秘”之最大割(Max-Cut)问题与QUBO建模

Max-Cut问题简单地说&#xff0c;就是求一种分割方法。给定一张无向图, 将所有顶点分割成两群, 同时使得被切断的边数量最大&#xff0c;或边的权重最大。 QUBO&#xff08;Quadratic Unconstrained Binary Optimization&#xff09;问题即二次无约束二值优化问题&#xff0c;…

Mysql学习文档笔记

文章目录 基础篇通用语法及分类DDL&#xff08;数据定义语言&#xff09;数据库操作注意事项 表操作 DML&#xff08;数据操作语言&#xff09;添加数据注意事项 更新和删除数据 DQL&#xff08;数据查询语言&#xff09;基础查询条件查询聚合查询&#xff08;聚合函数&#xf…

6大场景,玩转ChatGPT!

文章目录 一、故事叙述提问举例 二、产品描述提问举例 三、报告撰写提问举例 四、邮件和信件撰写提问举例 五、新间稿和公告撰写提问举例 六、学术论文和专业文章撰写提问举例 本文是在GPT3.5版本下演示的 我们知道AI技术不仅能够自动生成文章和内容&#xff0c;还可以根据我们…

Linux中的防火墙(粗糙版)

防火墙的配置和策略 安全技术&#xff1a; 入侵检测系统&#xff1a;特点是不阻断网络访问&#xff0c;量化&#xff0c;定位的方式来锁定内外网络的危险情况&#xff0c;提供告警服务和事后监督为主。 说白了就是默默看着你&#xff0c;没有主动行为 入侵防御系统&#xff1…

Flutter 06 动画

一、动画基本原理以及Flutter动画简介 1、动画原理&#xff1a; 在任何系统的Ul框架中&#xff0c;动画实现的原理都是相同的&#xff0c;即&#xff1a;在一段时间内&#xff0c;快速地多次改变Ul外观&#xff1b;由于人眼会产生视觉暂留&#xff0c;所以最终看到的就是一个…

多模态中各种Fusion方式汇总

多模态中各种Fusion骚操作 大噶好&#xff0c;我是DASOU&#xff1b; 今天继续写多模态系列文章&#xff0c;对多模态感兴趣的可以看我之前的文章&#xff1a; 其实对于多模态来说&#xff0c;主要可以从三个部分去掌握它&#xff1a; 如何获取多模态的表示【learning mult…

大数据毕业设计选题推荐-收视点播数据分析-Hadoop-Spark-Hive

✨作者主页&#xff1a;IT研究室✨ 个人简介&#xff1a;曾从事计算机专业培训教学&#xff0c;擅长Java、Python、微信小程序、Golang、安卓Android等项目实战。接项目定制开发、代码讲解、答辩教学、文档编写、降重等。 ☑文末获取源码☑ 精彩专栏推荐⬇⬇⬇ Java项目 Python…

Spring基础(2):放弃XML,走向注解

上一篇并没有实际地带大家去看源码&#xff0c;而是介绍了两个概念&#xff1a; BeanDefinitionBeanPostProcessor 当然&#xff0c;我介绍得非常笼统&#xff0c;不论是BeanDefinition还是BeanPostProcessor其实都有着较为复杂的继承体系&#xff0c;种类也很多。作为Spring…

5.网络之IP

IP协议&#xff08;网络层&#xff09; 文章目录 IP协议&#xff08;网络层&#xff09;1. 报文格式2. IP地址2. 地址管理3. 特殊IP地址 IP协议&#xff08;Internet Protocol&#xff0c;互联网协议&#xff09;&#xff0c;是TCP/IP协议栈中最核心的协议之一&#xff0c;通过…

2024年天津财经大学珠江学院专升本预计新增金融学招生专业

2024年天津高职升本科天津财经大学珠江学院预计在今年新增招生专业&#xff0c;专业为金融学&#xff0c;目前该专业正在向天津市教育委员会申报中&#xff0c;预计最快下周即可在天津财经大学珠江学院招生官方发出通知。具体以官方审批是否通过为准。 珠江消息详情如下&#x…

01-单节点部署clickhouse及简单使用

1、下载rpm安装包&#xff1a; 官网&#xff1a;https://packages.clickhouse.com/rpm/stable/ clickhouse19.4版本之后只需下载3个rpm安装包&#xff0c;上传到节点目录即可 2、rpm包安装&#xff1a; 安装顺序为conmon->server->client 执行 rpm -ivh ./clickhouse-…

相机滤镜软件Nevercenter CameraBag Photo mac中文版特点介绍

Nevercenter CameraBag Photo mac是一款相机和滤镜应用程序&#xff0c;它提供了一系列先进的滤镜、调整工具和预设&#xff0c;可以帮助用户快速地优化和编辑照片。 Nevercenter CameraBag Photo mac软件特点介绍 1. 滤镜&#xff1a;Nevercenter CameraBag Photo提供了超过2…

HTML 表格

<!DOCTYPE html> <html lang"en"><head><meta charset"UTF-8"><meta name"viewport" content"widthdevice-width, initial-scale1.0"><title>表格标签</title>/* <style>.yun {widt…

【MongoDB】索引 - 数组字段的多键索引

数组字段创建索引时&#xff0c;MongoDB会为数组中的每个元素创建索引键&#xff08;多键索引&#xff09;&#xff0c;多键索引支持数组字段的高效查询。 一、准备工作 这里准备一些数据 db.shop.insertMany([{_id: 1, name: "水果店1", fruits: ["apple&qu…

turtle绘制分形树-第10届蓝桥杯省赛Python真题精选

[导读]&#xff1a;超平老师的Scratch蓝桥杯真题解读系列在推出之后&#xff0c;受到了广大老师和家长的好评&#xff0c;非常感谢各位的认可和厚爱。作为回馈&#xff0c;超平老师计划推出《Python蓝桥杯真题解析100讲》&#xff0c;这是解读系列的第5讲。 turtle绘制分形树&…

Sui发布RPC2.0 Beta,拥抱GraphQL并计划弃用JSON-RPC

为了解决现有RPC存在的许多已知问题&#xff0c;Sui正在准备推出一个基于GraphQL的新RPC服务&#xff0c;名为Sui RPC 2.0。GraphQL是一种开源数据查询和操作语言&#xff0c;旨在简化需要复杂数据查询的API和服务。 用户目前可以访问Sui主网和测试网网络的Beta版本的只读快照…

基于侏儒猫鼬算法的无人机航迹规划-附代码

基于侏儒猫鼬算法的无人机航迹规划 文章目录 基于侏儒猫鼬算法的无人机航迹规划1.侏儒猫鼬搜索算法2.无人机飞行环境建模3.无人机航迹规划建模4.实验结果4.1地图创建4.2 航迹规划 5.参考文献6.Matlab代码 摘要&#xff1a;本文主要介绍利用侏儒猫鼬算法来优化无人机航迹规划。 …

2024年人工智能安全发展十大预测

上周三&#xff0c;包括英国、美国和中国在内的近30个国家&#xff08;以及欧盟&#xff09;在人工智能安全峰会上达成首个全球性人工智能安全协议&#xff0c;并发布了《人工智能安全宣言》&#xff0c;这标志着人工智能正式进入安全发展的强监管时代。 峰会期间&#xff0c;…

网络爬虫的实战项目:使用JavaScript和Axios爬取Reddit视频并进行数据分析

概述 网络爬虫是一种程序或脚本&#xff0c;用于自动从网页中提取数据。网络爬虫的应用场景非常广泛&#xff0c;例如搜索引擎、数据挖掘、舆情分析等。本文将介绍如何使用JavaScript和Axios这两个工具&#xff0c;实现一个网络爬虫的实战项目&#xff0c;即从Reddit这个社交媒…

Spring boot集成sentinel限流服务

Sentinel集成文档 Sentinel控制台 Sentinel本身不支持持久化&#xff0c;项目通过下载源码改造后&#xff0c;将规则配置持久化进nacos中&#xff0c;sentinel重启后&#xff0c;配置不会丢失。 架构图&#xff1a; 改造步骤&#xff1a; 接着我们就要改造Sentinel的源码。…
最新文章