mirror of
https://github.com/jasonxu114514/opencode2api.git
synced 2026-12-05 08:02:53 +00:00
feat(warp): preload half the pool and register without a fixed gap
Registrations were paced by a fixed 12-second gap, which made a cold pool and a 429 replacement wait minutes for capacity. Remove the gap: the registrar now issues registrations back to back in the background, serialized by the pool's create mutex, and only a rejected attempt backs off (doJSON still honours Retry-After). Keep half of warp.pool_size (at least one) hot as a preload: the first exit still gates readiness, the rest register in the background, and desiredLocked/scaleDown treat the preload as a floor so idle surplus is still retired after 60 seconds but the warm bench survives. A 429 or 403 removes the exit from the ring and the next request uses a preloaded exit immediately. /healthz reports warp.preload, and the WebUI and all four READMEs describe the behaviour.
This commit is contained in:
1 parent
b8b1454a0e
commit
7d34bdde33
9 files changed
+51
-45
No files matched your search
+1
-1
@@ -881,7 +881,7 @@
|
||||
<label for="c-warp-pool" data-i18n="config.warp.pool">WARP 出口上限</label>
|
||||
<input id="c-warp-pool" type="number" min="1" max="32" step="1" />
|
||||
<p class="section-caption" data-i18n="config.warp.pool.hint">
|
||||
上限而非固定值:活跃出口随并发调整(每个在途请求一个,另留一个备用),空闲 60 秒后自动回收。
|
||||
上限而非固定值:第一个出口就绪后,后台预注册一半(至少 1 个)作为暖池;活跃出口随并发调整(每个在途请求一个,另留一个备用),空闲 60 秒后回收多余出口。
|
||||
</p>
|
||||
</div>
|
||||
<div class="field">
|
||||
|
||||
+3
-3
@@ -266,7 +266,7 @@ const DICTIONARY = {
|
||||
"config.warp.enabled": "Send free-model traffic through WARP",
|
||||
"config.warp.pool": "Maximum WARP exits",
|
||||
"config.warp.pool.hint":
|
||||
"An upper bound, not a fixed count: the active ring follows concurrency (one exit per in-flight request plus a spare) and shrinks after 60 idle seconds.",
|
||||
"An upper bound, not a fixed count: after the first exit is ready, half of it (at least one) is pre-registered in the background as warm capacity; the active ring then follows concurrency (one exit per in-flight request plus a spare) and shrinks after 60 idle seconds.",
|
||||
"config.warp.stack": "Network stack",
|
||||
"config.warp.stack.dual": "Dual stack",
|
||||
"config.warp.source": "Outer IPv6 source prefix (/64)",
|
||||
@@ -825,7 +825,7 @@ const DICTIONARY = {
|
||||
"config.warp.enabled": "Đưa lưu lượng model miễn phí qua WARP",
|
||||
"config.warp.pool": "Số đầu ra WARP tối đa",
|
||||
"config.warp.pool.hint":
|
||||
"Là giới hạn trên, không phải số cố định: vòng đầu ra đang hoạt động thay đổi theo mức đồng thời (mỗi yêu cầu đang chạy một đầu ra, cộng một đầu ra dự phòng) và thu gọn sau 60 giây nhàn rỗi.",
|
||||
"Là giới hạn trên, không phải số cố định: sau khi đầu ra đầu tiên sẵn sàng, một nửa (ít nhất một) được đăng ký trước ở nền; vòng hoạt động sau đó thay đổi theo mức đồng thời (mỗi yêu cầu đang chạy một đầu ra, cộng một đầu ra dự phòng) và thu gọn sau 60 giây nhàn rỗi.",
|
||||
"config.warp.stack": "Ngăn xếp mạng",
|
||||
"config.warp.stack.dual": "Hai ngăn xếp",
|
||||
"config.warp.source": "Tiền tố nguồn IPv6 bên ngoài (/64)",
|
||||
@@ -1395,7 +1395,7 @@ const DICTIONARY = {
|
||||
"config.warp.enabled": "Instrada il traffico dei modelli gratuiti tramite WARP",
|
||||
"config.warp.pool": "Numero massimo di uscite WARP",
|
||||
"config.warp.pool.hint":
|
||||
"È un limite massimo, non un numero fisso: il ring attivo segue la concorrenza (un'uscita per richiesta in corso più una di riserva) e si riduce dopo 60 secondi di inattività.",
|
||||
"È un limite massimo, non un numero fisso: dopo la prima uscita, metà del valore (almeno una) viene pre-registrata in background; il ring attivo segue poi la concorrenza (un'uscita per richiesta in corso più una di riserva) e si riduce dopo 60 secondi di inattività.",
|
||||
"config.warp.stack": "Stack di rete",
|
||||
"config.warp.stack.dual": "Doppio stack",
|
||||
"config.warp.source": "Prefisso sorgente IPv6 esterno (/64)",
|
||||
|
||||
Reference in new issue
Block a user