sofastack / sofa-boot

SOFABoot is a framework that enhances Spring Boot and fully compatible with it, provides readiness check, class isolation, etc.
https://www.sofastack.tech/sofa-boot/docs/Home
Apache License 2.0
4.92k stars 1.26k forks source link

sofa.boot.ark.jvmServiceCache #1296

Closed yuanChina closed 3 months ago

yuanChina commented 3 months ago

sofa.boot.ark.jvmServiceCache=true测试起来不生效,请问这个主要作用是什么,是会提高路由的性能么

HzjNeverStop commented 3 months ago

这个功能作用于 Ark Serverless 跨模块寻找 JVM 服务的场景。

开启这个配置后,对 JVM 服务的路由不是每次调用完整执行路由逻辑,而是先尝试查询缓存,从而提高路由的性能。

在 master 分支(4.2.0版本)中,您可以在 com.alipay.sofa.boot.ark.invoke.DynamicJvmServiceProxyFinder#findServiceComponent(java.lang.ClassLoader, com.alipay.sofa.runtime.spi.binding.Contract) 类中看到它生效的逻辑