Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add network timeout config to signer/upload requests #267

Merged
merged 1 commit into from
Oct 18, 2018

Conversation

kolanos
Copy link
Contributor

@kolanos kolanos commented Oct 18, 2018

Closes #266

@kolanos kolanos self-assigned this Oct 18, 2018
@kolanos kolanos requested a review from pselle October 18, 2018 02:26
"""
try:
logger.debug("Uploading log data to IOpipe")
if isinstance(stream_or_file, StringIO):
stream_or_file.seek(0)
response = requests.put(url, data=stream_or_file, timeout=None)
response = requests.put(
url, data=stream_or_file, timeout=config["network_timeout"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, do we want to use the same network timeout as collector? Or have it be a separate config item? The default value for this is 5000ms and I think we can be much more aggressive with the signer API (100ms)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(honestly, could be that we should make that 5000 much smaller)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the service characteristics of the collector and signer are different enough to warrant a significantly different timeout. If both services are healthy these timeouts should never be hit. The timeout acts as a n upper bound, or worst case, so would be conservative here. I'm not even sure 5s is going to be enough for S3 uploads.

Copy link
Contributor

@pselle pselle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed a bit on a call -- let's keep this at its current level and not broken out -- we can always break out in a future version, while doing that now would be more difficult to walk back from.

@kolanos kolanos merged commit 3dce171 into iopipe:master Oct 18, 2018
@kolanos kolanos deleted the issue/266 branch October 18, 2018 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants