[Question] How to scale up the stack, can I use docker service scale? #2122
-
|
I have successfully got the stack running on a swarm of 2 Linodes and deployed to staging domain Running the command below shows that the various services in the stack
OK, docker-auto-labels is a bit of red herring. Normally when I want to scale up a service I would,
Is the intended way of scaling up the deployed stack? |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments
-
|
I tried deploying a new staging backend (i.e. the REST API), I then started to log this service, I then went to However, this is not completely correct because I still only have one database running! Both REST APIs are hitting the same database. This will break if multiple users start using the system. If I now start up a second database Because of the node labels it is run on the same node! So this is definitely the wrong approach. Very interested to hear comment from anyone who has investigated this |
Beta Was this translation helpful? Give feedback.
-
|
i added the label to the worker Just now and it scaled up using that. however were gonna have to setup postgres clustering properly to get it working. im playing around with it now with streaming worker replicas and db as primary. if i get it running ill share the yaml :) |
Beta Was this translation helpful? Give feedback.
-
|
Yes please do! |
Beta Was this translation helpful? Give feedback.
-
|
right, that approach is really unstable. the way replicas behave now makes me run away from anything other than stateless scaling. overlay networks doesnt detect service dnss on replicas unless they are added via cli, docker run and the likes. however, adding a streaming slave on any other server, service, baremetal or toaster Will work like a charm. so thats the route we are working on now. have you been able to successfully replicate the celeryworker on a workernode? |
Beta Was this translation helpful? Give feedback.
-
|
ima eat some of those words :P |
Beta Was this translation helpful? Give feedback.
-
|
Good job. So I see
Some questions:
|
Beta Was this translation helpful? Give feedback.
-
|
I think I understand a bit better; replicas are readonly, so they share the same volume, https://info.crunchydata.com/blog/an-easy-recipe-for-creating-a-postgresql-cluster-with-docker-swarm this was also useful to read https://wiki.postgresql.org/wiki/Replication,_Clustering,_and_Connection_Pooling |
Beta Was this translation helpful? Give feedback.
-
yep. readonly with hot standby. im using crunchs great example to get it working (i have changed the original script i shared, had some errors). when everything is tip top im changing to: this streaming replication is pretty cool, but im going for multi-master with ha and standby . ill share my findings :) |
Beta Was this translation helpful? Give feedback.
-
|
This question was from the time this project targeted Docker Swarm, now it targets Docker Compose as the DIY deployment strategy. In case someone ends up here, this would no longe apply. ☕ |
Beta Was this translation helpful? Give feedback.
This question was from the time this project targeted Docker Swarm, now it targets Docker Compose as the DIY deployment strategy. In case someone ends up here, this would no longe apply. ☕