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

Question - Scaling/ Adding more nodes #502

Closed
m3ki opened this issue Nov 14, 2023 · 6 comments
Closed

Question - Scaling/ Adding more nodes #502

m3ki opened this issue Nov 14, 2023 · 6 comments
Labels
question Further information is requested

Comments

@m3ki
Copy link

m3ki commented Nov 14, 2023

First thank you for this wonderful code!

While going through my testing here in the lab, I stumbled on a potential issue for me.

I deployed a 3 node TYPE A cluster with HAproxy LB and etcd DCS.

In the scaling section you talk about adding a PG node and a load balancer node and you mention that those roles do not scale ETCD or consul.

How would I go about adding 2 more nodes, post initial 3 node deployment?

My use case:

  1. deploy 3 node cluster
  2. later on add 2 more nodes as if I were to initially deploy 5 nodes?

Is this possible?

@vitabaks
Copy link
Owner

vitabaks commented Nov 14, 2023

Yes, at the moment PostgreSQL node scaling is implemented, but not for DCS.

I recommend deploying one ETCD cluster of 3 or 5 nodes on separate servers and using it with many Postgresql clusters.

@vitabaks vitabaks added the question Further information is requested label Nov 14, 2023
@m3ki
Copy link
Author

m3ki commented Nov 14, 2023

At the moment my application has to be deployed on 3 physical nodes so having postgres and etcd on same nodes is ideal.

What would be the ideal recovery steps should 1 node physically fail?

Also if I were to add node separately would I create a new empty linux node then add etc then run add_pg_node and add_balancer node?

@vitabaks
Copy link
Owner

That's right, Playbooks add_pg_node.yml and add_balancer.yml (optional) will do everything for you, but we need to take care of the DCS cluster
by supporting N/2+1 servers in an etcd or consul cluster (usually 3 or 5 nodes), while the number of Postgres cluster servers can be any (2 or more servers).

https://etcd.io/docs/v3.5/op-guide/runtime-configuration/#replace-a-failed-machine

I understand that managing an etcd cluster manually is not very convenient, so I plan to automate the scaling process for etcd and consul - #503

@vitabaks vitabaks closed this as completed Feb 3, 2024
@m3ki
Copy link
Author

m3ki commented Feb 4, 2024

Hey, did you implement scaling?

@vitabaks
Copy link
Owner

vitabaks commented Feb 4, 2024

Postgres cluster scaling was implemented several releases ago. DCS cluster scaling is planned #503

@m3ki
Copy link
Author

m3ki commented Feb 4, 2024

Postgres cluster scaling was implemented several releases ago. DCS cluster scaling is planned #503

Oh! Got it. For some reason I thought you did the DCS scaling after our last conversation :) I'll keep an eye on #503

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants
@m3ki @vitabaks and others