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

Support compressed configuration [RHELDST-25461] #586

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

rohanpm
Copy link
Member

@rohanpm rohanpm commented Jul 29, 2024

Config has formerly always been stored as a String attribute on DynamoDB items. Let's support also loading it as a gzip-compressed Binary attribute.

The motivation is to allow more room for the config to grow. The max DynamoDB item size is 400KB, and a realistic string-based config has already reached 70KB (about 18% of the limit). As the config is only ever expected to grow over time, we may eventually hit that limit without warning; this discourages us from adding more fields into the config.

The same config compressed uses about ~5KB (about 1% of the limit), which seems small enough that we'll never have to worry about hitting the limit and we can freely add new fields into the config.

This change should be fully deployed to all exodus-cdn environments before deploying the corresponding change to exodus-gw.

Config has formerly always been stored as a String attribute on DynamoDB
items. Let's support also loading it as a gzip-compressed Binary
attribute.

The motivation is to allow more room for the config to grow.
The max DynamoDB item size is 400KB, and a realistic string-based config
has already reached 70KB (about 18% of the limit). As the config is only
ever expected to grow over time, we may eventually hit that limit without
warning; this discourages us from adding more fields into the config.

The same config compressed uses about ~5KB (about 1% of the limit), which
seems small enough that we'll never have to worry about hitting the
limit and we can freely add new fields into the config.

This change should be fully deployed to all exodus-cdn environments
before deploying the corresponding change to exodus-gw.
@rohanpm rohanpm marked this pull request as ready for review July 29, 2024 03:23
rohanpm added a commit to rohanpm/exodus-gw that referenced this pull request Jul 29, 2024
Start writing the configuration in compressed binary form.

For more info on the motivation, see the corresponding change in
exodus-lambda:
release-engineering/exodus-lambda#586
@rohanpm rohanpm merged commit f9ee704 into release-engineering:master Jul 29, 2024
2 checks passed
rohanpm added a commit to rohanpm/exodus-gw that referenced this pull request Jul 29, 2024
Start writing the configuration in compressed binary form.

For more info on the motivation, see the corresponding change in
exodus-lambda:
release-engineering/exodus-lambda#586

Regarding the test updates in this commit, the existing fixture used to
mock the DynamoDB query for config was parametrized so that existing
tests would cover both binary and non-binary config cases. However,
since that was previously a global autouse fixture, that would have
caused every test to run twice even if the test did not deal with the
config at all.

To avoid this, fixtures were split into a global autouse boto session
fixture (ensuring all tests still avoid any real AWS calls) and a
non-autouse fixture for the DynamoDB client. The new fixture had to be
explicitly added to certain tests.
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