openresty / openresty/lua-nginx-module

about udp socket performance

Open
#1,593 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
11.8k
Forks
2.1k
Avg merge
6h 1m
Merged PRs (30d)
6

Description

hi

My problem with connected:setpeername('*')/unconnected:setpeername(address, port)

Note: Since the address of the peer does not have to be passed to and from the OS, the use of connected UDP objects is recommended when the same peer is used for several transmissions and can result in up to 30% performance gains.

How do you achieve this 30% performance improvement? Can udp reuse fd? We found that once the user request introduces the udp log service, the performance degradation is more serious.

How can this situation be optimized to solve performance problems? thank you!

thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by reviewing the connected and unconnected UDP setpeername behavior and how UDP file descriptors are reused, then measure the effect of adding the UDP log service. Done requires identifying the source of the reported performance degradation and documenting or validating an optimization.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, lua
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.