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 for HAProxy socket sender? #44

Open
mecampbellsoup opened this issue Dec 29, 2021 · 4 comments
Open

Support for HAProxy socket sender? #44

mecampbellsoup opened this issue Dec 29, 2021 · 4 comments

Comments

@mecampbellsoup
Copy link

I see you guys implemented native support for OpenResty NGINX socket types as well as luasocket:

https://github.com/cloudflare/raven-lua/blob/master/raven/senders/

We use Lua in HAProxy which has its own Socket class implementation (compatible with the Lua Socket class) due to the non-blocking nature of HAProxy:

https://www.arpalert.org/src/haproxy-lua-api/2.3/index.html#socket-class

Would you consider a PR that adds a sender for this type of socket as well? Otherwise we cannot use this library as it will block our Lua scripts' operations.

@mecampbellsoup
Copy link
Author

There is an HTTP library that is built to leverage HAProxy's non-blocking runtime we could use: https://github.com/haproxytech/haproxy-lua-http

@mecampbellsoup
Copy link
Author

Hi @jdesgats, @nevmerzhitsky, could you guys weigh in here? I'd be happy to open a PR just want to make sure this project is actively maintained!

@nevmerzhitsky
Copy link
Contributor

Hi @jdesgats, @nevmerzhitsky, could you guys weigh in here? I'd be happy to open a PR just want to make sure this project is actively maintained!

Seems a good idea to add, imho.

@mecampbellsoup
Copy link
Author

For another dependency, pgmoon, we ended up hacking into package.loaded to modify the runtime socket library to use HAProxy's Lua API:

-- Monkeypatch socket package class to core for runtime (non-blocking) connections only
    if pg_settings["socket_type"] == nil then
        package.loaded["socket"] = core
    end

Might be easier to do something like this as well.

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