Scaling Upsource services in the cluster
You should consider scaling Upsource services if you experience server performance issues because of increasing number of projects or users, or you want your distributed system to be fault-tolerant 24/7.
The following services can be scaled:
To scale frontend, run:
./cluster.sh -H tcp://<swarm.master.host>:<swarm.master.port> scale frontend=N
To scale PSI agent, run:
./cluster.sh -H tcp://<swarm.master.host>:<swarm.master.port> scale psi-agent=N
The default setup provides for a single analyzer that covers all Upsource projects. Let's say you have ten projects, nine of which are small to medium-scale projects that see several commits a day, while the last one is a huge project with hundreds of commits every day. Overall indexing performance might be improved by moving that resource-intensive project to a separate analyzer, relieving the original analyzer from stress.
To scale analyzer, run:
./cluster.sh -H tcp://<swarm.master.host>:<swarm.master.port> scale analyzer=N
New analyzer nodes will be detected automatically, and newly added projects will be assigned to the least-loaded node.
Inaccessible nodes will be removed automatically as well, and the projects assigned to them will be distributed to other (active) nodes.
Services that cannot be scaled
These are singleton services and therefore cannot be scaled. Scaling of file-clustering is also not available, as even a single service can support very high loads of over 100 projects.