We'd like to simulate the impact of locality using VMs within a on a public cloud (say AWS EC2).
To do this, we would like to inject delays in packets such that we can simulate a particular network topology.
Assume that there are three VMs: A, B, C
| A | <- 5 μs delay -> B | <---- 25 μs delay ----> C
How could we most easily inject a 5 μs delay (or any arbitrary value) for connections between A and B, versus a 25 μs delay between A and C? Any solution is appreciated (Linux kernel level changes on each VM / creating an overlay network / ...).