-
Notifications
You must be signed in to change notification settings - Fork 558
/
web-example.conf
117 lines (97 loc) · 3.74 KB
/
web-example.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Web configuration file example
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1kb => 1024 bytes
# 1mb => 1024*1024 bytes
# 1gb => 1024*1024*1024 bytes
#
# units are case insensitive so 1GB 1Gb 1gB are all the same.
# Note on units: when time duration is needed, it is possible to specify
# it in the usual form of 1s 5M 4h and so forth:
#
# 1s => 1000 * 1000 * 1000 nanoseconds
# 1m => 60 seconds
# 1h => 60 minutes
#
# units are case insensitive so 1h 1H are all the same.
[base]
# Web service http listen and server on this address, default localhost:8090
#
# Examples
# http.bind localhost:8090
# http.bind 192.168.1.100:8090,192.168.1.101:8090
# http.bind 0.0.0.0:8090
http.bind localhost:8090
# maximum duration before timing out read or write of the request
# http.servertimeout 10s
# Web service http listen and server on this address, default localhost:8091
# mainly servers for internal admin
# Examples
# tcp.bind localhost:8091
# tcp.bind 192.168.1.100:8091,192.168.1.101:8091
# tcp.bind 0.0.0.0:8091
admin.bind localhost:8091
# Sets the maximum number of CPUs that can be executing simultaneously.
# This call will go away when the scheduler improves. By default the number of
# logical CPUs is set.
#
# maxproc 4
# This is used by web service profiling (pprof).
# By default web pprof listens for connections from local interfaces on 8190
# port. It's not safty for listening internet IP addresses.
#
# Examples:
#
# pprof.bind 192.168.1.100:8190,10.0.0.1:8190
# pprof.bind 127.0.0.1:8190
# pprof.bind 0.0.0.0:8190
pprof.bind localhost:8190
# If the master process is run as root, then web will setuid()/setgid()
# to USER/GROUP. If GROUP is not specified, then web uses the same name as
# USER. By default it's nobody user and nobody or nogroup group.
user nobody
# When running daemonized, Web writes a pid file in
# /tmp/gopush-cluster-web.pid by default. You can specify a custom pid file
# location here.
pidfile /tmp/gopush-cluster-web.pid
# The working directory.
#
# The log will be written inside this directory, with the filename specified
# above using the 'logfile' configuration directive.
#
# Note that you must specify a directory here, not a file name.
# dir ./
# Log4go configuration path
log /data/apps/go/bin/web_log.xml
[zookeeper]
# The provided servers parameter may include multiple server addresses, separated
# by commas, so that the client will automatically attempt to connect
# to another server if one of them stops working for whatever reason.
# Used for exmple following
# addr IP1:Port1,IP2:Port2,IP3:Port3
addr localhost:2181
# The timeout parameter, given in nanoseconds, allows controlling
# the amount of time the zookeeper connection can stay unresponsive before the
# zookeeper server will be considered problematic.
timeout 30s
# The root path of all nodes that Comet mounted in zookeeper,default /gopush-cluster-comet
comet.path /gopush-cluster-comet
# The root path of all nodes that message mounted in zookeeper,default /gopush-cluster
message.path /gopush-cluster-message
# "Lock" while notify Comet node migrate. It`s 'FlagEphemeral'
# the path was created when get the "lock", and delete after migrate done
migrate.path /gopush-migrate-lock
[rpc]
# It will ping rpc service per ping time to confirm connecting is alive
# ping 1s
# Interval time of every reconnection
# retry 3s
################################## INCLUDES ###################################
# Include one or more other config files here. This is useful if you
# have a standard template that goes to all comet server but also need
# to customize a few per-server settings. Include files can include
# other files, so use this wisely.
#
# include /path/to/local.conf
# include /path/to/other.conf