rsocket / rsocket-rpc-java

Standard RSocket RPC Java Implementation
http://rsocket.io/
Apache License 2.0
172 stars 41 forks source link

Benchmarking RSocket, SSL version is very slow #59

Closed srikarn closed 4 years ago

srikarn commented 4 years ago

Hi,

I am benchmarking RSocket, I noticed that RSocket is very fast with out ssl. But when I used ssl, I am seeing that it slows down roughly 7x.

This is how I am configuring my ssl, is there something that I am doing wrong?

       TcpClient client = TcpClient.create()
                .host(serverHostName)
                .port(portNo);

        if(useSsl) {
            SslContext sslContext = SslContextBuilder.forClient()
                    .trustManager(classpathStream("/ssl/rootCA.pem"))
                    .build();
            client = client.secure(spec -> {
                spec.sslContext(sslContext);
            });
        }
       ClientTransport transport = TcpClientTransport.create(client);

I am using a self created CA and a self signed certificate.

Thanks for your time.

OlegDokuka commented 4 years ago

@srikarn Can you share your benchmark setup, please?

srikarn commented 4 years ago

@OlegDokuka thanks for your reply, I figured out the problem was with the default Open JDK ssl, when I switched to the netty-tcnative-boringssl-static I got the desired performance.