Skip to content

Use thread pool for handling connections #23

@TheHashTableSlasher

Description

@TheHashTableSlasher

From README.md:

That having been said, multi-threading may not be avoided in the future. A technique used by several HTTP servers to tackle the C10k problem (e.g. Nginx, lighttpd) is to have a fixed-size pool of worker threads that each poll a set of client connections dispatched to them by the main thread. (An excellent article on the I/O performance of threads vs poll/select can be found here.) This approach may be used by this code in the future, if such scalability is desired.

Note that multi-threading would greatly increase the complexity of the server, and might actually make it slower due to locks on tables starving certain threads. Still, for maximum performance and scalability it may be worth considering in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    low priorityOther things should be worked on firstoptimizationImprovements to code quality or efficiencyserverRelates to the server code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions