I am facing a weird issue where I am trying to connect to two difference RDS instances from the same EC2 instance via a jmeter script. The script makes some database updates and inserts and calls an API (that additionally makes database updates and inserts).
My API is deployed on an ec2 instance in us-east-1b in North Virginia. Also, the ec2 instance that I am running this jmeter script from, is in us-east-1b as well.
Performance differences are observed while using the same jmeter script for two different RDS instances - both exact copies of each other in terms of schema, data, security group, VPC and region. The only thing that differs is that the RDS instance with which a high performance is observed is in AZ us-east-1d. The other RDS is in us-east-1b - with this one the jmeter script takes a long time.
Cannot seem to figure out what the reason would be considering everything is same about the two RDS instances except AZ. Also, the jmeter script and the API that it accesses are both running in the same AZ as the RDS instance with slow performance.
Both are postgres RDS instances.
Any pointers would be really appreciated.