Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find heroku dyno ip

Tags:

heroku

My Heroku app has a single dyno, and it accesses external resources such as database\cache\web-services\etc?

The dyno IP address is not static and may change, but not very often. When you perform maintenance of these resources, it's often useful to know which IP is associated to which client, even if it's ad-hoc. Therefore...

How can I ad-hoc know what IP address would the dyno access the resources from?

like image 234
Jonathan Livni Avatar asked Oct 03 '22 09:10

Jonathan Livni


1 Answers

One of the things about using a platform like Heroku is that you have no guarantee whatsoever about dyno (or other container) IPs. You won't have any real clue as to which dyno has which IP, as far as you know they might all be using the same network adapter (thus having the same external IP). Sure you can try to wing it, or set static IPs if you must, but it sounds like a workaround for a flawed process.

Instead, I would opt for a proper monitoring system, where you can view these, and other, stats in real-time (i.e. service connections, usage and other goodies). This is out of scope for this question, but look into solutions such as a Statsd + Graphite stack.

like image 59
Yuval Adam Avatar answered Oct 07 '22 18:10

Yuval Adam