Why its taking more time(4190ms) to get response while hitting from aws to server db,and taking only few milliseconds(615ms) from localhost to server db

Please keep the following things in mind:

  1. did you search for what you want to ask before posting?
  2. please use tags for additional info
  3. use a self-descriptive title

Please format code + Cypher statements with the code </> icon, it's much easier to read.

Please provide the following information if you ran into a more serious issue:

  • neo4j version, desktop version, browser version
  • what kind of API / driver do you use
  • screenshot of PROFILE or EXPLAIN with boxes expanded (lower right corner)
  • a sample of the data you want to import
  • which plugins / extensions / procedures do you use
  • neo4j.log and debug.log

Hello! There are a couple of things to keep in mind when dealing with an instance in a cloud (like AWS) and a local instance.
First, AWS instances will run on a remote server somewhere, so network latency of the signal and query will take longer to reach an instance in AWS than it will to connect to an instance running on the same hardware the request comes from.
Second, AWS has different regions to route requests (Europe, Australia, East USA, etc). They are usually optimized to find the best region for your request, but they may not always be going to the fastest place (due to volume of requests, maintenance, or other issues).

Hope this helps!


@jennifer_reif Thank you,For your valuable information..
But we are maintaining the Neo4j server also in that AWS instance only...
We are hitting from our local machine to the remote Neo4j server which is in AWS instance taking 615ms,but when deployed my local code to remote AWS server pointing to the same AWS Neo4j instance taking 4190ms..

Are the two AWS servers in the same region/datacenter? If the remote AWS server is in a different region or datacenter from the Neo4j instance, it could be slower.
How much data is sent over the line? Maybe the local machine to AWS Neo4j has less latency than between the two AWS servers.
Also, what is the capacity of the remote AWS server? Might be that local has more power and/or bandwidth than the remote AWS server.