High availability to neo4j: Clients → HAproxy → neo4j servers
neo4j soft nofile 40000 neo4j hard nofile 40000
echo 'deadline' > /sys/block/sda/queue/scheduler cat /sys/block/sda/queue/scheduler noop [deadline] cfq
################################################################ # Neo4j # # neo4j-server.properties - runtime operational settings # ################################################################ #*************************************************************** # Server configuration #*************************************************************** org.neo4j.server.database.location=data/graph.db org.neo4j.server.db.tuning.properties=conf/neo4j.properties org.neo4j.server.database.mode=HA org.neo4j.server.webserver.address=0.0.0.0 dbms.security.auth_enabled=false org.neo4j.server.webserver.port=7474 org.neo4j.server.webserver.https.enabled=true org.neo4j.server.webserver.https.port=7473 dbms.security.tls_certificate_file=conf/ssl/snakeoil.cert dbms.security.tls_key_file=conf/ssl/snakeoil.key org.neo4j.server.webserver.https.keystore.location=data/keystore org.neo4j.server.http.log.enabled=false org.neo4j.server.http.log.config=conf/neo4j-http-logging.xml org.neo4j.server.webadmin.rrdb.location=data/rrd dbms.browser.remote_content_hostname_whitelist=http://guides.neo4j.com,https://guides.neo4j.com,http://localhost,https://localhost dbms.security.allow_outgoing_browser_connections=true
################################################################ # Neo4j # # neo4j.properties - database tuning parameters # ################################################################ online_backup_enabled=true online_backup_server=192.168.168.33:6362 ha.server_id=1 ha.initial_hosts=192.168.168.33:5001,192.168.168.34:5001 ha.cluster_server=192.168.168.33:5001 ha.server=192.168.168.33:6001 ha.pull_interval=10
global daemon maxconn 384 defaults mode http timeout connect 5000ms timeout client 50000ms timeout server 50000ms frontend http-in bind *:7777 default_backend neo4j backend neo4j option httpchk GET /db/manage/server/ha/available server s1 192.168.168.33:7474 maxconn 128 check server s2 192.168.168.34:7474 maxconn 128 check server s3 192.168.168.35:7474 maxconn 128 check listen admin bind *:7770 stats enable
yum install haproxy haproxy -f /etc/haproxy/haproxy-neo4j.cfg