Reputation: 21
I'm deploying an app to the Heroku that uses php and heroku-postgres. App performs about 70-80 queries to the small postgres database (about 10Mb).
I did some load testing using apache bench with 50 concurrent requests. And I found that queries execution time is about 5-8 times slower than without any load. Of course, I checked that tables have correct indexes and queries use them.
I also tried different heroku-postgres plans, but the problem still exists.
Upvotes: 2
Views: 2642
Reputation: 22893
I also tried different heroku-postgres plans, but the problem still exists.
Make sure the heroku-postgres plan uses the same region as the Heroku app! I spent a week trying to figure out why my app in the EU needed 80ms instead of 0.2ms to query my DB in the US.
Upvotes: 1