1

I am trying to use RSocket for Microservices within my org. As we have lot to communicate and fetch from databases like Cassandra and Postgresql, I observed a dip in performance.

When I run a sample Rsocket Client and Rsocket Server that returns a mocked response, I am getting a throughput of 12k TPS. Once I integrate to get the same codebase with Cassandra it is 300 TPS and Postgresql is 400 TPS. If I add HikariCP to Postgresql, it is 700 TPS.

For the same usecase with blocking HTTP it is 800 TPS and non-blocking HTTP is 1900 TPS.

This study is made on Mac Laptop 8 cores, 16 GB, rsocket-java (No Spring or RPC).

I am confused whether RSocket is suited for Microservices usecase or not.

Please provide your experience and any benchmark available for further studies.

  • You need to show what your code looks like for each – 123 Jun 02 '20 at 17:53
  • Its a simple RSocket Client calling Rsocket Server over JDBC to Database. – Karthik Palanivelu Jun 02 '20 at 18:16
  • That doesn't add up - JDBC isn't non-blocking, so you can't utilise it in a fully non-blocking solution. In any case, we'll need to see the code and preferably raw results for each case, not just a description of what it does. This isn't answerable at present. – Michael Berry Jun 03 '20 at 10:03
  • I understand JDBC is blocking. But still a throughput does not add up against the motivation statement by rsocket. I will try to put a sample code here. Thank you – Karthik Palanivelu Jun 03 '20 at 14:18
  • You should be using the non-blocking DB clients Cassandra - https://www.baeldung.com/spring-data-cassandra-reactive Postgres - https://github.com/r2dbc/r2dbc-postgresql Without these, it's more likely that the problems are in your code. – Yuri Schimke Jun 15 '20 at 07:50
  • Yes I am using reactive version of cassandra driver. As I mentioned above, if I mock the response I am getting 12K TPS. Once I introduce Cassandra, TPS drops. – Karthik Palanivelu Jun 16 '20 at 17:51
  • @KarthikPalanivelu, You have any sample code in github for this POC. I am also trying to explore rsocket. Works great. Would like to explore from the performance standpoint. – RamPrakash Jun 28 '20 at 15:47
  • Hi All, I had an improvement. I removed docker and used bare metal cassandra, removed older LoadBalancer - upgraded to new version of RSocket, I cached the reflection object of Service, now the performance is good around 8K/sec. – Karthik Palanivelu Dec 18 '20 at 17:50

0 Answers0