跳至内容

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.

已提问 2 年前270 查看次数
1 回答
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
专家
已回答 2 年前
AWS
专家
已审核 2 年前
  • Case ID 171753016300903 I've included the returned @metadata from each call... one on the EC2 instance, and one on my local machine.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。