I need to test a scenario to see how my app deals with latency. My application is in K8S on Azure (AKS) and its connecting to a Postgres DB in Azure. Anyone know of any good tools that aren't too tricky to implement?
I ended up created a haproxy VM and directing my db traffic through it. Then on the haproxy I used the network emulator linux tool to delay the traffic . It works really well
For simple Ping and latency check you can use the normal docker image Busybox and check the latency across the Network.
You can also use the Prometheus to monitor, like
pg_stat_activity_max_tx_duration is one metrics type.
You can read more at here
To check POD network communication : https://docs.projectcalico.org/getting-started/kubernetes/hardway/test-networking
You can also check out tools like datadog which will expose the good details like latency and performance metrics.
Extra :
Dont forget to check out the Pgbouncer if your team facing the latency issue.