-
Notifications
You must be signed in to change notification settings - Fork 33
How to configure NgRouterAdmin
FijianJacobs edited this page Jan 1, 2020
·
1 revision
- 缺省配置路径为/etc/ngrAdmin/ngr.json
{
"profile": "local",
"plugins": [
"global_rate_limit",
"api_router",
"group_rate_limit",
"property_rate_limit",
"stat_dashboard",
"waf",
"anti_sql_injection",
"statsd_metrics",
"global_access_control"
],
"store_type": "mysql",
"store_mysql": {
"connect_config": {
"host": "127.0.0.1",
"port": 3306,
"database": "ngr",
"user": "ngr_local",
"password": "123456",
"max_packet_size": 1048576
},
"pool_config": {
"max_idle_timeout": 10000,
"pool_size": 3
},
"timeout": 5000
},
"cache_type":"redis",
"cache_redis":{
"mode":"standalone",
"connect_timeout":500,
"read_timeout": 2000,
"database":0,
"max_idle_time":1000,
"pool_size":20,
"host":"127.0.0.1",
"port":"6379"
},
"application_conf":{
"service_type":"config_service",
"worker_processes_count":"auto",
"event_mode": "kqueue",
"worker_rlimit":"65535",
"worker_connections":"65535",
"lua_code_cache":"on",
"lua_socket_pool_size":"20",
"lua_max_pending_timers":"16384",
"lua_max_running_timers":"4096"
}
}
- profile: 当前环境标志
- plugins:插件管理列表
- store_type,store_mysql:配置数据源连接信息
- cache_type,cache_redis:缓存连接信息
- service_type:服务类型,填写config_service
- event_mode:事件处理模型,centos为epoll,macox为kqueue
Copyright @ 2019-2020 Go Go Easy Team