Application-level configuration extensions

Updated at:

When you use SOFABoot, the Remote Procedure Call (RPC) framework provides application-level configuration parameters, such as ports and thread pools.

Application parameters are bound to the com.alipay.sofa.rpc.boot.config.SofaBootRpcProperties class using the Spring Boot @ConfigurationProperties annotation. The configuration prefix is as follows:

static final String PREFIX ="com.alipay.sofa.rpc";

As needed, you can add the following configuration items to the application.properties file:

Note

You can also write these properties using camel case or hyphens to follow your coding style and Spring Boot standards.

# Single-machine failure removal
com.alipay.sofa.rpc.aft.regulation.effective # Specifies whether to enable single-machine failure removal.
com.alipay.sofa.rpc.aft.degrade.effective  # Specifies whether to enable degradation.
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 degradation rate.
com.alipay.sofa.rpc.aft.weight.recover.rate # The recovery rate.
com.alipay.sofa.rpc.aft.degrade.least.weight # The minimum weight for degradation.
com.alipay.sofa.rpc.aft.degrade.max.ip.count # The maximum number of degraded IP addresses.

# bolt
com.alipay.sofa.rpc.bolt.port # The bolt port.
com.alipay.sofa.rpc.bolt.thread.pool.core.size # The number of bolt core 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 bolt thread pool queue size.
com.alipay.sofa.rpc.bolt.accepts.size # The number of connections that the server allows clients to establish.

# rest
com.alipay.sofa.rpc.rest.hostname # The REST hostname.
com.alipay.sofa.rpc.rest.port # The REST port.
com.alipay.sofa.rpc.rest.io.thread.size # The number of REST I/O threads.
com.alipay.sofa.rpc.rest.context.path # The REST context path.
com.alipay.sofa.rpc.rest.thread.pool.core.size # The number of REST core 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 REST request size.
com.alipay.sofa.rpc.rest.telnet # Specifies whether to allow REST Telnet.
com.alipay.sofa.rpc.rest.daemon # Specifies whether to hold the port. If set to true, the port is released when the main thread exits.

# dubbo
com.alipay.sofa.rpc.dubbo.port # The Dubbo port.
com.alipay.sofa.rpc.dubbo.io.thread.size # The Dubbo I/O thread size.
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 connections that the Dubbo server allows clients to establish.
com.alipay.sofa.rpc.dubbo.thread.pool.core.size # The number of Dubbo core threads.
com.alipay.sofa.rpc.dubbo.thread.pool.queue.size # The Dubbo thread pool queue size.

# registry
com.alipay.sofa.rpc.registry.address # The service 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 address range for multiple network interface controllers (NICs).
com.alipay.sofa.rpc.bind.network.interface # The network interface to bind.

# h2c
com.alipay.sofa.rpc.h2c.port # The h2c port.
com.alipay.sofa.rpc.h2c.thread.pool.core.size # The number of h2c core 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 h2c queue size.
com.alipay.sofa.rpc.h2c.accepts.size # The number of connections that the server allows clients to establish.

# Extension
com.alipay.sofa.rpc.lookout.collect.disable # Specifies whether to disable Lookout.

# Agent
com.alipay.sofa.rpc.consumer.repeated.reference.limit # The number of reference agents that a client can generate for the same service. The default value is 3.
Note

The default service registry is DSR. For more information about how to change the registry, see Service registry routing.