1
0
mirror of https://git.kore.io/kore.git synced 2024-11-06 02:21:58 +01:00
kore/docs/scaling
2013-10-14 15:03:58 +02:00

53 lines
1.6 KiB
Plaintext

Scaling in Kore:
- Badass mode
- Minion mode
Badass mode:
- Receives connections from browsers
- Selects available remote minion worker
- Ties connection to worker and acts as a proxy in between
- Persistent connections between minion worker processes
- Pushes module and configuration changes to minions
Starting Kore in badass mode, badass workers get <port>+<worker nr>:
# ./kore -b 127.0.0.1:3350 -c /etc/kore.conf
Minion mode:
- ZERO configuration, minions get all required stuff from badass
- Each worker connects to the main badass port announcing itself
- Receives module
- Receives page handlers
- Receives ports for all badass workers
- Connects to each worker, announcing itself
- Receives all HTTP requests, parses and handles them
- Responses go back to badass
- kore_log() and access_log() go to badass (one log location)
In badass mode, minions no longer need:
- any configuration options.
- CPU detection should happen via CLI or automatic
Start a Kore process as a minion (and fetch everything from badass
running on 127.0.0.1).
# ./kore -m 127.0.0.1:3350 (-c 8 cpu count)
Protocol between badass/minions:
- Must be stream based (multiple different requests per single conn)
- Badass assigns unique streamID per new external connection
- The streamID is sent before each packet
- Type is added as well:
- 1 HTTP
- 2 SPDY
- 3 LOG
- 4 ALOG
- 5 MODUPDATE
- 6 CONFIG
- 7 PING
- 8 FIN
- Badass probably wants to buffer packets before sending them
to the minion
- Responses coming from minions are terminated by sending FIN.
(at which point badass will start responding to client)