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 retries to the individual streaming of files from zoom to s3 #163

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

lbjay
Copy link
Member

@lbjay lbjay commented Jul 15, 2024

  • added tenacity (retry library) to function requirements
  • failed files will be retried up to 5 times with a 2m wait in between

@lbjay lbjay requested a review from rute-santos July 15, 2024 17:21
Copy link
Contributor

@rute-santos rute-santos left a comment

Choose a reason for hiding this comment

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

Looks good.

@karendolan
Copy link
Member

Hi @lbjay I saw a few recommendations for preventing chunk transfer latency timeouts by adding the "tcp_keepalive=True" to the boto3 client. The default is false. I added notes on the ZIP-93 ticket. In summary:

Consider changing
s3 = boto3.client("s3")
to
s3 = boto3.client("s3", config=Config(tcp_keepalive=True))
In https://github.com/harvard-dce/zoom-recording-ingester/blob/main/functions/zoom-downloader.py#L51

That param is available in the version of boto3 used in this repo (1.26.142) https://github.com/boto/boto3/blob/1.26.142/docs/source/guide/configuration.rst#tcp_keepalive

Here is an example of ensuing the param is supported https://github.com/brightbock/cloudwatch-logs-tag/blob/main/src/lambda.py#L192-L201

@lbjay lbjay force-pushed the f/ZIP-92-retry-file-downloading branch from 4095166 to f65d453 Compare August 1, 2024 15:24
- added tenacity (retry library) to function requirements
- failed files will be retried up to 5 times with a 2m wait in between

set `tcp_keepalive=True` for the boto3 s3 client

this seems like a smart thing to do anyway, even though the connection
issues that are motivating the retries are on the zoom side.

See: https://www.miketheman.net/2022/10/04/reduce-aws-lambda-latencies-with-keep-alive-in-python/
@lbjay lbjay force-pushed the f/ZIP-92-retry-file-downloading branch from f65d453 to 8b8d04b Compare August 2, 2024 16:02
@lbjay lbjay merged commit 8b8d04b into main Aug 2, 2024
4 checks passed
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.

3 participants