Hi, I have a custom TCP server I’d like to isolate in its own machine that serves connections opened by my HTTP server. I saw some documentation about HTTP services, but I need to run at a lower level. Is there any support for this?
Yes. How to configure this will depend on whether the HTTP server is run on fly.io or not, and (should the HTTP server be run on fly.io) whether both applications are included in the same docker image or are separate images.
- Either go with only an IPv6 address, or (should you need IPV4) you will need a private IPV4 address
- In your
[http_service]with something like the following (feel free to pick your own port:
[[services]] internal_port = 2222 protocol = "tcp" [[services.ports]] port = 2222
HTTP server hosted on fly.io
- Leave the
[http_service]and don’t add anything for the TCP server
- Use private networking to connect your HTTP server to your TCP server. Either
<process_group>.process.<appname>.internal(if included on the same image, or
<appname>.internalif running as a separate app
- If running in the same image, follow Run Multiple Process Groups in an App · Fly Docs to define two processes. If running in separate apps, launch each separately and remove the
fly.tomlin the TCP server app.
Appreciate it folks.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.