Dynamic Machine IP for clustered deployments on Fargate #2794
Unanswered
krainboltgreene
asked this question in
Q&A
Replies: 2 comments 13 replies
-
If you can detect when you running inside Fargate and finding new nodes can be done with DNS queries, then we could add one entry here: https://github.com/livebook-dev/livebook/blob/main/rel/server/env.sh.eex#L1 |
Beta Was this translation helpful? Give feedback.
12 replies
-
There’s some alternatives to jq that are faster, but I’m not sure about
smaller. I’ll start looking for some alternatives.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So at my company we deploy elixir applications to Fargate, a subset of AWS's Elastic Container Service platform.
tl;dr on ecs: "container image + machine details" as the total interface for deploying to EC2 (the virtual server).
tl;dr on fargate: "ecs automated network + scaling mechanisms" as the total interface
Cloud Run is pretty much the same concept, but with more of the network/scaling details automated away based on the context of HTTP requests.
In both of these services one of the key points is that as requests come in the definition of a instance can be scaled up to meet demand. This creates a scenario where a machine, which elixir is running on, cannot know it's own IP address for clustering inherently. AWS's solution to this (and probably GCP's as well) is to have an HTTP endpoint defined as an environment variable that describes in detail the metadata of the instance running.
At my company this is how we get the machine ip for clustering:
Currently livebook doesn't seem to have a way to support this
LIVEBOOK_NODE
value as you need to know up front the machine IP according to the documentation. My gut instinct is to modify the dockerfile provided by the github repository to ship a customenv.sh.eex
, but I figured I'd ask here first in case there's something I'm missing.Beta Was this translation helpful? Give feedback.
All reactions