Skip to content
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

Etcd based cluster config #382

Merged
merged 17 commits into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ The architecture of Easegress:
- Built-in [Open Zipkin](https://zipkin.io/)
- [Open Tracing](https://opentracing.io/) for vendor-neutral APIs
- **Observability**
- **Node:** role(leader, writer, reader), health or not, last heartbeat time, and so on
- **Node:** role(primary, secondary), raft leader status, healthy or not, last heartbeat time, and so on
- **Traffic:** in multi-dimension: server and backend.
- **Throughput:** total and error statistics of request count, TPS/m1, m5, m15, and error percent, etc.
- **Latency:** p25, p50, p75, p95, p98, p99, p999.
Expand Down Expand Up @@ -170,7 +170,7 @@ $ egctl member list
name: eg-default-name
labels: {}
cluster-name: eg-cluster-default-name
cluster-role: writer
cluster-role: primary
cluster-request-timeout: 10s
cluster-listen-client-urls:
- http://127.0.0.1:2379
Expand Down
4 changes: 2 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
- 内置 [Open Zipkin](https://zipkin.io/)
- [Open Tracing](https://opentracing.io/),提供厂商中立的 API。
- **可观察性**
- **节点**:角色(Leader、Writer、Reader)、健康状态、最后一次心跳时间,等等。
- **节点**:角色(primary、secondary)、是不是Leader,健康状态、最后一次心跳时间,等等。
- **多维度的服务器和后端流量数据**
- **吞吐量**:请求数、TPS/m1、m5、m15 和错误百分比等。
- **延迟**:p25、p50、p75、p95、p98、p99、p999。
Expand Down Expand Up @@ -169,7 +169,7 @@ $ egctl member list
name: eg-default-name
labels: {}
cluster-name: eg-cluster-default-name
cluster-role: writer
cluster-role: primary
cluster-request-timeout: 10s
cluster-listen-client-urls:
- http://127.0.0.1:2379
Expand Down
2 changes: 1 addition & 1 deletion doc/benchmark.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ server {
``` yaml
name: member-001
cluster-name: cluster-test
cluster-role: writer
cluster-role: primary
cluster-client-url: http://127.0.0.1:2379
cluster-peer-url: http://127.0.0.1:2380
cluster-join-urls:
Expand Down
2 changes: 1 addition & 1 deletion doc/ingresscontroller.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ spec:
- |-
echo name: $POD_NAME > /easegress-ingress/config.yaml && echo '
cluster-request-timeout: 10s
cluster-role: writer
cluster-role: primary
api-addr: 0.0.0.0:2381
cluster-name: easegress-ingress-controller
' >> /easegress-ingress/config.yaml && echo '
Expand Down
23 changes: 23 additions & 0 deletions example/config/cluster/cluster-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: primary-1
cluster-name: cluster-test
cluster-role: primary
api-addr: localhost:2381
data-dir: ./data
wal-dir: ""
cpu-profile-file:
memory-profile-file:
log-dir: ./log
debug: false
cluster:
listen-peer-urls:
- http://127.0.0.1:2380
listen-client-urls:
- http://127.0.0.1:2379
advertise-client-urls:
- http://127.0.0.1:2379
initial-advertise-peer-urls:
- http://127.0.0.1:2380
initial-cluster:
- primary-1: http://127.0.0.1:2380
- primary-2: http://127.0.0.1:2378
- primary-3: http://127.0.0.1:2376
23 changes: 23 additions & 0 deletions example/config/cluster/cluster-2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: primary-2
cluster-name: cluster-test
cluster-role: primary
api-addr: localhost:2381
data-dir: ./data
wal-dir: ""
cpu-profile-file:
memory-profile-file:
log-dir: ./log
debug: false
cluster:
listen-peer-urls:
- http://127.0.0.1:2378
listen-client-urls:
- http://127.0.0.1:2377
advertise-client-urls:
- http://127.0.0.1:2377
initial-advertise-peer-urls:
- http://127.0.0.1:2378
initial-cluster:
- primary-1: http://127.0.0.1:2380
- primary-2: http://127.0.0.1:2378
- primary-3: http://127.0.0.1:2376
23 changes: 23 additions & 0 deletions example/config/cluster/cluster-3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: primary-3
cluster-name: cluster-test
cluster-role: primary
api-addr: localhost:2381
data-dir: ./data
wal-dir: ""
cpu-profile-file:
memory-profile-file:
log-dir: ./log
debug: false
cluster:
listen-peer-urls:
- http://127.0.0.1:2376
listen-client-urls:
- http://127.0.0.1:2375
advertise-client-urls:
- http://127.0.0.1:2375
initial-advertise-peer-urls:
- http://127.0.0.1:2376
initial-cluster:
- primary-1: http://127.0.0.1:2380
- primary-2: http://127.0.0.1:2378
- primary-3: http://127.0.0.1:2376
13 changes: 13 additions & 0 deletions example/config/cluster/cluster-4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: secondary-1
cluster-name: cluster-test
cluster-role: secondary
api-addr: localhost:2381
data-dir: ./data
wal-dir: ""
cpu-profile-file:
memory-profile-file:
log-dir: ./log
debug: false
cluster:
primary-listen-peer-urls:
- http://127.0.0.1:2380
23 changes: 23 additions & 0 deletions example/config/cluster/legacy-cluster-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: primary-1
cluster-name: cluster-test
cluster-role: primary
api-addr: localhost:2381
data-dir: ./data
wal-dir: ""
cpu-profile-file:
memory-profile-file:
log-dir: ./log
debug: false
cluster-listen-client-urls:
- http://127.0.0.1:2379
cluster-listen-peer-urls:
- http://127.0.0.1:2380
cluster-advertise-client-urls:
- http://127.0.0.1:2379
cluster-initial-advertise-peer-urls:
- http://127.0.0.1:2380
cluster-join-urls:
- http://127.0.0.1:2380
- http://127.0.0.1:2378
- http://127.0.0.1:2376
member-dir: ./member
23 changes: 23 additions & 0 deletions example/config/cluster/legacy-cluster-2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: primary-2
cluster-name: cluster-test
cluster-role: primary
api-addr: localhost:2381
data-dir: ./data
wal-dir: ""
cpu-profile-file:
memory-profile-file:
log-dir: ./log
debug: false
cluster-listen-client-urls:
- http://127.0.0.1:2377
cluster-listen-peer-urls:
- http://127.0.0.1:2378
cluster-advertise-client-urls:
- http://127.0.0.1:2377
cluster-initial-advertise-peer-urls:
- http://127.0.0.1:2378
cluster-join-urls:
- http://127.0.0.1:2380
- http://127.0.0.1:2378
- http://127.0.0.1:2376
member-dir: ./member
23 changes: 23 additions & 0 deletions example/config/cluster/legacy-cluster-3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: primary-3
cluster-name: cluster-test
cluster-role: primary
api-addr: localhost:2381
data-dir: ./data
wal-dir: ""
cpu-profile-file:
memory-profile-file:
log-dir: ./log
debug: false
cluster-listen-client-urls:
- http://127.0.0.1:2375
cluster-listen-peer-urls:
- http://127.0.0.1:2376
cluster-advertise-client-urls:
- http://127.0.0.1:2375
cluster-initial-advertise-peer-urls:
- http://127.0.0.1:2376
cluster-join-urls:
- http://127.0.0.1:2380
- http://127.0.0.1:2378
- http://127.0.0.1:2376
member-dir: ./member
10 changes: 10 additions & 0 deletions example/config/cluster/no-cluster-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: primary-n
cluster-name: cluster-test
cluster-role: primary
api-addr: 0.0.0.0:2831
data-dir: ./data
wal-dir: ""
cpu-profile-file:
memory-profile-file:
log-dir: ./log
debug: false
2 changes: 1 addition & 1 deletion example/sbin/conf/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: member-001
cluster-name: cluster-test
cluster-role: writer
cluster-role: primary
cluster-client-url: http://127.0.0.1:2379
cluster-peer-url: http://127.0.0.1:2380
cluster-join-urls:
Expand Down
2 changes: 1 addition & 1 deletion example/sbin/status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ NC='\033[0m' # No Color
if [ -n "$cluster" ] && [ -n "$name" ] && [ -n "$role" ] && [ -n "$status" ] \
&& [ -n "$peer" ] && [ -n "$client" ] && [ -n $api ]
then
if [ $role = "writer" ]
if [ $role = "primary" ]
then
if [ ! -n "$etcd" ]
then
Expand Down
2 changes: 1 addition & 1 deletion example/writer-001/conf/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: writer-001
cluster-name: cluster-test
cluster-role: writer
cluster-role: primary
cluster-listen-client-urls: [http://127.0.0.1:12379]
cluster-listen-peer-urls: [http://127.0.0.1:12380]
cluster-advertise-client-urls: [http://127.0.0.1:12379]
Expand Down
2 changes: 1 addition & 1 deletion example/writer-002/conf/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: writer-002
cluster-name: cluster-test
cluster-role: writer
cluster-role: primary
cluster-listen-client-urls: [http://127.0.0.1:22379]
cluster-listen-peer-urls: [http://127.0.0.1:22380]
cluster-advertise-client-urls: [http://127.0.0.1:22379]
Expand Down
2 changes: 1 addition & 1 deletion example/writer-003/conf/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: writer-003
cluster-name: cluster-test
cluster-role: writer
cluster-role: primary
cluster-listen-client-urls: [http://127.0.0.1:32379]
cluster-listen-peer-urls: [http://127.0.0.1:32380]
cluster-advertise-client-urls: [http://127.0.0.1:32379]
Expand Down
Loading