SPI Design
SPI, called Service Provider Interface, is a built-in JDK Service that provides discovery function and a dynamic replacement discovery mechanism.
shenyu-spi is a custom SPI extension implementation for Apache Shenyu gateway. The design and implementation principles refer to SPI Extension Implementations .
Registry Center
Consul, Etcd, Http, Nacos and Zookeeper are supported. The expansion of the registry including client and server, interface respectively ShenyuServerRegisterRepository and ShenyuClientRegisterRepository.
Metrics Center
Responsible for service monitoring, loading concrete implementation through SPI, currently support Prometheus, service interface is MetricsService.
Load Balance
Select one of the service providers to call. Currently, the supported algorithms are Has, Random, and RoundRobin, and the extended interface is LoadBalance.