4

We have deployed our application in EC2 instance and our database is in RDS which is db.m2.2xlarge. I see some minor slowness in our application when compare to our QA environment where has both application and our DB server. Though Prod server has high configuration we see some slowness, I think our EC2 and RDS instance are not in same network.

How do I find whether they are same network? If its not in same network how do I bring them in same network?

Please note that both EC2 and RDS in same region

Selvakumar P
  • 305
  • 2
  • 8
  • 16
  • 1
    Are you using VPC? Within a region, all EC2 machines are typically within a few `ms` of each other. You probably need to actually dig in and profile your application to see where the slowdown is occurring before you start throwing guesses up against the wall. – EEAA Aug 22 '13 at 16:03
  • No, We don't use VPC, Will it improve latency – Selvakumar P Aug 22 '13 at 16:05
  • 1
    Not necessarily, but there are a *ton* of other benefits to using VPC. You really need to profile your app, though, to determine the performance bottlenecks. – EEAA Aug 22 '13 at 16:11
  • Actually the difference is very minor, a particular service takes 48ms in when have DB in EC2, and takes 140 ms when I have DB in RDS. So I thought this kind settings would help. – Selvakumar P Aug 22 '13 at 17:06
  • 1
    Are they in the same availability zone? – Matt Houser Aug 22 '13 at 17:45

1 Answers1

4

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
Drew Khoury
  • 4,637
  • 8
  • 27
  • 28