Does Heroku change dyno IP during runtime?

坚强是说给别人听的谎言 提交于 2019-12-11 13:56:56

问题


I am currently working on a ruby/heroku app, that needs to query ~40 consecutive SOAP calls from a server, uploads a file to a FTP, then sleeps 15 Minutes and begins anew.

Strangely, yesterday everything worked fine (in the evening hours) either locally or via the dyno; now, since morning, I seldomly get through to the 10th query - it always stops on

D, [2014-03-20T14:18:49] Debug -- : HTTPI POST request to www.XXXX.de (net_http) with a Connection timed out.

Locally, via foreman, everything works fine, so I'd like to rule out that the server doesn't accept 40 queries within about two minutes.

I came to the conclusion that maybe during runtime, the dyno IP is being changed; that would explain the timeout during SOAP call. Do I have to build a new savon-client for every call?


回答1:


Heroku Dynos are ephemeral application instances. They may come up/down at any time and be replaced by a new one, or have your application restarted.

So, Dynos may often change which will result in new IPs for your app servers. However, the IP is very unlikely to change while the dyno is up and running. Only to be replaced by a new dyno with a different IP.



来源:https://stackoverflow.com/questions/22535898/does-heroku-change-dyno-ip-during-runtime

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!