[ 
https://issues.apache.org/jira/browse/PROTON-2812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17835482#comment-17835482
 ] 

Clifford Jansen commented on PROTON-2812:
-----------------------------------------

A short term mitigation could be to defer the getaddrinfo call for outgoing 
connections to run on a proactor task thread provided by the application.  The 
outgoing connection call will not block in this case.

If there are sufficient task threads compared to the number of number of 
blocked DNS calls during runtime, the performance impact may be greatly reduced.

See the attached mitigate01.txt

> Epoll proactor blocks thread during DNS lookups in getaddrinfo
> --------------------------------------------------------------
>
>                 Key: PROTON-2812
>                 URL: https://issues.apache.org/jira/browse/PROTON-2812
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: proton-c-0.39.0
>            Reporter: Clifford Jansen
>            Assignee: Clifford Jansen
>            Priority: Major
>         Attachments: mitigate01.diff
>
>
> The epoll proactor uses getaddrinfo() to resolve network addresses for 
> inbound and outbound AMQP and raw connections.  These connect and listener 
> calls are thread safe so may be called from any thread and the expectation is 
> that they initiate the action without blocking.
> Solutions could entail:
> 1) using a dedicated DNS thread pool that multiplexes N serialized (blocking) 
> getaddrinfo calls over the pool (e.g. getaddrinfo_a or self managed like 
> libuv)
> 2) use some custom library that scales DNS requests without blocking
> 3) write the simplest custom proactor library that does #2.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to