mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-04-16 04:25:46 +00:00
Improve balancer failover responsiveness
Reduce observatory intervals and set default strategy to leastPing for faster and more reliable outbound switching.
This commit is contained in:
parent
169b216d7e
commit
2aeed9b28f
1 changed files with 6 additions and 6 deletions
|
|
@ -366,17 +366,17 @@
|
||||||
defaultObservatory: {
|
defaultObservatory: {
|
||||||
subjectSelector: [],
|
subjectSelector: [],
|
||||||
probeURL: "https://www.google.com/generate_204",
|
probeURL: "https://www.google.com/generate_204",
|
||||||
probeInterval: "10m",
|
probeInterval: "10s",
|
||||||
enableConcurrency: true
|
enableConcurrency: true
|
||||||
},
|
},
|
||||||
defaultBurstObservatory: {
|
defaultBurstObservatory: {
|
||||||
subjectSelector: [],
|
subjectSelector: [],
|
||||||
pingConfig: {
|
pingConfig: {
|
||||||
destination: "https://www.google.com/generate_204",
|
destination: "https://www.google.com/generate_204",
|
||||||
interval: "30m",
|
interval: "15s",
|
||||||
connectivity: "http://connectivitycheck.platform.hicloud.com/generate_204",
|
connectivity: "http://connectivitycheck.platform.hicloud.com/generate_204",
|
||||||
timeout: "10s",
|
timeout: "5s",
|
||||||
sampling: 2
|
sampling: 5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -865,7 +865,7 @@
|
||||||
newTemplateSettings.burstObservatory.subjectSelector = newTemplateSettings.burstObservatory.subjectSelector.filter(s => s != oldTag);
|
newTemplateSettings.burstObservatory.subjectSelector = newTemplateSettings.burstObservatory.subjectSelector.filter(s => s != oldTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (balancer.strategy && balancer.strategy != 'random') {
|
if (balancer.strategy && balancer.strategy != 'leastPing') {
|
||||||
tmpBalancer.strategy = {
|
tmpBalancer.strategy = {
|
||||||
'type': balancer.strategy
|
'type': balancer.strategy
|
||||||
};
|
};
|
||||||
|
|
@ -1562,4 +1562,4 @@
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{{ template "page/body_end" .}}
|
{{ template "page/body_end" .}}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue