sergdiv
(sergio diventura)
May 28, 2021, 3:39pm
1
I have a Dgrpah set up with one zero and five alphas. Is it necessary for the alphas 8080 port to be offset or can they stay at 8080? . Each alphas host name is unique
thanks
kaustubh
(Kaustubh Joshi)
May 28, 2021, 3:45pm
2
Keeping the port 8080 for alphas will just lead to ambiguity as to which alpha is actually listening on that port. Go through this link to learn more about single host setups → https://dgraph.io/docs/deploy/single-host-setup/
sergdiv
(sergio diventura)
May 28, 2021, 4:12pm
3
Thankyou.
Same rules apply to zeros servers?
MichelDiz
(Michel Diz)
May 28, 2021, 4:30pm
4
If each Alpha or Zero node lives in its own host with his own IP. You can let it without offset.
e.g:
Zero-0 = 192.168.1.10:5080
Zero-1 = 192.168.1.11:5080
Zero-2 = 192.168.1.12:5080
Alpha-0 = 192.168.1.20:8080
Alpha-1 = 192.168.1.21:8080
Alpha-2 = 192.168.1.22:8080
Alpha-3 = 192.168.1.23:8080
Alpha-4 = 192.168.1.24:8080
Alpha-5 = 192.168.1.25:8080
if you have an internal naming server(DNS) you can use addresses instead of IPs.
see this example with docker and NGINX
README.md
## First thing
> One thing that I have to mention is that this Gist is a personal test env. Some things can be configured in a way that you don't want it to be.
Add the host information in the host file to your system (or do some DNS config)
Go to http://grafana_http:3000/ and import the grafana_dgraph.json
You have HTTP and GRPC endpoints.
This file has been truncated. show original
dgraph_prometheus.yml
global:
scrape_interval: 2s
scrape_configs:
- job_name: "dgraph"
metrics_path: "/debug/prometheus_metrics"
scrape_interval: "2s"
static_configs:
- targets:
- zero1:6080
- zero2:6080
This file has been truncated. show original
docker-compose.yml
version: "3.5"
services:
nginx:
image: nginx:1.17.7
depends_on:
# Hostnames referenced in nginx.conf need to be available
# before Nginx starts
- zero1
- zero2
- zero3
This file has been truncated. show original
There are more than three files. show original
sergdiv
(sergio diventura)
May 28, 2021, 4:58pm
5
They each run on their own EC2 instance/host and use DNS
alpha0.tree
alpha1.tree
alpha2.tree
alpha3.tree
alpha4.tree
thankyou for the clarification
thanks