apache / shenyu

Apache ShenYu is a Java native API Gateway for service proxy, protocol conversion and API governance.
https://shenyu.apache.org/
Apache License 2.0
8.41k stars 2.92k forks source link

[Task] implements true cluster mode for Shenyu Admin. #4881

Open xuziyang opened 1 year ago

xuziyang commented 1 year ago

Description

The current shenyu admin cluster only has an nginx in front of it, and nginx performs load balancing on multiple admin requests. it has the following problems:

  1. admin cluster data inconsistency problem
  2. admin cluster will synchronize the same data received from the same client to the gateway multiple times. Because the client can register through the registration center (nacos, zk, etc.), then each node in the admin cluster receives the registration event, and each admin node synchronizes the information to the gateway.
  3. the gateway may receive outdated data

My idea is to let admin implement the true cluster mode through raft protocol. the reasons are as follows:

  1. admin is actually a special registration center. client registers with admin. gateway discovers these registration information. its special point is that it adds some flow control and plug-in data to these registration information.
  2. Achieve high availability of shenyu admin
  3. This implementation can solve all the problems of the current admin cluster.
  4. shenyu admin can remove the dependence on registration centers such as zk, nacos, etcd, etc. and reduce the operation and maintenance work for shenyu
MingJunDuan commented 8 months ago

Cluster mode for shenyu Admin is very important. We need it.