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

PLT-541: make redis client singleton #2715

Merged
merged 2 commits into from
Jan 8, 2024
Merged

PLT-541: make redis client singleton #2715

merged 2 commits into from
Jan 8, 2024

Conversation

n5nk
Copy link

@n5nk n5nk commented Jan 4, 2024

Change description

Problem:

  • Default pool was having huge connection pool size.
  • Redisclient was not singleton in Janusgraph

Analysis:

  • The idle connections were huge, as default values were 64 per connection.
  • 3 nodes X 64 X 2 pods X 2 connections (metastore and JG) = ~800 were out there. Plus missing of a singleton class for the client was doubling the connection if Redis is restarted, since new connections were established.

Changes:

  • Janusgraph:
    - Made redis client creation to be singleton, and also controlled the connection pool size.
    - PR: atlanhq/atlan-janusgraph@9d45e3e
  • Per connection and Per node:
    • Max connection pool configured: 20
    • Idle connections: 10

Graph after changes deployed in beta

Screenshot 2024-01-04 at 1 34 18 PM

Type of change

  • Bug fix (fixes an issue)
  • New feature (adds functionality)

Related issues

Fix #1

Checklists

Development

  • Lint rules pass locally
  • Application changes have been tested thoroughly
  • Automated tests covering modified code pass

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

Code review

  • Pull request has a descriptive title and context useful to a reviewer. Screenshots or screencasts are attached as necessary
  • "Ready for review" label attached and reviewers assigned
  • Changes have been reviewed by at least one other contributor
  • Pull request linked to task tracker where applicable

checkaayush
checkaayush previously approved these changes Jan 4, 2024
Copy link
Collaborator

@checkaayush checkaayush left a comment

Choose a reason for hiding this comment

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

LGTM

@n5nk n5nk merged commit dc2b289 into master Jan 8, 2024
4 checks passed
@checkaayush checkaayush deleted the redisleak branch April 23, 2024 10:06
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.

2 participants