Title: net: intelligent backhaul selection, then optional selective sharing · Issue #360 · jangala-dev/devicecode-lua · GitHub
Open Graph Title: net: intelligent backhaul selection, then optional selective sharing · Issue #360 · jangala-dev/devicecode-lua
X Title: net: intelligent backhaul selection, then optional selective sharing · Issue #360 · jangala-dev/devicecode-lua
Description: Why v0.11.3 shares backhaul probabilistically: new connections are split across all uplinks using speed-test results. This has proved unreliable: Small tests: the tests have to be small to limit mobile data use, especially for internatio...
Open Graph Description: Why v0.11.3 shares backhaul probabilistically: new connections are split across all uplinks using speed-test results. This has proved unreliable: Small tests: the tests have to be small to limit mo...
X Description: Why v0.11.3 shares backhaul probabilistically: new connections are split across all uplinks using speed-test results. This has proved unreliable: Small tests: the tests have to be small to limit mo...
Opengraph URL: https://github.com/jangala-dev/devicecode-lua/issues/360
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"net: intelligent backhaul selection, then optional selective sharing","articleBody":"## Why\n\nv0.11.3 shares backhaul probabilistically: new connections are split across all uplinks using speed-test results. This has proved unreliable:\n- **Small tests:** the tests have to be small to limit mobile data use, especially for international partners.\n- **Bad startup results:** tests run while interfaces are still coming up can be badly wrong, and the resulting weights can persist for hours.\n\n#357 replaces this with fixed-priority failover (wired WAN, then modem 1, then modem 2), which a custom build has already shown to be more stable. But a fixed order ignores quality. For example, it will prefer an Ethernet uplink from a slow LTE router over a much faster internal 5G modem.\n\nThis issue tracks replacing fixed priorities with informed selection, and later reintroducing sharing only where it helps.\n\n## Stages\n\n### 1. Validate failure recovery on v0.12\nWith backhaul sharing, connections assigned to a modem could stay stuck after that modem reset, even with another working backhaul available. A possibly related fix is in v0.12 (#350, the cellular interface restart on reconnect).\n- Run sustained multi-connection downloads across the available backhauls.\n- Reset or disconnect a modem mid-transfer.\n- Record whether existing connections recover, reconnect or stay stuck, and how long new connections take to use a healthy backhaul.\n- Compare v0.11.3 and v0.12.\n- If connections still stick, look at conntrack/routing state for failed interfaces (selective cleanup). Sessions can't migrate between public IPs, so the aim is fast, reliable reconnection.\n\n### 2. Backhaul assessment\n- **Cellular** (no data cost):\n - modem capability (LTE category, 5G, carrier aggregation);\n - radio technology, band, bandwidth, CA;\n - SNR / RSRQ / RSRP;\n - latency and packet loss.\n\n First check which of these are consistently available across the EG25-G, EM12-G and RM520N-GL.\n- **Ethernet:**\n - lightweight connectivity/latency/loss monitoring;\n - passive observation of real throughput;\n - small threshold tests against self-hosted endpoints (controlled size and frequency, for Ethernet that is itself on metered cellular);\n - public IP / ASN / gateway identification as context.\n- Each backhaul gets a health status, an estimated capacity or suitability score, and a **confidence**. A short Ethernet test can under-read, and a radio-based cellular estimate can over-read under congestion.\n- Validate the estimates against measured throughput.\n\n### 3. Intelligent failover\n- Select the most suitable available backhaul from estimated capacity, connectivity, latency/loss, confidence, data cost and configured preferences.\n- Never delay basic connectivity. At startup, or while estimates are unreliable, use the conservative default order from #357.\n- Filter radio measurements (median, then EWMA). Reassess on cell change. One poor startup measurement must not mark a link slow for long.\n- Switching:\n - fast failover on failure;\n - switch on significant, sustained degradation;\n - stay put on a marginal improvement elsewhere;\n - consider switching only on a substantial, sustained improvement (switching breaks existing TCP sessions).\n\n### 4. Validate\nCompare against the fixed-priority build and v0.11.3 sharing. Cover different radio conditions, Ethernet backhaul types, congestion and moving-vehicle installs. Measure reliability, user experience, selection choices and recovery time.\n\n### 5. Optional selective sharing\n- Share only between Ethernet and the best modem; the second modem stays on standby.\n- Share only when both links are capable enough and the extra capacity is worth it. Starting point to validate: both ≥ 10 Mbps, and the slower ≥ 25% of the faster. Also consider latency/loss, confidence, current demand and data cost.\n- Allocate new connections in proportion to estimated capacity from radio estimates, limited Ethernet tests and passive observation, not from small cellular speed tests.\n- A backhaul that falls below the threshold stops getting new connections; existing ones finish where they are.\n\n## Related\n- #357: strict failover, the baseline for this work.\n- #302: choppy connectivity mixing a fast WAN with a weak SIM.\n- #348: speed-test accuracy.\n- #356: mwan3 restarting uplinks offline.\n- #350: cellular interface restart on reconnect.\n","author":{"url":"https://github.com/cpunt","@type":"Person","name":"cpunt"},"datePublished":"2026-11-02T16:36:03Z","url":"https://github.com/jangala-dev/devicecode-lua/issues/360"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1eb5f294-bd1a-2076-0b90-43cd7c530378 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8826:2314F3:59E11:7C643:6AF8995F |
| html-safe-nonce | ef9803b1ae725b70b3ebb0fb7f2df01a7a249ab4ae4b9b21fd3f1438d5d278a1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODI2OjIzMTRGMzo1OUUxMTo3QzY0Mzo2QUY4OTk1RiIsInZpc2l0b3JfaWQiOiI1ODE4ODA5NTgyNjA3NzAyMzY3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d92ddf29c33e79407bbc6025819f32e152d33bf671c077df6bce69578a3b1e81 |
| hovercard-subject-tag | issue:6166715797 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/jangala-dev/devicecode-lua/360/issue_layout |
| twitter:image | https://opengraph.githubassets.com/25ca2af270f447fd05eff78a41f25d86f7e96dc502d89f13b7f1aefa687c0f43/jangala-dev/devicecode-lua/issues/360 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/25ca2af270f447fd05eff78a41f25d86f7e96dc502d89f13b7f1aefa687c0f43/jangala-dev/devicecode-lua/issues/360 |
| og:image:alt | Why v0.11.3 shares backhaul probabilistically: new connections are split across all uplinks using speed-test results. This has proved unreliable: Small tests: the tests have to be small to limit mo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cpunt |
| hostname | github.com |
| expected-hostname | github.com |
| None | 612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7 |
| turbo-cache-control | no-preview |
| go-import | github.com/jangala-dev/devicecode-lua git https://github.com/jangala-dev/devicecode-lua.git |
| octolytics-dimension-user_id | 44901909 |
| octolytics-dimension-user_login | jangala-dev |
| octolytics-dimension-repository_id | 814022112 |
| octolytics-dimension-repository_nwo | jangala-dev/devicecode-lua |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 814022112 |
| octolytics-dimension-repository_network_root_nwo | jangala-dev/devicecode-lua |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 072e34035c13c31543fba9f025cbbbda4210dae4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width