##// END OF EJS Templates
docs: fixed database scaling docs. Fixes #4281
marcink -
r1001:952ec857 default
parent child Browse files
Show More
@@ -1,61 +1,64 b''
1 1 .. _scaling-tips:
2 2
3 3 ======================
4 4 Scaling Best Practices
5 5 ======================
6 6
7 When deploying |RCE| at scale; 100s of users, multiple instances, CI servers,
7 When deploying |RCE| at scale; 1000s of users, multiple instances, CI servers,
8 8 there are a number of steps you can take to ensure you are getting the
9 9 most out of your system.
10 10
11 11 Separate Users and CI Servers
12 12 -----------------------------
13 13
14 14 You can configure multiple |RCE| instances to point to the same database and
15 15 set of |repos|. This lets users work on an instance that has less traffic
16 16 than those being hit by CI servers. To configure this, use |RCC| to install
17 17 multiple instances and configure the database and |repos| connection. If you
18 do need to reset the database connection, see the
18 do need to reset/adjust the database connection, see the
19 19 :ref:`config-database` section.
20 20
21 Once configured, set your CI servers to use a particular instance and for
22 user specific instances you can configure loads balancing. See the
23 :ref:`nginx-ws-ref` section for examples.
21 You can configure then a load-balancer to balance the traffic between the CI
22 dedicated instance and instance that end users would use.
23 See the :ref:`nginx-ws-ref` section for examples on how to do it in NGINX.
24 24
25 25 Switch to Database Sessions
26 26 ---------------------------
27 27
28 To increase database performance switch to database-based user sessions. In a
29 large scale deployment, we recommend switching from file-based
30 sessions to database-based user sessions. For configuration details, see the
31 :ref:`db-session-ref` section.
28 To increase |RCE| performance switch from the default file based sessions to
29 database-based. In such way all your distributed instances would not need to
30 share the file storage to use file-based sessions.
31 Database based session have an additional advantage of the file
32 based ones that they don't need a periodic cleanup as the session library
33 cleans them up for users. For configuration details,
34 see the :ref:`db-session-ref` section.
32 35
33 36 Tuning |RCE|
34 37 ------------
35 38
36 39 There are also a number of options available to tune |RCE| for certain
37 40 scenarios, including memory cache size. See the :ref:`rhodecode-tuning-ref`
38 41 section.
39 42
40 43 Use Authentication Tokens
41 44 -------------------------
42 45
43 46 Set up a user account for external services, and then use Authentication
44 47 Tokens with those external services. These tokens work with
45 48 push/pull operations only, and you can manage multiple tokens through this user
46 49 account, and revoke particular ones if necessary. In this way one user can have
47 50 multiple tokens, so all your jenkins/CI servers could share one account.
48 51
49 52 * To enable tokens, go to :menuselection:`Admin --> Authentication` and enable
50 53 the `rhodecode.lib.auth_modules.auth_token` library.
51 54
52 55 * To create tokens, go to
53 56 :menuselection:`Username --> My Account --> Auth tokens` and generate the
54 57 necessary tokens. For more information, see the :ref:`config-token-ref`
55 58 section.
56 59
57 60 Scaling Deployment Diagram
58 61 --------------------------
59 62
60 63 .. image:: ../images/scaling-diagrm.png
61 64 :align: center
General Comments 0
You need to be logged in to leave comments. Login now