2

Given we are on aws platform we need to subscribe to different sources of data, which are located around the world. How can we efficiently determine what is the region with lowest latency to some target IP (not our browser)?

There is a service called cloudping which pings from your current browser to aws regions, but this cannot be useful for obvious reasons.

Is there any tool similar to cloudping that such that we could specify what ip we want to ping to?

And a secondary question. I suppose it is possible to spawn instances using aws console api, does amazon have some significant fees if i have a script that spawns a compute instance does some short work and terminates it and does this for every single region? Worst case we could spawn instances on all regions for short amount of time and ping to all destinations we are interested but that would be a lot of work for something rather simple... My assumption is that even within one region you might end up with some instances having significantly better latency than others, a script could spawn instances until the best one is found and terminates others...

UPDATE

It seems it rather easy to spawn instances and execute commands in them, shouldnt be hard to terminate them as well. Here is a good tool for this, now the question is will aws punish me with bills and isn't there already solution for this?

vach
  • 10,571
  • 12
  • 68
  • 106
  • What AWS services are you using? For example, AWS publishes this list of endpoints to test EC2 pings themselves, you can simply ping a few to test: http://ec2-reachability.amazonaws.com/ – ACVM Mar 29 '18 at 02:13
  • Yes the resource in question is EC2. I dont see any latency numbers in the resource you shared? it basically tells you if something is up or not... What i'm looking for is "aws tell me where in your regions will i have the best latency to $SOME_IP" – vach Mar 29 '18 at 02:15
  • but if i could also find the best instance within the best region that would be awesome... I imagine that depending on where they spawn the instance and how loaded IO is on that hardware i might get different latency to target service... – vach Mar 29 '18 at 02:19

1 Answers1

1

You can certainly launch and terminate Amazon EC2 instances all any region you wish. Amazon will not "punish" you -- the system will simply charge the normal cost for resources you use.

If you launch an Amazon EC2 instance with the Amazon Linux AMI, then the instance will be charged per-second, so the cost will be very low. For example, you could use a t2.micro instance for a few cents per hour (charged per second).

You could then run your own timing test from each region. However, you could probably predict the best performance simply based upon the location of the region (US East, US West, Frankfurt, Sydney, etc).

Also, please note that Ping is not a reliable measure for how your actual application would perform. To obtain the best measure, you should run an application in each region that connects to the 'source of data' you are trying to use. Measure performance as it would be used by your actual application. You might find that the remote service has higher latency than the network, meaning that location would only have a minor impact on performance.

If you use somebody else's timing or somebody else's tool, it will not be as accurate as measuring your actual application doing "real" work.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
  • Great thank you, didnt know about per second charges (how is it charging otherwise? if you just launch and terminate something. – vach Mar 29 '18 at 09:51
  • Definitely agree with most of the points you made, however the source of data is rather inefficient (it gives up some piece of information in many MBs while my software really compacts it into few kilobytes and filters out the noise) so taking it in collocated manner and sending very small message to actual backend has a significant impact. – vach Mar 29 '18 at 09:53
  • Also yes makes perfect sense that you could roughly say something should have the least time travel from this region just based on the IP, however most of the sources i need to connect to are executing on a private hardware and located in between of different zones, its not clear which one to choose and there is a factor of network congestion, not necessarily the closest is the fastest :) – vach Mar 29 '18 at 09:57
  • Spot instances, Spot instances, and Spot instances again. Don't use on-demand if you have an atomic action you need to perform and is not production critical - it's between 70%-90% less the price for it. – Dvir669 Apr 04 '18 at 20:23