Repository navigation
Commit 3683d5e
feat(upload): rank a far primary with the backups by address family
The server may now make an edge domain the primary upload address. Its
TCP probe takes whichever family the system prefers, and from Singapore
the domain's IPv6 answer pointed at Beijing (180 ms) while its IPv4 edge
was 2 ms away, so the primary went to the end of the list unprobed.
When the primary is far and the server sends backupUrls, the primary is
now timed by TLS handshake over IPv4 and IPv6 like the backups and ranked
among them with the family that won; ties keep the server's order. A
server that sends only backupUrl still gets the backup first, the primary
last, without a second probe.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 4c4d190 commit 3683d5e
2 files changed
Lines changed: 34 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
530 | 532 | | |
531 | 533 | | |
532 | 534 | | |
| |||
560 | 562 | | |
561 | 563 | | |
562 | 564 | | |
563 | | - | |
564 | | - | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
565 | 568 | | |
566 | 569 | | |
567 | | - | |
| 570 | + | |
568 | 571 | | |
569 | 572 | | |
570 | 573 | | |
| |||
573 | 576 | | |
574 | 577 | | |
575 | 578 | | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
135 | 152 | | |
136 | 153 | | |
137 | 154 | | |
| |||
145 | 162 | | |
146 | 163 | | |
147 | 164 | | |
| 165 | + | |
148 | 166 | | |
149 | 167 | | |
| 168 | + | |
150 | 169 | | |
151 | 170 | | |
152 | | - | |
153 | 171 | | |
154 | 172 | | |
155 | 173 | | |
| |||
0 commit comments