Project

General

Profile

Actions

Bug #7235

closed

[SDKs] Python Keep client whole-transfer timeout should be more lenient

Added by Brett Smith over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Sarah Guthrie
Category:
SDKs
Target version:
Story points:
0.5

Description

Background

The Python Keep client sets a 300-second timeout to complete all requests. There are some real-world scenarios where this is too strict. For example, purely hypothetically, an Arvados developer might be working across an ocean, tethered through a cellular network. Everything will complete just fine, but whole 64MiB blocks might not be able to finish transferring in five minutes.

The functional requirement is that a user with a slow but stable connection can successfully interact with a Keep proxy. (I am willing to let timeouts continue to serve as a performance sanity check for the not-proxy case, on the expectation that one admin has sufficient control over the entire stack there.)

Implementation

Refer to libcurl connection options for details.

When the Python Keep client connects to a proxy service, instead of setting TIMEOUT_MS, set LOW_SPEED_LIMIT and LOW_SPEED_TIME to ensure a minimum transfer rate of 2 MiB per 64 second interval: i.e., give up if the transfer speed drops below 32 KiB/s.

Expected outcomes, assuming "mid-transfer outage" happens after 2 MiB has been transferred:

Available bandwidth Server delay (req finish to resp start) Mid-transfer outage Outcome
33 KiB/s None None Success
32 KiB/s 1s None Fail
32 KiB/s None 1s Fail
64 KiB/s 31s None Success
64 KiB/s 31s <32s Success
64 KiB/s <=31s >32s Fail
<2 MiB/s 63s None Fail
>2 MiB/s <63s None Success
>2 MiB/s <63s <63s Success "normal"
>2 MiB/s >=64s None Fail "classic timeout"
>2 MiB/s <63s >64s Fail "classic timeout"
Of the last 100393 keepstore transactions on keep14.q
  • 31 (0.03%) took longer than 30 seconds.
  • 8 (0.008%) took longer than 60 seconds.

Subtasks 2 (0 open2 closed)

Task #7684: Review 7235-python-keep-client-timeoutResolvedSarah Guthrie09/08/2015Actions
Task #7689: Write TestsResolvedSarah Guthrie09/08/2015Actions

Related issues

Related to Arvados - Idea #7477: [SDKs] Go Keep client enforces a minimum transfer rate for proxy connectionsNewActions
Actions

Also available in: Atom PDF