In application scenarios of SOFABoot, the RPC framework provides some configuration parameters at the application level. The supported application-level parameters, such as port number and thread pool information, are all bound through @ConfigurationProperties
of Spring Boot. The corresponding class is com.alipay.sofa.rpc.boot.config.SofaBootRpcProperties
. The prefix configuration is as follows:
static final String PREFIX = "com.alipay.sofa.rpc";
In the application.properties
file, you can configure the following options. Depending on your coding practices, you can also write code using camel case or hyphens (-), following the Spring Boot specifications.
# Node fault elimination
com.alipay.sofa.rpc.aft.regulation.effective # Specifies whether to enable the node fault elimination feature.
com.alipay.sofa.rpc.aft.degrade.effective # Specifies whether to enable the downgrading feature.
com.alipay.sofa.rpc.aft.time.window # The time window.
com.alipay.sofa.rpc.aft.least.window.count # The minimum number of calls.
com.alipay.sofa.rpc.aft.least.window.exception.rate.multiple # The minimum exception rate.
com.alipay.sofa.rpc.aft.weight.degrade.rate # The downgrading rate.
com.alipay.sofa.rpc.aft.weight.recover.rate # The recovery rate.
com.alipay.sofa.rpc.aft.degrade.least.weight # The minimum weight after downgrading.
com.alipay.sofa.rpc.aft.degrade.max.ip.count # The maximum number of IP addresses whose weights are downgraded.
# bolt
com.alipay.sofa.rpc.bolt.port # The Bolt port.
com.alipay.sofa.rpc.bolt.thread.pool.core.size # The number of core Bolt threads.
com.alipay.sofa.rpc.bolt.thread.pool.max.size # The maximum number of Bolt threads.
com.alipay.sofa.rpc.bolt.thread.pool.queue.size # The queue in the Bolt thread pool.
com.alipay.sofa.rpc.bolt.accepts.size # The number of client connections that the server allows.
# rest
com.alipay.sofa.rpc.rest.hostname # The REST host name.
com.alipay.sofa.rpc.rest.port # The REST port number.
com.alipay.sofa.rpc.rest.io.thread.size # The number of REST I/O threads.
com.alipay.sofa.rpc.rest.context.path # rest context path
com.alipay.sofa.rpc.rest.thread.pool.core.size # The number of core REST threads.
com.alipay.sofa.rpc.rest.thread.pool.max.size # The maximum number of REST threads.
com.alipay.sofa.rpc.rest.max.request.size # The maximum request size for REST.
com.alipay.sofa.rpc.rest.telnet # Specifies whether to allow the REST Telnet.
com.alipay.sofa.rpc.rest.daemon # Specifies whether the port is held. If the value is true, the system releases the port when the main thread is closed.
# dubbo
com.alipay.sofa.rpc.dubbo.port # The Dubbo port.
com.alipay.sofa.rpc.dubbo.io.thread.size # The size of the Dubbo I/O thread.
com.alipay.sofa.rpc.dubbo.thread.pool.max.size # The maximum number of Dubbo business threads.
com.alipay.sofa.rpc.dubbo.accepts.size # The number of client connections that the Dubbo server allows.
com.alipay.sofa.rpc.dubbo.thread.pool.core.size # The number of core Dubbo threads.
com.alipay.sofa.rpc.dubbo.thread.pool.queue.size # The maximum number of Dubbo threads.
# registry
com.alipay.sofa.rpc.registry.address # The registry address.
com.alipay.sofa.rpc.virtual.host # The virtual host.
com.alipay.sofa.rpc.bound.host # The bound host.
com.alipay.sofa.rpc.virtual.port # The virtual port.
com.alipay.sofa.rpc.enabled.ip.range # The IP range for multiple network interfaces.
com.alipay.sofa.rpc.bind.network.interface # The bound network interface.
# h2c
com.alipay.sofa.rpc.h2c.port # The H2C port.
com.alipay.sofa.rpc.h2c.thread.pool.core.size # The number of core H2C threads.
com.alipay.sofa.rpc.h2c.thread.pool.max.size # The maximum number of H2C threads.
com.alipay.sofa.rpc.h2c.thread.pool.queue.size # The size of the H2C queue.
com.alipay.sofa.rpc.h2c.accepts.size # The number of client connections that the server allows.
# Extension
com.alipay.sofa.rpc.lookout.collect.disable # Specifies whether to disable the Lookout.
# Proxy
com.alipay.sofa.rpc.consumer.repeated.reference.limit # The number of proxies the client is allowed to generate for the same service. The default value is 3.