-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
mobile: allow overriding dns cache key value save interval #25325
mobile: allow overriding dns cache key value save interval #25325
Conversation
In Lyft's usage, we have up to 14 calls per second to save DNS results to the key value store. Buffering these to save at most once per second should be sufficient. Signed-off-by: JP Simard <jp@jpsim.com>
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.
LGTM, though Chrome's analogous timer is 60s[1] so we could probably use a larger value if we wanted to limit IO.
Oops, marked as ready to review too quickly, tests are failing. I'll update that. I'll expose a builder parameter to set the interval since different apps might want different values. For us, 1s is fine and 60s would be too long, since storing the results in a sqlite db should be very efficient with our kinds of data, and we have app sessions shorter than 60s. |
@RyanTheOptimist are we using the DNS cache yet for YT? If not I'd be inclined to suggest we switch the time interval now, and TODO the builder change for 2 weeks just because there's a lot of builder changes in flight |
Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: JP Simard <jp@jpsim.com>
This reverts commit 43ff04c. I pushed this to the wrong branch by accident. Signed-off-by: JP Simard <jp@jpsim.com>
I've wired this through all the builder paths to keep things in sync as much as possible and minimize thrash with the proto builder changes. |
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.
Looks great! Should we have a test for the C++ builder too?
Yes, I'll add that. |
and fix type from `bool` to `int`. Signed-off-by: JP Simard <jp@jpsim.com>
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.
Thanks for doing this!
Signed-off-by: JP Simard <jp@jpsim.com>
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.
Woo hoo!
In Lyft's usage, we have up to 14 calls per second to save DNS results to the key value store. Buffering these to save at most once per second should be sufficient.
Commit Message: mobile: set dns cache key value save interval to 1s
Additional Description: In Lyft's usage, we have up to 14 calls per second to save DNS results to the key value store. Buffering these to save at most once per second should be sufficient.
Risk Level: Low
Testing: In Lyft's apps
Docs Changes: Added
Release Notes: Added
Platform Specific Features: N/A