kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit b75ac15e5063b49878567f602d1fbe7da57fc4d1
parent 9426906225cdcd07337f85f4af6cafe38ebccf25
Author: Joris Vink <joris@coders.se>
Date:   Mon, 14 Oct 2013 15:03:58 +0200

add scaling documentation

Diffstat:
docs/scaling | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+), 0 deletions(-)

diff --git a/docs/scaling b/docs/scaling @@ -0,0 +1,52 @@ +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)