ABCDEFGHIJKLMNOPQRST
1
SettingsServiceconfig optionavg resp. time (ms)avg reqs/secavg reqs/minavg DB trans/sec
2
connection buffer (%)50%Gunicornworkers3215085351,2004,267
3
ulimit buffer500Gunicornworker_connections120064038,4003,200
4
# web servers10postgrestarget active connections6025051230,7202,560
5
# db servers2pgbouncermax_client_conn (min)9630042725,6002,133
6
avg DB transactions/page5pgbouncerdefault_pool_size640032019,2001,600
7
redis conns per page view1postgresactual active connections (max)608001609,600800
8
requests/second coeffecient0.4postgresmax_connections (min)1001,600804,800400
9
redismaxclients (min)4803,200402,400200
10
redisulimit (min)10006,400201,200100
11
rabbitmqulimit (min)1000
12
memcacheconnections (min)480
13
memcacheulimit (min)1000
14
Notes:
15
Bolded items can be modified
16
Connection buffer is % of additional pgbouncer & postgres connections to reserve, on top of what's needed
17
Postgres max_connections should be determined based on machine resources; see http://wiki.postgresql.org/wiki/Number_Of_Database_Connections, http://thebuild.com/presentations/not-my-job-djangocon-us.pdf
18
The requests/second coefficient represents "efficiency" of the web servers and is adjusted based on the avg reqs/sec seen for a response time of around 200ms, in the real world
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100