-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
Hi, I think it would be useful that make some documentation about how to change the default configuration of ribbon.
In ProxyHandler I have found the prefix to modify ribbon config client but nobody mentions it on documentation:
private LoadBalancingHttpClient<ByteBuf, ByteBuf> getClient(String vip) {
LoadBalancingHttpClient<ByteBuf, ByteBuf> client = httpClients.get(vip);
if (client == null) {
IClientConfig config = IClientConfig.Builder.newBuilder("prana_backend").
withDefaultValues().
withDeploymentContextBasedVipAddresses(vip).
build().
set(IClientConfigKey.Keys.MaxTotalConnections, 2000).
set(IClientConfigKey.Keys.MaxConnectionsPerHost, 2000).
set(IClientConfigKey.Keys.OkToRetryOnAllOperations, false).
set(IClientConfigKey.Keys.NIWSServerListClassName, DiscoveryEnabledNIWSServerList.class.getName());
client = RibbonTransport.newHttpClient(new HttpClientPipelineConfigurator<ByteBuf, ByteBuf>(), config);
httpClients.putIfAbsent(vip, client);
}
return client;
}As I understand if I want to change something I will need to create properties like this:
prana_backend.ribbon.IsSecure=false
prana_backend.ribbon.ReadTimeout=3000
prana_backend.ribbon.ConnectTimeout=3000
prana_backend.ribbon.MaxAutoRetries=1
prana_backend.ribbon.OkToRetryOnAllOperations=true
prana_backend.ribbon.MaxAutoRetriesNextServer=1
prana_backend.ribbon.FollowRedirects=false
prana_backend.ribbon.ConnIdleEvictTimeMilliSeconds=3600001
prana_backend.ribbon.ServerListRefreshInterval=60001
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels