Neo4j embedded with high availability -
i used spring data neo4j embedded 1 of poc. works blazing fast on single machine. before going production, wanted separate database application server. configured 3 neo4j server instances , ha proxy , used spring data neo4j rest connect. speed worst. each query takes more 30 seconds execute.
i thinking use neo4j embedded ha? can provide me links/tutorials configure spring data neo4j in embedded mode ha proxy.
i wish have 3 neo4j servers , multiple application servers. thanks.
additional log
17:43:10.695 [main] debug o.s.b.f.annotation.injectionmetadata - processing injected method of bean 'org.springframework.data.neo4j.config.neo4jconfiguration#0': autowiredmethodelement public void org.springframework.data.neo4j.config.neo4jconfiguration.setconversionservice(org.springframework.core.convert.conversionservice) 17:43:10.703 [main] debug o.s.b.f.annotation.injectionmetadata - processing injected method of bean 'org.springframework.data.neo4j.config.neo4jconfiguration#0': autowiredmethodelement public void org.springframework.data.neo4j.config.neo4jconfiguration.setgraphdatabaseservice(org.neo4j.graphdb.graphdatabaseservice) 17:43:10.703 [main] debug o.s.b.f.s.defaultlistablebeanfactory - creating shared instance of singleton bean 'graphdatabaseservice' 17:43:10.703 [main] debug o.s.b.f.s.defaultlistablebeanfactory - creating instance of bean 'graphdatabaseservice' 17:43:10.832 [main] debug neo4j - warning! deprecated configuration options used. see manual details 17:43:10.832 [main] debug neo4j - neo4j.ext.udc.disable has been replaced neo4j.ext.udc.enabled 17:43:10.832 [main] debug neo4j - cannot configure writers , searchers individually since go 17:43:14.467 [main] debug neo4j - writing @ flush-requested: -1 17:43:16.163 [main] debug neo4j - read ha server:54.234.75.138:6002 (for machineid 2) zoo keeper 17:43:16.821 [main] debug neo4j - read ha server:54.234.75.138:6003 (for machineid 3) zoo keeper 17:43:17.445 [main] debug neo4j - writing @ flush-requested: -6 17:43:19.013 [main] debug neo4j - getmaster 2 based on [machineinfo[id:2, sequence:46, last tx:672, server:(54.234.75.138, 6002), master last tx:1], machineinfo[id:3, sequence:47, last tx:672, server:(54.234.75.138, 6003), master last tx:1]]
i have tried setting follows:
<bean id="graphdatabaseservice" class="org.neo4j.kernel.highlyavailablegraphdatabase" destroy-method="shutdown" scope="singleton"> <constructor-arg name="storedir" index="0" value="data/graph.db" /> <constructor-arg index="1"> <map> <entry key="ha.server_id" value="${server.id}"></entry> <entry key="ha.server" value="${ha.server.address}:${ha.server.port}"></entry> <entry key="ha.coordinators" value="${coordinators}"></entry> <entry key="enable_remote_shell" value="port=1331"></entry> <entry key="ha.pull_interval" value="1"></entry> </map> </constructor-arg> </bean>
my neo4j-ha.properties file
server.id=1 ha.server.address=192.168.1.9 ha.server.port=7474 coordinators=192.168.1.9:5001,192.168.1.9:5002,192.168.1.9:5003 server.id=2 ha.server.address=192.168.1.9 ha.server.port=7475 coordinators=192.168.1.9:5001,192.168.1.9:5002,192.168.1.9:5003 server.id=3 ha.server.address=192.168.1.9 ha.server.port=7476 coordinators=192.168.1.9:5001,192.168.1.9:5002,192.168.1.9:5003
still no luck, halts following log
16:49:13.386 [main] debug o.s.b.f.annotation.injectionmetadata - processing injected method of bean 'org.springframework.data.neo4j.config.neo4jconfiguration#0': autowiredmethodelement public void org.springframework.data.neo4j.config.neo4jconfiguration.setgraphdatabaseservice(org.neo4j.graphdb.graphdatabaseservice) 16:49:13.387 [main] debug o.s.b.f.s.defaultlistablebeanfactory - creating shared instance of singleton bean 'graphdatabaseservice' 16:49:13.387 [main] debug o.s.b.f.s.defaultlistablebeanfactory - creating instance of bean 'graphdatabaseservice' 16:49:13.522 [main] debug neo4j - warning! deprecated configuration options used. see manual details 16:49:13.522 [main] debug neo4j - neo4j.ext.udc.disable has been replaced neo4j.ext.udc.enabled 16:49:13.522 [main] debug neo4j - cannot configure writers , searchers individually since go
rick,
here example on how pass parameters embedded ha highlyavailablegraphdatabase
.
<neo4j:config graphdatabaseservice="graphdatabaseservice" /> <context:property-placeholder location="file:/etc/neo4j-ha.properties" /> <bean id="graphdatabaseservice" class="org.neo4j.kernel.highlyavailablegraphdatabase" destroy-method="shutdown" scope="singleton"> <constructor-arg index="0" value="${database.path}" /> <constructor-arg index="1"> <map> <entry key="ha.server_id" value="${server.id}"></entry> <entry key="ha.server" value="${ha.server.address}:${ha.server.port}"></entry> <entry key="ha.coordinators" value="${coordinators}"></entry> <entry key="enable_remote_shell" value="port=1331"></entry> <entry key="ha.pull_interval" value="1"></entry> </map> </constructor-arg> </bean>
also see here: neo4j ha (embedded) via spring?
Comments
Post a Comment