twemproxy icon indicating copy to clipboard operation
twemproxy copied to clipboard

Add a way to choose event backend - On newer SmartOS Twemproxy chooses epoll instead of event ports

Open kigster opened this issue 7 years ago • 3 comments

Looks like SmartOS now implements epoll, as well as their native event ports.

Build system prefers epoll when both are available, but it would be better if it chose native event ports. We are currently experiencing random sporadic lockups of twemproxy built with epoll support. Currently testing the event ports version.

Thanks!

kigster avatar Apr 04 '17 06:04 kigster

I was able to manually disable two #defines using the following sed expressions:

After ./configure....:

sed -i 's/^#define HAVE_EPOLL 1/\/\/#define HAVE_EPOLL 1/g;
        s/^#define HAVE_SYS_EPOLL_H 1/\/\/#define HAVE_SYS_EPOLL_H 1/g' \
        config.h

Does anyone know a more elegant way of forcing these two settings out of config.h?

kigster avatar Apr 08 '17 01:04 kigster

Does anyone know a more elegant way of forcing these two settings out of config.h?

It would probably require changes to the configure scripts to add new options, similar to the --enable-debug options that already exist.

It's possible it could be unrelated to the polling backend - 0.5.0 will have fixes for processing redis error responses without spaces, nested multibulk responses(arrays of arrays), and fixes for memory corruption when all hosts are ejected with auto_eject_hosts: true.

What do you mean by lockups? E.g. completely unresponsive?

TysonAndre avatar Jul 02 '21 00:07 TysonAndre

It's not clear if this is still needed. With Joyent now part of Samsung, any development for SmartOS offers questionable value. It's unfortunate, but is the reality.

If I am mistaken, I'd love to stand corrected.

kigster avatar Jul 04 '21 01:07 kigster