I have an Amazon EC2 instance used to make requests to an Elastic Cloud instance hosted on AWS. Both are in the same region on AWS (N. Virginia). However, I am seeing incredibly high ping between the two servers.
Using the ElasticSearch PHP client, timing
client->ping() measures the time at about 200 milliseconds.
I am trying to implement search-as-you-type. When I time the queries in Kibana, they take only a few milliseconds to complete. However, the search-as-you-type is unusable due to the latency between ES and EC2 servers.
How can I diagnose/resolve this issue? I would expect a ping of around a tenth of what I am getting due to the proximity of the servers.