Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prana ribbon configuration in documentation? #15

Open
victuxbb opened this issue Aug 27, 2015 · 1 comment
Open

Prana ribbon configuration in documentation? #15

victuxbb opened this issue Aug 27, 2015 · 1 comment

Comments

@victuxbb
Copy link

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!

@aspyker
Copy link
Contributor

aspyker commented Oct 24, 2015

@victuxbb Thank you for the contribution. More will be coming, but please see http://ispyker.blogspot.com/2015/10/towards-being-better-about-open-source.html for a bit of context on the status of this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants