File: architecture.md

package info (click to toggle)
hitch 1.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,016 kB
  • sloc: ansic: 9,362; sh: 1,262; yacc: 586; lex: 137; makefile: 125; ruby: 49
file content (16 lines) | stat: -rw-r--r-- 747 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Hitch architecture

Hitch uses a process-per-core model; a parent process spawns N children who
each `accept()` on a common socket to distribute connected clients among them.

Within each child, asynchronous socket I/O is conducted across the local
connections using `libev` and `OpenSSL`'s nonblocking API. By default,
`hitch` has an overhead of ~200KB per connection--it preallocates
some buffer space for data in flight between frontend and backend.

`hitch` has very few features--it's designed to be paired with an intelligent
backend like Varnish Cache. It maintains a strict 1:1 connection pattern
with this backend handler so that the backend can dictate throttling behavior,
maximum connection behavior, availability of service, etc.