I am very new to this field, so my wording may not be spot on.
My crypto exchange offers an API, and I stumbled upon the question when I was playing with it on AWS Cloud9 where I can change client's regions by switching EC2 instances.
I was measuring latency(*1) of several REST API requests from different client's regions.
(*1) I measured a time difference between when a client request.get/post
and when a client received json
payloads in milliseconds.
Below is what I got.
Client's region | API endpoint 1 | API endpoint2 |
---|---|---|
Tokyo | 100ms | 150ms |
California | 30ms | 500ms |
Frankfurt | 15ms | 700ms |
From the result, I understood that API Server for endpoint1 and endpoint2 are located in different regions, which means that the company have multiple server locations for a single domain.
What are the benefit(s) of having servers ( or specifically, API Servers) in different locations for a single domain?