Skip to content

feat: added timeout for keep alive connections#67

Open
lev2p1 wants to merge 1 commit into
masterfrom
feat/30-keep-alive-timeout
Open

feat: added timeout for keep alive connections#67
lev2p1 wants to merge 1 commit into
masterfrom
feat/30-keep-alive-timeout

Conversation

@lev2p1

@lev2p1 lev2p1 commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Pull Request

Related Issues:

Type of Change:

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Performance
  • Refactoring
  • Tests

Description:
Added a timeout for keep-alive connections. Testing and feedback on these new features are required.

Testing:
The code compiles and the connection is terminated correctly.

Checklist:

  • Code compiles
  • Tests pass
  • Documentation updated
  • Changelog updated
  • No sensitive data exposed

@lev2p1

lev2p1 commented Jun 19, 2026

Copy link
Copy Markdown
Owner Author

@NikSimDev test it

@lev2p1 lev2p1 linked an issue Jun 19, 2026 that may be closed by this pull request

@NikSimDev NikSimDev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The added timeout has a minor impact on performance in normal scenarios, but it can cause problems under high loads.

Problem areas:

  1. A timer is created for each connection, even for short ones
  2. async_wait creates an additional operation in the io_context
  3. At high request rates (~1000+ RPS), the overhead becomes noticeable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problems with keep-alive connection

2 participants