|
| 1 | + |
| 2 | +################################################## |
| 3 | +# # |
| 4 | +# Codis-Proxy # |
| 5 | +# # |
| 6 | +################################################## |
| 7 | + |
| 8 | +# Set Codis Product Name/Auth. |
| 9 | +product_name = "codis-demo" |
| 10 | +product_auth = "" |
| 11 | + |
| 12 | +# Set bind address for admin(rpc), tcp only. |
| 13 | +admin_addr = "0.0.0.0:11080" |
| 14 | + |
| 15 | +# Set bind address for proxy, proto_type can be "tcp", "tcp4", "tcp6", "unix" or "unixpacket". |
| 16 | +proto_type = "tcp4" |
| 17 | +proxy_addr = "0.0.0.0:19000" |
| 18 | + |
| 19 | +# Set jodis address & session timeout, only accept "zookeeper" & "etcd". |
| 20 | +jodis_name = "" |
| 21 | +jodis_addr = "" |
| 22 | +jodis_timeout = "20s" |
| 23 | +jodis_compatible = false |
| 24 | + |
| 25 | +# Set datacenter of proxy. |
| 26 | +proxy_datacenter = "" |
| 27 | + |
| 28 | +# Set max number of alive sessions. |
| 29 | +proxy_max_clients = 1000 |
| 30 | + |
| 31 | +# Set max offheap memory size. (0 to disable) |
| 32 | +proxy_max_offheap_size = "1024mb" |
| 33 | + |
| 34 | +# Set heap placeholder to reduce GC frequency. |
| 35 | +proxy_heap_placeholder = "256mb" |
| 36 | + |
| 37 | +# Proxy will ping backend redis in a predefined interval. (0 to disable) |
| 38 | +backend_ping_period = "5s" |
| 39 | + |
| 40 | +# Set backend recv buffer size & timeout. |
| 41 | +backend_recv_bufsize = "128kb" |
| 42 | +backend_recv_timeout = "30s" |
| 43 | + |
| 44 | +# Set backend send buffer & timeout. |
| 45 | +backend_send_bufsize = "128kb" |
| 46 | +backend_send_timeout = "30s" |
| 47 | + |
| 48 | +# Set backend pipeline buffer size. |
| 49 | +backend_max_pipeline = 1024 |
| 50 | + |
| 51 | +# Set backend never read replica groups, default is false |
| 52 | +backend_primary_only = false |
| 53 | + |
| 54 | +# Set backend parallel connections per server |
| 55 | +backend_primary_parallel = 1 |
| 56 | +backend_replica_parallel = 1 |
| 57 | + |
| 58 | +# Set backend tcp keepalive period. (0 to disable) |
| 59 | +backend_keepalive_period = "75s" |
| 60 | + |
| 61 | +# If there is no request from client for a long time, the connection will be closed. (0 to disable) |
| 62 | +# Set session recv buffer size & timeout. |
| 63 | +session_recv_bufsize = "128kb" |
| 64 | +session_recv_timeout = "30m" |
| 65 | + |
| 66 | +# Set session send buffer size & timeout. |
| 67 | +session_send_bufsize = "64kb" |
| 68 | +session_send_timeout = "30s" |
| 69 | + |
| 70 | +# Make sure this is higher than the max number of requests for each pipeline request, or your client may be blocked. |
| 71 | +# Set session pipeline buffer size. |
| 72 | +session_max_pipeline = 512 |
| 73 | + |
| 74 | +# Set session tcp keepalive period. (0 to disable) |
| 75 | +session_keepalive_period = "75s" |
| 76 | + |
| 77 | +# Set session to be sensitive to failures. Default is false, instead of closing socket, proxy will send an error response to client. |
| 78 | +session_break_on_failure = false |
| 79 | + |
| 80 | +# Set metrics server (such as http://localhost:28000), proxy will report json formatted metrics to specified server in a predefined period. |
| 81 | +metrics_report_server = "" |
| 82 | +metrics_report_period = "1s" |
| 83 | + |
| 84 | +# Set influxdb server (such as http://localhost:8086), proxy will report metrics to influxdb. |
| 85 | +metrics_report_influxdb_server = "" |
| 86 | +metrics_report_influxdb_period = "1s" |
| 87 | +metrics_report_influxdb_username = "" |
| 88 | +metrics_report_influxdb_password = "" |
| 89 | +metrics_report_influxdb_database = "" |
| 90 | + |
0 commit comments