Skip to content

Location Services - High Latency issues

0

I'm using the AWS SDK for PHP v3.

I'm calling searchPlaceIndexForText

I can call this service without a problem and get my GeoIPs, and I've used both ESDI and HERE indexes successfully.

My problem: When I run my script from the command line locally (on my own computer), the CLI responds in an average of ~500ms, which is very acceptable.

However, when I deploy the same code to an EC2 and run the same code, the latency is at a minimum of 1.5 seconds (1500ms) up to sometimes 5000ms (5 seconds). The address and everything else are the same. I've also tried setting the BiasPosition, and the results are the same.

Other info: my EC2 is located in us-west-2 region, and I'm physically located in AZ

Code snippet:

    $locationClient = new Aws\LocationService\LocationServiceClient([
        'version' => 'latest',
        'region'  => 'us-west-2',
    ]);
    $result = $locationClient->searchPlaceIndexForText(
        [
            'FilterCategories' => ['AddressType'],
            'IndexName' => 'MyHereIndex', // REQUIRED
            'Text' => '587 S Watson Rd, Buckeye, AZ 85326', // REQUIRED
        ]);
  • What is the latency if you login to the EC2 instance and run the script from the command line on the EC2 instance? i.e. an apples-to-apples comparison to running from your own computer as opposed to deploying the PHP app.

asked a year ago266 views
1 Answer
1

Can you raise a support request so we can track down the request using the request ID and verify if it's on the service side or not? Thanks!

AWS
EXPERT
answered a year ago
AWS
EXPERT
reviewed a year ago
  • Case ID 171753016300903 I've included the returned @metadata from each call... one on the EC2 instance, and one on my local machine.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.