描述

    使用show proxyconfig [like 'xx']语句:

    • 这里所展示的配置项可以分为3种类型况来说明:

    • 第一种是proxy注册到内部表ob_all_proxy_config中的配置项,这些配置项可供用户根据使用场景进行配置和更新。

    • 第二种是proxy内部自己使用,对一般用户不可见的配置项,不会注册到内部表中。
    • 第三种是proxy从config server中获取到的配置信息(包括版本号、meta table信息、cluster信息、bin url和更新时间),这些信息只用来展示config server的配置,不会注册到内部表或者dump到本地配置文件中,并且它们全部以字符串“json_config”开头,查询时可以使用like进行过滤。

    • 上述的前两种配置信息会在本地生产一个配置文件,默认保存在proxy运行目录的etc目录下,文件名为obproxy_config.bin,第三种配置信息仅保存在proxy内存中。

    • 支持like模糊匹配(支持’%’和’_‘的匹配)。

    示例

    1. OceanBase (root@oceanbase)> show proxyconfig;
    2. +-----------------------------------------+--------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+---------------+
    3. | name | value | info | need_reboot | visible_level |
    4. +-----------------------------------------+--------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+---------------+
    5. | client_max_memory_size | 8MB | max dynamic alloc memory size of one client session | false | SYS |
    6. | max_connections | 60000 | max fd proxy could use | false | SYS |
    7. | current_local_config_version | 100 | current local config version | false | SYS |
    8. | proxy_local_cmd | 0 | proxy local cmd type: 0->none(default), 1->exit, 2->restart, 3->commit, 4->rollback | false | MEMORY |
    9. | syslog_level | DEBUG | specifies the current level of logging: DEBUG, TRACE, INFO, WARN, USER_ERR, ERROR | false | USER |
    10. | server_routing_mode | oceanbase | server routing mode: 1.oceanbase(default mode); 2.random; 3.mock; 4.mysql | false | SYS |
    11. | test_server_addr | | proxy will choose this addr(if not empty) as observer addr forcibly, format ip1:sql_port1;ip2:sql_port2 | false | USER |
    12. | internal_cmd_mem_limited | 64K | internal cmd response memory limited, [0, 64MB], 0 means unlimited | false | USER |
    13. | sqlaudit_mem_limited | 0 | sqlaudit memory limited, [0, 1GB] | false | USER |
    14. | limited_pl_update_threshold | 10 | in merging state, max partition location update task processing per second | false | SYS |
    15. | normal_pl_update_threshold | 100 | max partition location update task processing per second | false | SYS |
    16. | enable_bad_route_reject | False | if enabled, bad route reuest will be rejected, like the first statement of a transaction block opened by begin(or start transaction) do not have table name | false | USER |
    17. | enable_congestion | True | enable congestion feature or not | false | USER |
    18. | congestion_retry_interval | 20s | congestion retry interval, [1s, 1h] | false | USER |
    19. | congestion_fail_window | 120s | congestion failure window size, [1s, 1h] | false | USER |
    20. | min_keep_congestion_interval | 20s | minimum keep congestion interval, [1s, 1d] | false | USER |
    21. | congestion_failure_threshold | 5 | congestion failure threshold, [0, +∞], 0 means disable congestion | false | USER |
    22. | app_name | ob1.jianhua.sjh | current application name which proxy works for, need defined | false | SYS |
    23. | proxy_id | 0 | used to identify each obproxy, it can not be zero if proxy_service_mode is server | true | SYS |
    24. | proxy_service_mode | client | proxy deploy and service mode: 1.client(default); 2.server | true | SYS |
    25. | obproxy_config_server_url | http://10.111.4.23:8080/diamond/cgi/a.py?key=ob1.jianhua.sjh.10.125.224.4.proxy&method=get | url of config info(rs list and so on) | true | SYS |
    26. | rootservice_list | | a list of servers against which election candidate is checked for validation, format ip1:sql_port1;ip2:sql_port2 | true | SYS |
    27. | listen_port | 13203 | obproxy listen port | true | SYS |
    28. | local_bound_ip | 0.0.0.0 | local bound ip(any) | true | SYS |
    29. | ignore_local_config | True | ignore all local cached files, start proxy with remote json | false | USER |
    30. | slow_proxy_process_time_threshold | 2ms | slow proxy process time threshold, [0s, 30d] | false | USER |
    31. | slow_transaction_time_threshold | 5s | slow transaction time threshold, [0s, 30d], if set a negative value, proxy treat it as 0 | false | USER |
    32. | enable_trace_stats | False | enable mysql trace stats | false | USER |
    33. | enable_cpu_topology | True | enable cpu topology, work threads bind to cpu | true | USER |
    34. | enable_strict_stat_time | True | enable strict statistic time, use gettimeofday or clock_gettime(CLOCK_REALTIME) | false | USER |
    35. | enable_report_session_stats | False | enable report client session statistic table | false | USER |
    36. | enable_mysqlsm_info | True | enable mysqlsm info, not used in proxy now | false | USER |
    37. | enable_sync_all_stats | True | enable proxy sync all stats | false | USER |
    38. | enable_trans_detail_stats | True | enable mysql transaction detail stats | false | USER |
    39. | enable_flow_control | True | whether flow control is enabled in a mysql tunnel, applied instantly in new created tunnels after updated | false | USER |
    40. | flow_event_queue_threshold | 5 | event queue threshold for flow control, [0, 20], if set a negative value, proxy treat it as 5 | false | USER |
    41. | flow_consumer_reenable_threshold | 256 | consumer reenable threshold for flow control, [0, 131072], if set a negative value, proxy treat it as 256 | false | USER |
    42. | flow_low_water_mark | 64K | flow low water mark for flow control, [0, 16MB], if set a negative value, proxy treat it as 64K | false | USER |
    43. | flow_high_water_mark | 64K | flow high water mark for flow control, [0, 16MB], if set a negative value, proxy treat it as 64K | false | USER |
    44. | request_buffer_length | 4KB | the max length of request buffer we will alloc for each reqeust | false | USER |
    45. | tunnel_request_size_threshold | 8KB | use tunnel to transfer request, [4KB, 16MB], if request bigger than the threshold, 0 disable | false | USER |
    46. | default_buffer_water_mark | 32KB | default buffer water mark, [4B, 64KB] | false | USER |
    47. | task_thread_num | 2 | proxy task thread num, [1, 4] | true | USER |
    48. | work_thread_num | 8 | proxy work thread num, [1, 128] | true | USER |
    49. | routing_cache_mem_limited | 50MB | max size of all proxy routing cache size, like table cache, location cache, etc. [1KB, 100G] | false | USER |
    50. | stack_size | 1MB | stack size of one thread, [1MB, 10MB] | true | USER |
    51. | proxy_mem_limited | 800MB | proxy memory limited, [100MB, 100G] | false | USER |
    52. | server_tcp_init_cwnd | 0 | the initial tcp congestion window, [0, 64] | false | USER |
    53. | sock_packet_tos_out | 0 | sock param, packet tos out, [0, 1] | false | USER |
    54. | sock_packet_mark_out | 0 | sock param, packet mark out, [0, 1] | false | USER |
    55. | sock_option_flag_out | 0 | sock param, option flag out, bit 1: NO_DELAY, bit 2: KEEP_ALIVE, bit 3: LINGER_ON | false | USER |
    56. | sock_send_buffer_size_out | 0 | sock param, send buffer size, [0, 8MB], if set a negative value, proxy treat it as 0 | false | USER |
    57. | sock_recv_buffer_size_out | 0 | sock param, recv buffer size, [0, 8MB], if set a negative value, proxy treat it as 0 | false | USER |
    58. | default_inactivity_timeout | 180000s | default inactivity timeout, [1s, 30d] | false | USER |
    59. | net_config_poll_timeout | 1ms | epoll_wait timeout for net events, [0, +∞], if set a value <= 0, proxy treat it as 0 | false | USER |
    60. | net_accept_threads | 2 | net accept threads num, [0, 8] | true | USER |
    61. | frequent_accept | True | frequent accept | true | USER |
    62. | connect_observer_max_retries | 3 | max retries to do connect | false | USER |
    63. | enable_cluster_checkout | True | if enable cluster checkout, proxy will send cluster name and id when login and server will check it | false | USER |
    64. | observer_query_timeout_delta | 20s | the delta value for @@ob_query_timeout, to cover net round trip time(proxy<->server) and task schedule time(server), [1s, 30s] | false | USER |
    65. | client_max_connections | 8192 | client max connections for one obproxy, [0, 65535] | false | USER |
    66. | enable_client_connection_lru_disconnect | False | if client connections reach throttle, true is that new connection will be accepted, and eliminate lru client connection, false is that new connection will disconnect, and err packet will be returned | false | SYS |
    67. | username_separator | :;-;. | username separator | false | SYS |
    68. | short_async_task_timeout | 5s | short async task timeout, [1s, 1h] | false | USER |
    69. | long_async_task_timeout | 60s | long async task timeout, [1s, 1h] | false | USER |
    70. | need_convert_vip_to_tname | False | convert vip to tenant name, which is useful in cloud | false | SYS |
    71. | log_dir_size_threshold | 64GB | max usable space size of log dir, used to decide whether should clean up log file, [256MB, 1T] | false | USER |
    72. | log_cleanup_interval | 10m | log file clean up task schedule interval, set 1 day or longer, [5s, 30d] | false | USER |
    73. | log_file_percentage | 80 | max percentage of avail size occupied by proxy log file, [0, 90], 0 means ignore such limit | false | USER |
    74. | delay_exit_time | 100ms | delay exit time, [100ms,500ms] | false | USER |
    75. | hot_upgrade_graceful_exit_timeout | 120s | graceful exit timeout, [0s, 30d], if set a value <= 0, proxy treat it as 0 | false | USER |
    76. | hot_upgrade_rollback_timeout | 24h | default hot upgrade rollback timeout, proxy will do rollback if receive no rollback command in such long time, [1s, 30d] | false | USER |
    77. | hot_upgrade_failure_retries | 5 | default hot upgrade failure retries, proxy will stop handle hot_upgrade command after such retries, [1, 20] | false | USER |
    78. | fetch_proxy_bin_timeout | 120s | default hot upgrade fetch binary timeout, proxy will stop fetching after such long time, [1s, 1200s] | false | USER |
    79. | fetch_proxy_bin_random_time | 300s | max random waiting time of fetching proxy bin in hot upgrade, [1s, 1h] | false | USER |
    80. | cluster_expire_time | 1d | cluster resource expire time, 0 means never expire,cluster will be deleted if it has not been accessed for more than the time,[0, ] | false | USER |
    81. | cluster_count_high_water_mark | 256 | if cluster count is greater than this water mark, cluser will be kicked out by LRU | false | USER |
    82. | partition_location_expire_relative_time | 0 | the unit is second, 0 means do not expire, others will expire partition location base on relative time | false | SYS |
    83. | stat_dump_interval | 6000s | dump statistic in log interval, [0s, 1d], 0 means disable, if set a negative value, proxy treat it as 0 | false | USER |
    84. | stat_table_sync_interval | 60s | update sync statistic to ob_all_proxy_stat table interval, [0s, 1d], 0 means disable, if set a negative value, proxy treat it as 0 | false | USER |
    85. | config_server_refresh_interval | 60s | config server info refresh task interval, [10s, 1d] | false | USER |
    86. | server_state_refresh_interval | 20s | the interval to refresh server state for getting zone or server newest state, (0s, 1h] | false | USER |
    87. | cache_cleaner_clean_interval | 20s | the interval for cache cleaner to clean cache, [1s, 1d] | false | USER |
    88. | proxy_info_check_interval | 60s | proxy info check task interval, [1s, 1h] | false | USER |
    89. | refresh_config | False | when table processor do check work, update all proxy config if refresh_config is true | false | MEMORY |
    90. | refresh_rslist | False | when refresh config server, update all rslist if refresh_rslist is true | false | MEMORY |
    91. | refresh_json_config | False | force update json info if refresh_json_config is true | false | MEMORY |
    92. | json_config_version | 9254042f506530ffe6ce1f3ac718d817 | json config info version | false | virtual |
    93. | json_config_bin_url | http://10.111.4.23:8877 | bin url, used for hot upgrade | false | virtual |
    94. | json_config_meta_table_db | oceanbase | meta table db name | true | virtual |
    95. | json_config_meta_table_user | admin | meta table username, format'user@tenant#cluster' | true | virtual |
    96. | json_config_meta_table_password | admin | meta table password | true | virtual |
    97. | json_config_real_meta_cluster | ob1.jianhua.sjh | meta table real cluster | true | virtual |
    98. | json_config_cluster_count | 1 | ob cluster count, meta db cluster not included | false | virtual |
    99. | json_config_modified_time | 2016-09-29 10:38:09.193650 | json config modified time | false | virtual |
    100. +-----------------------------------------+--------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+---------------+
    101. 95 rows in set (0.00 sec)
    1. OceanBase (root@oceanbase)> show proxyconfig like "%json%";
    2. +---------------------------------+----------------------------------+-------------------------------------------------------+-------------+---------------+
    3. | name | value | info | need_reboot | visible_level |
    4. +---------------------------------+----------------------------------+-------------------------------------------------------+-------------+---------------+
    5. | refresh_json_config | False | force update json info if refresh_json_config is true | false | MEMORY |
    6. | json_config_version | 9254042f506530ffe6ce1f3ac718d817 | json config info version | false | virtual |
    7. | json_config_bin_url | http://10.111.4.23:8877 | bin url, used for hot upgrade | false | virtual |
    8. | json_config_meta_table_db | oceanbase | meta table db name | true | virtual |
    9. | json_config_meta_table_user | admin | meta table username, format'user@tenant#cluster' | true | virtual |
    10. | json_config_meta_table_password | admin | meta table password | true | virtual |
    11. | json_config_real_meta_cluster | ob1.jianhua.sjh | meta table real cluster | true | virtual |
    12. | json_config_cluster_count | 1 | ob cluster count, meta db cluster not included | false | virtual |
    13. | json_config_modified_time | 2016-09-29 10:38:09.193650 | json config modified time | false | virtual |
    14. +---------------------------------+----------------------------------+-------------------------------------------------------+-------------+---------------+
    15. 9 rows in set (0.00 sec)