New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support DNS based addresses for nodes #74
Comments
Yep - I've just learned this problem myself. I was trying to specify a Here's an example docker-compose file in case anyone else runs into this problem: version: "3.7"
##
# Local example of a 3-node tigerbeetle instance
#
# Note: this example might only work with linux + using `network_mode:host` because of 2 reasons:
#
# 1. When specifying an internal docker network, other containers are only available using dns based routing:
# e.g. from tigerbeetle_0, the other replicas are available at `tigerbeetle_1:3002` and
# `tigerbeetle_2:3003` respectively.
#
# 2. Tigerbeetle performs some validation of the ip address provided in the `--addresses` parameter
# and won't let us specify a custom domain name.
#
# The workaround for now is to use `network_mode:host` in the containers instead of specifying our
# own internal docker network
##
services:
tigerbeetle_0:
container_name: tigerbeetle_0
image: tigerbeetle:local
command: "sh -c './tigerbeetle start --addresses=0.0.0.0:3001,0.0.0.0:3002,0.0.0.0:3003 0_0.tigerbeetle'"
ports:
- "3001"
network_mode: host
volumes:
- /opt/beta-beetle/
tigerbeetle_1:
container_name: tigerbeetle_1
image: tigerbeetle:local
command: "sh -c './tigerbeetle start --addresses=0.0.0.0:3001,0.0.0.0:3002,0.0.0.0:3003 0_1.tigerbeetle'"
ports:
- "3002"
network_mode: host
volumes:
- /opt/beta-beetle/
tigerbeetle_2:
container_name: tigerbeetle_2
image: tigerbeetle:local
command: "sh -c './tigerbeetle start --addresses=0.0.0.0:3001,0.0.0.0:3002,0.0.0.0:3003 0_2.tigerbeetle'"
ports:
- "3003"
network_mode: host
volumes:
- /opt/beta-beetle/ |
@lewisdaly how we are currently getting around this is using a nginx proxy sidecar Its crude but you can see an example of it here |
Currently Tigerbeetle only supports IP based addresses when starting nodes. This make it very difficult to work with in cloud native enviroments that use DNS based routing.
In order to work better in these environments, Tigerbeetle should allow DNS based strings in the
addresses
flagThe text was updated successfully, but these errors were encountered: