-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: add lambda configuration #427
Conversation
Adds a configuration optimized for Lambda environments. This is the same as the `InRegion.LowLatency` config but also eagerly connects the client. This avoids the cold start penalty from before where we established the connection on the first request, leading to first-request timeouts.
/// <returns></returns> | ||
public static IConfiguration Latest(ILoggerFactory? loggerFactory = null) | ||
{ | ||
var config = LowLatency.V1(loggerFactory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think maybe you should go with InRegion.Default
rather than InRegion.LowLatency
. I don't think lambdas are guaranteed to have great networking traits so making the timeout a tiny bit more lenient is probably the way to go.
Sorry for not mentioning sooner.
@eaddingtonwhite can you weigh in on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this to InRegion.Default
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree w/ this. Start more conservative w/ default timeouts we can always make more agressive down line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. In that case b164b6a implements this.
Adds a configuration optimized for Lambda environments. This is the
same as the
InRegion.Default
config but also eagerly connects theclient. This avoids the cold start penalty from before where we
established the connection on the first request, leading to
first-request timeouts.