I see some minor slowness in our application when compare to our QA
environment where has both application and our DB server.
What are the differences between your QA env and the one your describe (I assume the slow one is prod). It's not clear if QA is a replica, if it's in AWS or a different setup completely.
Though Prod server has high configuration we see some slowness, I
think our EC2 and RDS instance are not in same network.
It's not clear what high means in this context, I assume you mean lots more RAM/CPU etc for your resources. It's also not clear why you think the DB is not on the same network. Either you should know the answer to this, or you should ask the person who set it up.
How do I find whether they are same network? If its not in same
network how do I bring them in same network?
If you're wanting to investigate EC2 and RDS instances you can do so either through the web console or the API. You're looking for a few things here.
- Are the instances in the same region
- Are the instances in the same VPC
- Are the instances in the same Availability Zone
Other Considerations
You should be checking CloudWatch (and your own application) metrics to get a better idea of what the true slowness is. Your slowness might be network related, or it may just be slow queries, or more people hammering your app in production. It's hard to tell without checking the data.
RDS provides two features that you may be interested in:
- Master/Slave
- Backups will be done on the Slave so you won't experience slowness on the master
- If the master goes down, the slave will take over
- Real Relica's
- If you're experiencing slowness you can deploy up to 5 replica's of the master that can share the read load