quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.74k stars 2.67k forks source link

Support native transports in native executables #35799

Open lucaspouzac opened 1 year ago

lucaspouzac commented 1 year ago

Description

As requested in issue 10095, a feature request to track supporting native transport in native executable.

Actually, it's not possible to configure native transport, by example to configure unix socket usage for redis with native build.

quarkus:
  vertx:
    prefer-native-transport: true
  redis:
    hosts: unix://[:password@]/domain/docker.sock[?select=db-number]

Could you implement this ?

Implementation ideas

No response

cescoffier commented 1 year ago

We have been looking into this, but it's tricky. First, you need a specific native transport. This transport depends on your OS. On Linux, there are 2: epoll and io_uring.

I believe that we will prioritize the work on io_uring and thus enable domain sockets when it's used. But it won't work outside of Linux (and recent Linux).

dvallant commented 2 months ago

@cescoffier Is there any progress on this feature or is there any workaround?

cescoffier commented 2 months ago

No,

Outside of io_uring, I'm unsure of the benefits of native transport in native mode. The reason is that you use native transport for concurrency reasons. But in native mode, your concurrency is slightly lower than JVM. Native transports might give a boost, but you would still be under what you achieve in JVM mode. The complexity of supporting native transport in native would not be justified.

With io_uring, it may make some sense. But our io_uring support is still experimental.