When a machine in a cluster starts, it enters a warm-up period. During this time, an influx of requests can degrade the machine's performance and disrupt services. The RPC framework uses the warm-up forwarding feature to forward requests from a machine in its warm-up period to other machines in the cluster. After the warm-up period ends, the machine resumes normal operation.
You can specify the proportion of requests to forward during the warm-up period. For example, you can configure the system to forward 80% of requests and process the remaining 20% locally.
Unlike RPC stress test forwarding, warm-up forwarding is only active for a set period after the application starts. In contrast, stress test forwarding is a long-term configuration.
Precautions
Note the following when you use the warm-up forwarding feature:
Warm-up forwarding does not function if the server-side application starts on the same host.
Requests are not forwarded to another service that is also in its warm-up period.
If a service is not configured for prefetch forwarding, subsequent services will not forward traffic to the machine that hosts it.
All machines that participate in warm-up forwarding must use the same BOLT port.
RPC forwarding configuration
You can configure this feature in two ways:
Forward directly to an IP address
Add the following parameter to the
application.propertiesfile:rpc.transmit.url = 10.**.**.2Requests are always forwarded directly to the specified IP address. This configuration has the same effect as setting
rpc.transmit.url=address:10.**.**.2.Configure warm-up and weight
Add the following parameters to the
application.propertiesfile:rpc.transmit.url=weightStarting:0.3,during:60,weightStarted:0.2,address:10.**.**.2,uniqueId:core_uniqueweightStarting: The forwarding weight during the warm-up period. Based on this weight, the RPC framework randomly decides whether to forward a request to another machine in the cluster or to process it locally.during: The duration of the warm-up period, in seconds.weightStarted: The forwarding weight after the warm-up period. This setting remains in effect permanently.address: The forwarding address after the warm-up period. This setting remains in effect permanently.uniqueId: In a multi-cluster deployment where clusters share the same
appName, use this parameter to distinguish between the clusters. You can specify a custom system variable to ensure cluster uniqueness. For example,core_uniqueis a configuration inapplication.propertiesthat can be dynamically replaced.
You can configure the request forwarding timeout in the application.properties file. For example, rpc_transmit_url_timeout_tr=8000. The unit is milliseconds (ms), and the default value is 10,000 ms.