我正在使用python库bottlenose在Amazon's Product API上执行ItemSearch .
当我在本地计算机上执行ItemSearch时,我会在不到3秒的时间内收到响应,而当我在使用Python(目前处于测试版)的Google Cloud Functions中执行相同操作时,需要大约12到15秒!
我尝试过更改为所有Cloud Function的区域(包括user-central1,europe-west1,us-east1和asia-northeast1),平均响应时间没有变化 .
我知道这不是库问题,因为我通过导入和使用 bottlenose
来测试 Cloud 功能,当然不需要API . 执行上述操作并未增加功能执行时间 .
帮助我理解导致这种意外延迟的可能问题可能是从Amazon的Product API获取数据,特别是在Google Cloud Functions上 .