[Proposal] Standardize ports across Dgraph node types.
Dgraph cluster consists of different node types zero (and its peers) and servers(and its peers). Each node type uses a set of ports and there are several deployment options for users to setup the cluster. The current Dgraph implementation uses default ports across node types and provides --port_offset command option to override the default port, this makes it difficult for users when setting up the cluster as users has to pay attention port clashing not only between peers but also between different node types and ratel. This may not be affecting users trying to setup on multiple hosts.
This proposal is to standardize the port usage across node types and change the default ports if the proposal is accepted.
| Dgraph Node Type | gRPC-internal | gRPC-external | http-external |
|---|---|---|---|
| zero | --Not Used-- | 5080 | 6080 |
| server | 7080 | 9090 | 8080 |
| ratel | --Not Used-- | --Not Used-- | 8000 |
Users have to continue to use --port_offset option between a particular node type.
- Zero (and its Peers) - Use 508[0-9] & 608[0-9]
- Server (and its Peers) - Use 708[0-9], 808[0-9] & 908[0-9]
I'd say 5080 is gRPC-external as it can be used by dgraph live to insert RDF's. Other then that, the proposal sounds good.
@gpahal can we make default for Ratel as 8000? Having 8081 as default becomes an issue when you are trying to start multiple Dgraph servers. Usually, you start with port_offset 1, 2 and so on and that collides with Ratel.
👍 I have modified the dgraph zero gRPC port.
In Dgraph, Grpc = 1000 + HTTP. So, in Zero, we should maintain that. To further make the difference clear, we could have these:
- Zero HTTP: 4040
- Zero Grpc: 5040
Compare to the existing:
- Server HTTP: 8080
- Server Grpc: 9080
Is Zero's grpc is more internal or external? I see only bulk-loader needs it, except that I consider that is more for internal cluster management & discovery.
So would it be HTTP - 1000 (like Server's grpc-internal port)?
Ah.. That's a good point, @sboorlagadda. Agreed.
Fixed in v1.0.3