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

Cluster builder detailed configuration #15

Closed
pluskal opened this issue Nov 3, 2020 · 1 comment
Closed

Cluster builder detailed configuration #15

pluskal opened this issue Nov 3, 2020 · 1 comment
Labels
enhancement New feature or request
Projects

Comments

@pluskal
Copy link
Contributor

pluskal commented Nov 3, 2020

Is there a way to access Cassandra.Builder or modify low-level CassandraCSharpDriver's connection properties?

It would be beneficial for #12 and further benchmarking (#14) to play with it.

Benchmarks in #14 are still about 40 times slower in comparison with the direct use of CassandraCSharpDriver on my testing machine. It seems to me that EF should not cause this much overhead but needs to be something with the configuration.

E.g., in other benchmarks, I use the following Cluster configuration to eliminate drivers/Cassandra protocols safeguards.

var clusterBuilder = Cluster
                .Builder()
                .AddContactPoints("localhost")
                .WithQueryOptions(new QueryOptions().SetConsistencyLevel(ConsistencyLevel.LocalOne))
                .WithReconnectionPolicy(new ConstantReconnectionPolicy(1000))
                .WithRetryPolicy(new DefaultRetryPolicy())
                .WithLoadBalancingPolicy(new TokenAwarePolicy(Policies.DefaultPolicies.LoadBalancingPolicy))
                .WithDefaultKeyspace(GetType().Name)
                .WithPoolingOptions(
                PoolingOptions.Create()
                    .SetMaxSimultaneousRequestsPerConnectionTreshold(HostDistance.Remote, 1_000_000)
                    .SetMaxSimultaneousRequestsPerConnectionTreshold(HostDistance.Local, 1_000_000)
                    .SetMaxConnectionsPerHost(HostDistance.Local, 1_000_000)
                    .SetMaxConnectionsPerHost(HostDistance.Remote, 1_000_000)
                    .SetMaxRequestsPerConnection(1_000_000)
            );
thabart added a commit that referenced this issue Nov 10, 2020
@simpleidserver simpleidserver added this to In Progress in 2.0.4 Nov 10, 2020
@simpleidserver simpleidserver added the enhancement New feature or request label Nov 10, 2020
@simpleidserver
Copy link
Owner

The project EFCore.Cassandra.Benchmarks has been updated to configure the Cluster.
Please fetch the latest changes from the master branch.

@simpleidserver simpleidserver moved this from In Progress to Done in 2.0.4 Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
2.0.4
Done
Development

No branches or pull requests

2 participants