##// END OF EJS Templates
chore(version): bumped version to 5.12.0
chore(version): bumped version to 5.12.0

File last commit:

r395:5b66391f
r485:2678d964
Show More
scaling-rhodecode.rst
74 lines | 2.1 KiB | text/x-rst | RstLexer

Scaling to handle more traffic

scaling http traffic

In case for bigger setups docker-compose can scale more rhodecode/vcsserver workers: Adjust the .custom/docker-compose-apps.override.yaml file and change replicas: NUM

services:
  rhodecode:
    deploy:
      # set number of instances of services to be spawned on stack start
      replicas: 4

  vcsserver:
    deploy:
      # set number of instances of services to be spawned on stack start
      replicas: 4

Generally replicas of vcsserver and rhodecode should be equal, but each replica should have workers=N directive set to workers=2 for rhodecode workers=3 for vcsserver.

Then scale docker replicas without any downtime using this command

./rcstack stack rhodecode up --detach --no-recreate --scale rhodecode=4 --scale vcsserver=4

scaling ssh traffic

ssh workers can scale independently from the http traffic handled by rhodecode/vcsserver. To scale for more ssh traffic, increase replicas for sshd service

services:
  sshd:
    deploy:
      # set number of instances of services to be spawned on stack start
      replicas: 4

scaling celery workers

celery workers can scale independently from the http traffic handled by rhodecode/vcsserver. To scale for more celery task processing capabilities, increase replicas for celery service.

celery:
  sshd:
    deploy:
      # set number of instances of services to be spawned on stack start
      replicas: 4

Note

Celery already has an autoscaler defined by the command argument called "--autoscale=20,2". This means that there are min of 2 processes per worker that can scale upto 20 if there are more tasks to process. Scaling replicas means the maximum task processing capacity would be defined by replicas * maximum autoscale number.