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

Load balancing supports configuring write_function_list and read_only_function_list #893

Open
cobolbaby opened this issue Dec 22, 2024 · 0 comments

Comments

@cobolbaby
Copy link

Improved Feature Request Description

Is your feature request related to a problem? Please describe.
I'm frustrated by the lack of fine-grained traffic control when using load balancing with UDFs in my database setup. Specifically, there's no way to differentiate between read-only and write operations for user-defined functions (UDFs) when distributing traffic across database nodes. This limitation makes it challenging to optimize performance and avoid unnecessary conflicts, particularly in scenarios where read and write operations need to be handled by different nodes. Tools like pgpool provide this functionality, and it would be valuable to have similar capabilities.

Describe the solution you'd like
I would like the load balancer to support the configuration of write_function_list and read_only_function_list. These configurations should allow specifying which UDFs are considered write-intensive or read-only, enabling the load balancer to intelligently route traffic. This feature would help achieve more effective traffic splitting and improve overall system performance and reliability.

Describe alternatives you've considered
An alternative could involve implementing custom middleware to handle traffic splitting at the application level. However, this approach introduces additional complexity and maintenance overhead. Another option might be to modify the application code to explicitly specify UDF behavior, but this reduces flexibility and increases the risk of errors.

Additional context
This feature is inspired by the functionality provided by tools like pgpool, which allow traffic splitting based on UDF operation types.

https://github.com/cobolbaby/dockerize-and-ansible/blob/master/pgpool/build/config/confd/templates/pgpool.default.tmpl#L230-L257

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

1 participant