Skip to content

Thruster on Heroku - Delay binding to HTTP_PORT until TARGET_PORT is available? #91

@briceburg

Description

@briceburg

Hi,

We're on Heroku and hitting an issue fronting our app with Thruster. Apparently Heroku considers a dyno "up" as soon as a process binds to the [provided] $PORT variable, and starts directing traffic to it. The trouble is that that dyno is not ready to receive traffic yet as puma has not yet booted, so we're seeing a bunch of 502s / connection-refused logs from thruster during this interval.

Is it possible to delay binding to HTTP_PORT until the target port (puma) is available?

Or are there any other suggestions for avoiding this issue on Heroku (which does not use healthchecks as most other platforms do for directing traffic)?

We're using Thruster mainly for its X-Sendfile support + proxying to anycable (via the thruster-anycable fork).

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions