diff --git a/deploy/root/opt/codis/etc/10.2.16.200_19000/proxy.toml b/deploy/root/opt/codis/etc/10.2.16.200_19000/proxy.toml index 38bcded86..7ee15e40d 100644 --- a/deploy/root/opt/codis/etc/10.2.16.200_19000/proxy.toml +++ b/deploy/root/opt/codis/etc/10.2.16.200_19000/proxy.toml @@ -73,6 +73,9 @@ session_max_pipeline = 512 # Set session tcp keepalive period. (0 to disable) session_keepalive_period = "75s" +# Set session to be sensitive to failures. Default is false, instead of closing socket, proxy will send an error response to client. +session_break_on_failure = false + # Set metrics server (such as http://localhost:28000), proxy will report json formatted metrics to specified server in a predefined period. metrics_report_server = "" metrics_report_period = "1s" diff --git a/deploy/root/opt/codis/etc/10.2.16.200_19002/proxy.toml b/deploy/root/opt/codis/etc/10.2.16.200_19002/proxy.toml index 74cedb3af..378dfb2e0 100644 --- a/deploy/root/opt/codis/etc/10.2.16.200_19002/proxy.toml +++ b/deploy/root/opt/codis/etc/10.2.16.200_19002/proxy.toml @@ -73,6 +73,9 @@ session_max_pipeline = 512 # Set session tcp keepalive period. (0 to disable) session_keepalive_period = "75s" +# Set session to be sensitive to failures. Default is false, instead of closing socket, proxy will send an error response to client. +session_break_on_failure = false + # Set metrics server (such as http://localhost:28000), proxy will report json formatted metrics to specified server in a predefined period. metrics_report_server = "" metrics_report_period = "1s" diff --git a/deploy/root/opt/codis/etc/10.2.16.201_19000/proxy.toml b/deploy/root/opt/codis/etc/10.2.16.201_19000/proxy.toml index a3e409e13..d0e186ffb 100644 --- a/deploy/root/opt/codis/etc/10.2.16.201_19000/proxy.toml +++ b/deploy/root/opt/codis/etc/10.2.16.201_19000/proxy.toml @@ -73,6 +73,9 @@ session_max_pipeline = 512 # Set session tcp keepalive period. (0 to disable) session_keepalive_period = "75s" +# Set session to be sensitive to failures. Default is false, instead of closing socket, proxy will send an error response to client. +session_break_on_failure = false + # Set metrics server (such as http://localhost:28000), proxy will report json formatted metrics to specified server in a predefined period. metrics_report_server = "" metrics_report_period = "1s" diff --git a/deploy/root/opt/codis/etc/10.2.16.201_19002/proxy.toml b/deploy/root/opt/codis/etc/10.2.16.201_19002/proxy.toml index d967a5809..401fd535f 100644 --- a/deploy/root/opt/codis/etc/10.2.16.201_19002/proxy.toml +++ b/deploy/root/opt/codis/etc/10.2.16.201_19002/proxy.toml @@ -73,6 +73,9 @@ session_max_pipeline = 512 # Set session tcp keepalive period. (0 to disable) session_keepalive_period = "75s" +# Set session to be sensitive to failures. Default is false, instead of closing socket, proxy will send an error response to client. +session_break_on_failure = false + # Set metrics server (such as http://localhost:28000), proxy will report json formatted metrics to specified server in a predefined period. metrics_report_server = "" metrics_report_period = "1s" diff --git a/deploy/root/opt/codis/etc/10.2.16.202_19000/proxy.toml b/deploy/root/opt/codis/etc/10.2.16.202_19000/proxy.toml index 437bea70e..502142f3a 100644 --- a/deploy/root/opt/codis/etc/10.2.16.202_19000/proxy.toml +++ b/deploy/root/opt/codis/etc/10.2.16.202_19000/proxy.toml @@ -73,6 +73,9 @@ session_max_pipeline = 512 # Set session tcp keepalive period. (0 to disable) session_keepalive_period = "75s" +# Set session to be sensitive to failures. Default is false, instead of closing socket, proxy will send an error response to client. +session_break_on_failure = false + # Set metrics server (such as http://localhost:28000), proxy will report json formatted metrics to specified server in a predefined period. metrics_report_server = "" metrics_report_period = "1s" diff --git a/deploy/root/opt/codis/etc/10.2.16.202_19002/proxy.toml b/deploy/root/opt/codis/etc/10.2.16.202_19002/proxy.toml index 23b4bee3a..2055a0646 100644 --- a/deploy/root/opt/codis/etc/10.2.16.202_19002/proxy.toml +++ b/deploy/root/opt/codis/etc/10.2.16.202_19002/proxy.toml @@ -73,6 +73,9 @@ session_max_pipeline = 512 # Set session tcp keepalive period. (0 to disable) session_keepalive_period = "75s" +# Set session to be sensitive to failures. Default is false, instead of closing socket, proxy will send an error response to client. +session_break_on_failure = false + # Set metrics server (such as http://localhost:28000), proxy will report json formatted metrics to specified server in a predefined period. metrics_report_server = "" metrics_report_period = "1s" diff --git a/deploy/root/opt/codis/etc/10.4.10.100_18080/dashboard.toml b/deploy/root/opt/codis/etc/10.4.10.100_18080/dashboard.toml index 6497b97f1..ea08e679d 100644 --- a/deploy/root/opt/codis/etc/10.4.10.100_18080/dashboard.toml +++ b/deploy/root/opt/codis/etc/10.4.10.100_18080/dashboard.toml @@ -20,4 +20,6 @@ sentinel_quorum = 2 sentinel_parallel_syncs = 1 sentinel_down_after = "10s" sentinel_failover_timeout = "5m" +sentinel_notification_script = "" +sentinel_client_reconfig_script = "" diff --git a/deploy/root/opt/codis/etc/10.4.10.200_19000/proxy.toml b/deploy/root/opt/codis/etc/10.4.10.200_19000/proxy.toml index a157e0102..c819d0917 100644 --- a/deploy/root/opt/codis/etc/10.4.10.200_19000/proxy.toml +++ b/deploy/root/opt/codis/etc/10.4.10.200_19000/proxy.toml @@ -73,6 +73,9 @@ session_max_pipeline = 512 # Set session tcp keepalive period. (0 to disable) session_keepalive_period = "75s" +# Set session to be sensitive to failures. Default is false, instead of closing socket, proxy will send an error response to client. +session_break_on_failure = false + # Set metrics server (such as http://localhost:28000), proxy will report json formatted metrics to specified server in a predefined period. metrics_report_server = "" metrics_report_period = "1s" diff --git a/deploy/root/opt/codis/etc/10.4.10.200_19002/proxy.toml b/deploy/root/opt/codis/etc/10.4.10.200_19002/proxy.toml index 272d40aba..b578f293d 100644 --- a/deploy/root/opt/codis/etc/10.4.10.200_19002/proxy.toml +++ b/deploy/root/opt/codis/etc/10.4.10.200_19002/proxy.toml @@ -73,6 +73,9 @@ session_max_pipeline = 512 # Set session tcp keepalive period. (0 to disable) session_keepalive_period = "75s" +# Set session to be sensitive to failures. Default is false, instead of closing socket, proxy will send an error response to client. +session_break_on_failure = false + # Set metrics server (such as http://localhost:28000), proxy will report json formatted metrics to specified server in a predefined period. metrics_report_server = "" metrics_report_period = "1s" diff --git a/deploy/root/opt/codis/etc/10.4.10.201_19000/proxy.toml b/deploy/root/opt/codis/etc/10.4.10.201_19000/proxy.toml index 87e14774f..57ef9950e 100644 --- a/deploy/root/opt/codis/etc/10.4.10.201_19000/proxy.toml +++ b/deploy/root/opt/codis/etc/10.4.10.201_19000/proxy.toml @@ -73,6 +73,9 @@ session_max_pipeline = 512 # Set session tcp keepalive period. (0 to disable) session_keepalive_period = "75s" +# Set session to be sensitive to failures. Default is false, instead of closing socket, proxy will send an error response to client. +session_break_on_failure = false + # Set metrics server (such as http://localhost:28000), proxy will report json formatted metrics to specified server in a predefined period. metrics_report_server = "" metrics_report_period = "1s" diff --git a/deploy/root/opt/codis/etc/10.4.10.201_19002/proxy.toml b/deploy/root/opt/codis/etc/10.4.10.201_19002/proxy.toml index 3e1946f5e..8a0d87389 100644 --- a/deploy/root/opt/codis/etc/10.4.10.201_19002/proxy.toml +++ b/deploy/root/opt/codis/etc/10.4.10.201_19002/proxy.toml @@ -73,6 +73,9 @@ session_max_pipeline = 512 # Set session tcp keepalive period. (0 to disable) session_keepalive_period = "75s" +# Set session to be sensitive to failures. Default is false, instead of closing socket, proxy will send an error response to client. +session_break_on_failure = false + # Set metrics server (such as http://localhost:28000), proxy will report json formatted metrics to specified server in a predefined period. metrics_report_server = "" metrics_report_period = "1s" diff --git a/deploy/root/opt/codis/etc/127.0.0.1_18080/dashboard.toml b/deploy/root/opt/codis/etc/127.0.0.1_18080/dashboard.toml index 8ec7fabd0..0232a29f8 100644 --- a/deploy/root/opt/codis/etc/127.0.0.1_18080/dashboard.toml +++ b/deploy/root/opt/codis/etc/127.0.0.1_18080/dashboard.toml @@ -20,4 +20,6 @@ sentinel_quorum = 2 sentinel_parallel_syncs = 1 sentinel_down_after = "10s" sentinel_failover_timeout = "5m" +sentinel_notification_script = "" +sentinel_client_reconfig_script = "" diff --git a/deploy/root/opt/codis/etc/127.0.0.1_19000/proxy.toml b/deploy/root/opt/codis/etc/127.0.0.1_19000/proxy.toml index 3def4a72c..c9c7de1bd 100644 --- a/deploy/root/opt/codis/etc/127.0.0.1_19000/proxy.toml +++ b/deploy/root/opt/codis/etc/127.0.0.1_19000/proxy.toml @@ -73,6 +73,9 @@ session_max_pipeline = 1024 # Set session tcp keepalive period. (0 to disable) session_keepalive_period = "75s" +# Set session to be sensitive to failures. Default is false, instead of closing socket, proxy will send an error response to client. +session_break_on_failure = false + # Set metrics server (such as http://localhost:28000), proxy will report json formatted metrics to specified server in a predefined period. metrics_report_server = "" metrics_report_period = "1s" diff --git a/deploy/root/opt/codis/etc/127.0.0.1_19001/proxy.toml b/deploy/root/opt/codis/etc/127.0.0.1_19001/proxy.toml index b2875b574..ab03716bd 100644 --- a/deploy/root/opt/codis/etc/127.0.0.1_19001/proxy.toml +++ b/deploy/root/opt/codis/etc/127.0.0.1_19001/proxy.toml @@ -73,6 +73,9 @@ session_max_pipeline = 1024 # Set session tcp keepalive period. (0 to disable) session_keepalive_period = "75s" +# Set session to be sensitive to failures. Default is false, instead of closing socket, proxy will send an error response to client. +session_break_on_failure = false + # Set metrics server (such as http://localhost:28000), proxy will report json formatted metrics to specified server in a predefined period. metrics_report_server = "" metrics_report_period = "1s" diff --git a/deploy/root/opt/codis/etc/127.0.0.1_19002/proxy.toml b/deploy/root/opt/codis/etc/127.0.0.1_19002/proxy.toml index 12627c2d4..a6f00f4bd 100644 --- a/deploy/root/opt/codis/etc/127.0.0.1_19002/proxy.toml +++ b/deploy/root/opt/codis/etc/127.0.0.1_19002/proxy.toml @@ -73,6 +73,9 @@ session_max_pipeline = 1024 # Set session tcp keepalive period. (0 to disable) session_keepalive_period = "75s" +# Set session to be sensitive to failures. Default is false, instead of closing socket, proxy will send an error response to client. +session_break_on_failure = false + # Set metrics server (such as http://localhost:28000), proxy will report json formatted metrics to specified server in a predefined period. metrics_report_server = "" metrics_report_period = "1s" diff --git a/deploy/templates/dashboard.toml.template b/deploy/templates/dashboard.toml.template index e059c6d9d..193f184c1 100644 --- a/deploy/templates/dashboard.toml.template +++ b/deploy/templates/dashboard.toml.template @@ -20,4 +20,6 @@ sentinel_quorum = {SENTINEL_QUORUM} sentinel_parallel_syncs = 1 sentinel_down_after = "{SENTINEL_DOWN_AFTER}" sentinel_failover_timeout = "5m" +sentinel_notification_script = "" +sentinel_client_reconfig_script = "" diff --git a/deploy/templates/proxy.toml.template b/deploy/templates/proxy.toml.template index 6496d7ac1..4b9433665 100644 --- a/deploy/templates/proxy.toml.template +++ b/deploy/templates/proxy.toml.template @@ -73,6 +73,9 @@ session_max_pipeline = {MAX_PIPELINE} # Set session tcp keepalive period. (0 to disable) session_keepalive_period = "75s" +# Set session to be sensitive to failures. Default is false, instead of closing socket, proxy will send an error response to client. +session_break_on_failure = false + # Set metrics server (such as http://localhost:28000), proxy will report json formatted metrics to specified server in a predefined period. metrics_report_server = "" metrics_report_period = "1s" diff --git a/example/proxy.py b/example/proxy.py index c08961af2..9f1aa10c8 100644 --- a/example/proxy.py +++ b/example/proxy.py @@ -39,6 +39,7 @@ def _open_config(admin_port, proxy_port, product_name, product_auth=None): f.write('proxy_datacenter = "localhost"\n') f.write('proxy_heap_placeholder = "0"\n') f.write('proxy_max_offheap_size = "0"\n') + f.write('session_break_on_failure = false\n') return config