Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

removing idle clients #1546

Unanswered
nmmmnu asked this question in Q&A
Mar 7, 2026 · 1 comments · 3 replies
Discussion options

I am researching liburing, but I have problem with following concept.

Let suppose we have HTTP server with keep-alive enabled for 5 minutes.

This means if a client connects, it can stay connected for 5 minutes without sending any data.

How this can be done? If we used epoll, we can just close the client FD and then epoll_ctl(EPOLL_CTL_DEL).

However after asking some AI, I understood that even the FD is closed, there still may be pending data (read / write etc) for the FD we just closed. When we receive it, it may point to memory which is free-ed or reused for different client.

What is the correct way to do this?

You must be logged in to vote

Replies: 1 comment 3 replies

Comment options

Just issue a cancel for the request?

You must be logged in to vote
3 replies
Comment options

is it guaranteed to work OK? what if in the same exact moment some data come in?

Comment options

axboe Mar 7, 2026
Maintainer

You'll get a CQE either way, either sayings it's canceled or with the data received.

Comment options

last question
if I use
io_uring_prep_link_timeout,
how scalable it is? what if I have 10,000 connected clients?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /