Home / Companies / Harper / Blog / Post Details
Content Deep Dive

Worker Thread-Based HTTP Server

Blog post from Harper

Post Details
Company
Date Published
Author
Kris Zyp
Word Count
2,025
Company Posts That Month
3
Language
English
Hacker News Points
-
Post removed?
No
Summary

Harper 4.1 introduces a shift from using processes to worker threads for handling HTTP requests, enhancing concurrency and resource utilization. This change allows for better traffic control, session affinity, and debuggability, while also supporting alternative storage models. Worker threads, requiring fewer resources than processes, enable efficient use of memory by sharing a central pool for asynchronous tasks, contrasting with the high overhead of maintaining multiple processes. The main thread in Harper listens to a network port and delegates connections to worker threads, which handle HTTP parsing and response tasks, a method particularly efficient on Unix-based systems but less so on Windows. The approach leverages modern CPU capabilities for parallelism and is applicable to various JavaScript HTTP servers, offering improved performance and control over traditional process clustering methods.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.