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

Fix/try redict #569

Merged
merged 5 commits into from
May 2, 2024
Merged

Fix/try redict #569

merged 5 commits into from
May 2, 2024

Conversation

mfocko
Copy link
Member

@mfocko mfocko commented Apr 24, 2024

No description provided.

mfocko added 2 commits April 24, 2024 15:15
Multiple options available:
- KeyDB (multithreaded open-source fork maintained by Snapchat)
- Valkey (fork keeping the former BSD license)
- Redict (fork switching to LGPL license)

For now switch to the Redict as our needs seem to be satisfied:
- they have a wide variety of containers (scratch, alpine, debian)
- as it has been tested (on prod), it works smooth as a drop-in
  replacement
- it is also present in the Fedora and EPEL repos

As for the switch itself:
- introduce new Kubernetes definition for Redict deployment
- introduce new variables ‹with_redis› and ‹with_redict› to allow
  customizable deployment, in case we decide to revert, or switch
- introduce ‹redis_hostname› that is deduced from the ‹with_*›
  variables; also »FAIL« for neither of them being set

Fixes packit#561

Signed-off-by: Matej Focko <[email protected]>
@mfocko mfocko self-assigned this Apr 24, 2024
Copy link
Contributor

@mfocko mfocko linked an issue Apr 29, 2024 that may be closed by this pull request
7 tasks
Copy link
Member

@lbarcziova lbarcziova left a comment

Choose a reason for hiding this comment

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

nice!

Copy link
Member

Choose a reason for hiding this comment

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

thanks for writing this down!

We have tested a seamless migration from Redis to Redict on our production
deployment. To reproduce:

1. We have deployed Redict to our production cluster.
Copy link
Member

Choose a reason for hiding this comment

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

maybe worth adding a command how was this done (make deploy redict?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Now that you mention it, I forgot the check for deploying both at the same time :D

As it has been discovered¹, Redict hit some stability issues.

The only common culprit appears to be spike in the memory usage,
therefore raise the requested memory 2× and limit for the memory 4×.

Details of the first occurrence from the issue for migrating from
Redis to open-source alternative:
- Smallish issue has been hit on the Thursday afternoon, first-response and fix by @nforro; appears to be caused by network flakes
  - _Redict logs_: Redis requested multiple times resync, failed on timeout and _Connection reset_; cause of restarts is unknown
  - _Sentry events_: related to the Redis sync and also failed connections to the Redict
  - @mfocko scaled down Redis on Monday as it doesn't appear we're hitting any blockers and will need to quick swap

¹ on at least 2 occasions

Signed-off-by: Matej Focko <[email protected]>
Copy link
Member

@majamassarini majamassarini left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

mfocko added 2 commits May 2, 2024 11:52
- Create a dummy hostname for the purpose of nice debugging message
- Improve the assertion to check for »exactly« one of the Redis, or
  Redict to be deployed
- For success print the hostname that will be used.
  For fail print warning and hint what to change.

Signed-off-by: Matej Focko <[email protected]>
@mfocko mfocko merged commit 136dd47 into packit:main May 2, 2024
2 of 3 checks passed
@mfocko mfocko deleted the fix/try-redict branch May 2, 2024 10:03
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.

Move away from redis
4 participants