Heroku Latency Issues

We had problems with database queries in our Heroku application, and I created a new test application with a script that connects our server and MongoLab server. The MongoLab server server is located in the same data center as the Heroku application.

The RTT per db server is approximately 3 ms. Now, even on the test server, I see a lot of jitter. You can see the output of my ping script here: http://damp-citadel-6004.herokuapp.com/test - latency often varies in the range of 30 ms, and sometimes even in the 100 ms range.

I am just wondering if normal behavior is for Heroku? If so, Heroku will no longer be a viable option, since we need low latency to connect MongoLab. The current number of delays is killing our application due to the time added to the requests.

The Heroku stack is a cedar and is located in US-EAST, as well as MongoLab db.

Any help would be appreciated.

+4
source share
1 answer

I'm curious how do you know that your heroin guitars are in the same data center as mongolab instances? By ip somehow? Can you really be sure? Both of these services use several availability zones in the AWS us-east-1 region, and as far as I know, you do not indicate a preference or report where the resources are located. 2 dynos heroes for the same application can, and because of its sounds, probably live in different AWS AZ. Of course, different AZs are located in different data centers, and I believe that some access zones cover several data centers.

In any case, you are not the only one. Recently, I have had frequent problems connecting both from Heroku and from my own instances of ec2 to Mongolab and Mongok in the same region of the Amazon. Mongohq support reiterated that they also had connectivity issues between EC2 instances in different AZs in us-east-1, and hinted that AWS support has recently confirmed some network-level / security group scaling issues. I managed to find this article: http://orensol.com/2009/05/24/network-latency-inside-and-across-amazon-ec2-availability-zones/ , which suggests that the observed delays are exceptionally high .

Perhaps related to this, I also had problems with DNS resolvers in EC2 - included in Heroka - in Mongolab and mongohq. Even for route zones 53, for which all reputable servers belong to Amazon. In general, it seems that the connection between the access zones in us-east-1 is now not 100%, so although I would advise you to experiment with other database services based on EC2, you can not see any difference.

0
source

Source: https://habr.com/ru/post/1490083/


All Articles