-
Notifications
You must be signed in to change notification settings - Fork 20
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 a configuration for lambda #708
Conversation
static v1( | ||
loggerFactory: MomentoLoggerFactory = defaultLoggerFactory | ||
): CacheConfiguration { | ||
const deadlineMillis = 1100; |
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 copied the InRegionDefault here. Should we use this timeout or the low latency timeout?
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.
definitely not LowLatency. If we were going to change it from InRegion.Default
I think it would be to increase it, not decrease it, but my gut is to go with the same value we use for InRegion.Default
.
@eaddingtonwhite lmk if you have any super strong opinions here.
04eb3b5
to
2b1c63a
Compare
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.
minor nits but looking very good, thanks for knocking this out!
static v1( | ||
loggerFactory: MomentoLoggerFactory = defaultLoggerFactory | ||
): CacheConfiguration { | ||
const deadlineMillis = 1100; |
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.
definitely not LowLatency. If we were going to change it from InRegion.Default
I think it would be to increase it, not decrease it, but my gut is to go with the same value we use for InRegion.Default
.
@eaddingtonwhite lmk if you have any super strong opinions here.
packages/client-sdk-nodejs/src/config/transport/grpc-configuration.ts
Outdated
Show resolved
Hide resolved
packages/client-sdk-nodejs/test/unit/config/transport/transport-strategy.test.ts
Outdated
Show resolved
Hide resolved
Make the number of data clients a cache client creates configurable. 6 is likely too many for lambdas as the extra latency for the first 6 calls isn't worth it in a short-lived environment. Create a new configuration, InRegion.Lambda, for use inside lambdas. It only creates 1 data client instead of 6.
2b1c63a
to
ab2c0dd
Compare
Make the number of data clients a cache client creates configurable. 6 is likely too many for lambdas as the extra latency for the first 6 calls isn't worth it in a short-lived environment.
Create a new configuration, InRegion.Lambda, for use inside lambdas. It only creates 1 data client instead of 6.