I am new to CockroachDB and I have created three node local cluster with different ports. I am using java application for inserting and reading data from database. I am using Hibernate as per the tutorial in https://www.cockroachlabs.com/docs/stable/build-a-java-app-with-cockroachdb-hibernate.html.
<?xml version = "1.0" encoding = "utf-8"?> <!DOCTYPE hibernate-configuration SYSTEM "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property> <property name="hibernate.connection.driver_class">org.postgresql.Driver</property> <property name="hibernate.connection.url"><![CDATA[jdbc:postgresql://localhost:26257/testing?&sslmode=disable]]></property> <property name="hibernate.connection.username">root</property> <property name="hibernate.connection.password"></property> <property name="show_sql">true</property> <mapping class="com.ksh.hbr.Person"/> <mapping class="com.ksh.hbr.Address"/> <mapping class="com.ksh.hbr.PersonAddress"/> </session-factory> </hibernate-configuration>
Now my question is “When I check into OVERVIEW DASHBOARD all queries requests are going to single node. And if that node goes down then whole cluster is down for application. Whatever the IP address I am using for connection in hibernate config, all request goes into that node. Other nodes has data but they are not servicing any request. I am not understanding meaning of cluster here. In Cassandra you connect to cluster not particular IP address as a result three nodes works equally. Here in cockroach-db, feels like only one node is working and other two nodes are just storage. SO COCKROACH-DB IS DESIGNED LIKE THIS OR IS IT KNOW ISSUE ?” I have created application which has 20 threads running simultaneously and doing reading and inserting into database.
Please reply as soon as possible.