I have an server in Virginia and running EC2 instances. I have a running POST API that needs to be return response time < ~200ms. I am making a request from Turkey and it tooks like 1 second. When I curl inside the machine, it actually takes ~150ms.
So I did a research how can I reduce the latency and made decision to use Amazon API Gateway and CloudFront. In Frankfurt I have defined my "POST" Rest API with required headers & endpoint adress. After created and defined my API Gateway in Frankfurt, it gave an URL like "xxxxxxxxx.execute-api.eu-central-1.amazonaws.com". Moving on, I have created Distribution, for Origin Domain Name I used above URL. I have made all the configuration like TLSv1.2, HTTPS.. etc. (most default settings). Everything is OK and I have submitted my CloudFront. After 10 minutes later I was enable to use domain that CloudFront gave me. With API Gateway url's or CloudFront domain I can make a request successfully but the time has not changed at all ! :(
What do you think, what am I missing can you please give me an idea how to reduce the time ?