Best Practices: Getting the Most Out of Neptune
The following are some general recommendations for working with Amazon Neptune. Use this information as a reference to quickly find recommendations for using Amazon Neptune and maximizing performance.
Contents
- Amazon Neptune Basic Operational Guidelines
- Amazon Neptune Security Best Practices
- Enable the OSPG Index if you have a large number of predicates
- Avoid long-running transactions where possible
- Best Practices for Using Neptune Metrics
- Best Practices for Tuning Neptune Queries
- Load Balancing Across Read Replicas
- Loading Faster Using a Temporary Larger Instance
- Resize your writer instance by failing over to a read-replica
- Avoid different instance classes in a cluster
- Retry Upload after Data Prefetch Task Interrupted Error
- General Best Practices for Using Gremlin with Neptune
- Best practices using the Gremlin Java client with Neptune
- Use the latest version of the Gremlin Java client
- Re-use the client object across multiple threads
- Create separate Gremlin Java client objects for read and write endpoints
- Add multiple read replica endpoints to a Gremlin Java connection pool
- Close the client to avoid the connections limit
- Create a new connection after failover
- Set maxInProcessPerConnection and maxSimultaneousUsagePerConnection to the same value
- Send queries to the server as bytecode rather than as strings
- Always completely consume the ResultSet or Iterator returned by a query
- Bulk add vertices and edges in batches
- Disable DNS caching in the Java Virtual Machine
- Optionally, set timeouts at a per-query level
- Use the Graphbinary Serialization Protocol
- Work around a keep-alive bug in clients earlier than 3.3.4
- Troubleshoot Gremlin Java client exceptions
- Neptune Best Practices Using SPARQL

