Skip to content

Lettuce uses experimental io_uring transport if it is present on the classpath #3222

@gmethvin

Description

@gmethvin

Bug Report

Lettuce automatically uses the Netty incubator io_uring transport if it is available on the classpath, even though this support is considered experimental. This is a problem as this transport has a bug causing high iowait CPU usage, which results in application timeouts and other issues. If the support is considered experimental—as it should be given this bug—there should be some explicit configuration required in order to use this transport.

Current Behavior

See netty/netty-incubator-transport-io_uring#247

Input Code

No code is required because Lettuce automatically uses the transport if it is added explicitly or pulled in by another library.

Expected behavior/code

Lettuce should default to the epoll transport on Linux, which is production-ready and does not have the above-mentioned bug.

Environment

  • Lettuce version(s): since 6.1.0.M1
  • Redis version: N/A

Possible Solution

Change the default for the io.lettuce.core.iouring system property to false.

Additional context

In our case, the transport was pulled in by the zio-http library. This library includes the io_uring transport on the classpath but requires explicit configuration to use it, defaulting to epoll. Arguably zio-http should not include this dependency by default, and we have opened an issue there as well, but still I think Lettuce is at fault for using an experimental transport simply because it is available on the classpath.

I'm aware that it's common practice among Netty libraries to detect which transports are available and automatically choose the "best" one, but I'm not aware of any other popular library that defaults to io_uring.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions