This aritcle introduces how to delopy the Shenyu
gateway in cluster enviroment.
In this part, you can see ShenYu Binary Packages Deployment before deploying.
download and unzip apache-shenyu-incubating-2.4.2-admin-bin.tar.gz in your Gateway Admin server.
config your database, go to the /conf
directory, and modify spring.profiles.active
of the configuration in application.yaml
to mysql
, pg
or h2
.
config your way of synchronization, go to the /conf
directory, and modify shenyu.sync
of configuration in application.yaml
to websocket
, http
, zookeeper
, etcd
, consul
or nacos
.
start Apache ShenYu Admin in bin
directory.
> windows: start.bat > linux: ./start.sh
download and unzip apache-shenyu-incubating-2.4.2-bootstrap-bin.tar.gz in your Gateway Boostrap server.
config your synchronization, go to the /conf
directory, and modify shenyu.sync
of configuration in application.yaml
to websocket
, http
, zookeeper
, etcd
, consul
or nacos
, this configuaration must remain the same of ShenyYu Admin
.
repeat above-mentioned operations in each ShenYu Bootstrap
server.
start Apache ShenYu Bootstrap in bin
directory.
> windwos : start.bat > linux : ./start.sh
After completing these operations, you will deploy
ShenYu Boostrap
Cluster.For example. you will deploy
ShenYu Bootstrap
in10.1.1.1
and10.1.1.2
and deploy nginx in10.1.1.3
.
download and install nginx
.
modify upstream
and server
of configuration in nginx.conf
.
upstream shenyu_gateway_cluster { ip_hash; server 10.1.1.1:9195 max_fails=3 fail_timeout=10s weight=50; server 10.1.1.2:9195 max_fails=3 fail_timeout=10s weight=50; }
server { location / { proxy_pass http://shenyu_gateway_cluster; proxy_set_header HOST $host; proxy_read_timeout 10s; proxy_connect_timeout 10s; } }
> windows: ./nginx.exe > linux: /usr/local/nginx/sbin/nginx
ShenYu Bootstrap
log or Nginx
log, Where will the verification request go.