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

Questions about the acquire of boundAsyncPool #3055

Closed
soafftt opened this issue Nov 19, 2024 · 4 comments
Closed

Questions about the acquire of boundAsyncPool #3055

soafftt opened this issue Nov 19, 2024 · 4 comments

Comments

@soafftt
Copy link

soafftt commented Nov 19, 2024

Project is using boundAsyncPool for Redis Pipeline functionality.

There are two AWS Elasticache Redis Slaves, and we are using DirDnsResolver to disable DnsCache as much as possible.

It seems like a traffic that doesn't require the use of a pool, but I'm using a pipeline because there are many concurrent commands.

There is a phenomenon in which the acqure of boundAsyncPool provides connection in the FIFO, so it is crowded to one of the two Slaves.

Can you give me some advice to solve these issues?

@soafftt soafftt changed the title Questions about the acquisition of boundAsyncPool Questions about the acquire of boundAsyncPool Nov 19, 2024
@tishun tishun added for: team-attention An issue we need to discuss as a team to make progress status: waiting-for-triage labels Nov 22, 2024
@tishun
Copy link
Collaborator

tishun commented Nov 22, 2024

@soafftt , please allow the team some time to get to this question.

@tishun
Copy link
Collaborator

tishun commented Jan 6, 2025

It seems like a traffic that doesn't require the use of a pool, but I'm using a pipeline because there are many concurrent commands.

Concurrency itself is not a good reason to use connection pooling. Typically you would use connection pooling when there are blocking commands (e.g. BLPOP) or you are using transactions.

There is a phenomenon in which the acqure of boundAsyncPool provides connection in the FIFO, so it is crowded to one of the two Slaves.

I assume you want to split the load evenly between the two AWS Elasticache Redis Slaves?

The choice of node is made based on the ReadFrom setting. There is currently no load-balancing mechanism, but you can specify random nodes to be used, see #834.

Does that help?

@tishun tishun added status: waiting-for-feedback We need additional information before we can continue and removed for: team-attention An issue we need to discuss as a team to make progress status: waiting-for-triage labels Jan 6, 2025
@soafftt
Copy link
Author

soafftt commented Jan 13, 2025

In our case, we do not use MasterReplica. because we use each RedisClient to strictly distinguish between Master and Replica when using pipeline.

(only using Master/Replica in cases where pipeline is not used.)

it seems that the distribution of elasticache's reader endpoint is not accurate due to aws dns cache. I will ask AWS about this.

Thanks for the advice.

@soafftt soafftt closed this as completed Jan 13, 2025
@tishun tishun removed the status: waiting-for-feedback We need additional information before we can continue label Jan 13, 2025
@tishun
Copy link
Collaborator

tishun commented Jan 13, 2025

Happy to help. Please keep us posted in case this turns out to be some other problem.

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

No branches or pull requests

2 participants