Tag

CachingRouteLocator

1 views collected around this technical thread.

Code Ape Tech Column
Code Ape Tech Column
Feb 28, 2023 · Cloud Native

Refreshing Spring Cloud Gateway Route Cache on Service Instance Changes Using Nacos Events

The article explains why Spring Cloud Gateway may still call a downed service due to a stale CachingRouteLocator cache, and demonstrates how to listen to Nacos InstancesChangeEvent to evict the cache so the gateway always uses the latest service list.

Cache RefreshCachingRouteLocatorLoad Balancing
0 likes · 6 min read
Refreshing Spring Cloud Gateway Route Cache on Service Instance Changes Using Nacos Events