-4

I have a database of 3GB size in AWS RDS t2.micro instance. My CPU credit balance is most of the time is zero. My API calls taking long time. I update data daily so I interact with RDS frequently and lot of times. So what type of instance I should take to make my API calls faster?

Thank You.

  • 1
    I also noticed that almost all your questions have answers, yet not a single one accepted. Accepting good answers is not onlly a good practice, but it reduces number of duplicates and increases chances for your questions to be actually answered. – Marcin Sep 08 '21 at 03:39

1 Answers1

1

Enable x-tracing so you can see how long each request takes. https://aws.amazon.com/xray/

API call that is slow can be alot of reasons.

  1. your aws region is far away or internet is just slow
  2. cold start of lambda https://lumigo.io/blog/this-is-all-you-need-to-know-about-lambda-cold-starts/
  3. processing time of lambda
  4. database throttling
  5. using rest GW API instead of a HTTPAPI https://aws.amazon.com/blogs/compute/building-better-apis-http-apis-now-generally-available/

analyze your application and find out where the bottleneck is. Most of the time its not your database.

I can help you further if you:

  • provide me a architectural diagram
  • take a screenshot of your monitoring tab of the RDS
  • show me your response time and xray trace.
Lucasz
  • 1,150
  • 9
  • 19