1

I've seen a lot of documentation and tutorials how to setup HTTPS and Websockets on heroku, but it's possible to setup another protocol like TLS or NATS?

If it's possible how can I do that?

Mirusky
  • 372
  • 3
  • 16

1 Answers1

2

Unfortunately, no.

Inbound requests are received by a load balancer that offers SSL termination. From here they are passed directly to a set of routers.

The routers are responsible for determining the location of your application’s web dynos and forwarding the HTTP request to one of these dynos.

https://devcenter.heroku.com/articles/http-routing#routing

Not supported

  • TCP Routing

https://devcenter.heroku.com/articles/http-routing#not-supported

Heroku offers only http/https routing for applications hosted on it.

vodolaz095
  • 6,680
  • 4
  • 27
  • 42
  • Yeah, bad to know that. Just an extra question if I setup my NATS to use WS, theoretically I will be able to connect and use it on heroku right? Since it accepts WS transport. – Mirusky Apr 24 '21 at 21:09
  • 1
    Websockets works on heroku, so probably NATS can work via websockets, but heroku restarts application every 15 minutes (or 30 minutes, as far as i remember) - it can be bad idea to serve state-full application on heroku. – vodolaz095 Apr 24 '21 at 21:15
  • No worries, I'm thinking to pay a hobby tier who does not restart. Thanks for you help – Mirusky Apr 24 '21 at 22:20