1
0
mirror of https://git.kore.io/kore.git synced 2024-11-11 04:39:00 +01:00
Commit Graph

444 Commits

Author SHA1 Message Date
Joris Vink
a2392e645f use kore_mem_free() in example module 2013-07-01 11:52:45 +02:00
Joris Vink
51a9e4db9d Implement SPDY WINDOW_UPDATE and SETTINGS. 2013-07-01 11:30:18 +02:00
Joris Vink
6fa881e224 SSL_set_accept_state() when a new SSL * is created 2013-06-27 12:37:42 +02:00
Joris Vink
108a0cbc81 remove unneeded blocks of code 2013-06-27 12:37:27 +02:00
Joris Vink
3c6169a861 bring bsd into sync 2013-06-27 12:37:14 +02:00
Joris Vink
a1342c93d5 remove memid from meminfo 2013-06-27 12:27:17 +02:00
Joris Vink
f18a6388fd fix kore_realloc() to actually behave properly 2013-06-27 09:20:48 +02:00
Joris Vink
4b2420097b - Better spread load between all worker processes.
- Introduce own memory management system on top of malloc to keep track
  of all our allocations and free's. Later we should introduce a pooling
  mechanism for fixed size allocations (http_request comes to mind).
- Introduce ssl_cipher in configuration.

Memory usage is kind of high right now, but it seems its OpenSSL
doing it rather then Kore.
2013-06-27 08:46:18 +02:00
Joris Vink
7828bd0cfc add ssl_cipher 2013-06-27 08:46:01 +02:00
Joris Vink
b4a0330a96 - Better spread load between all worker processes.
- Introduce own memory management system on top of malloc to keep track
  of all our allocations and free's. Later we should introduce a pooling
  mechanism for fixed size allocations (http_request comes to mind).
- Introduce ssl_cipher in configuration.

Memory usage is kind of high right now, but it seems its OpenSSL
doing it rather then Kore.
2013-06-27 08:43:07 +02:00
Joris Vink
1582528ba5 Merge remote-tracking branch 'origin/master' 2013-06-27 00:32:16 +02:00
Joris Vink
2fc5233358 Rework the way worker processes give each other the accept lock.
Instead of waiting until one worker is filled up on connections
the workers find the next lowest loaded worker and will hand
over the lock to them instead. This will cause a nicer spread of load.

Instead of running one accept per event loop, we attempt to accept
as many as worker_max_connections allows.

Refactor net sending/recv code a bit.
2013-06-27 00:22:48 +02:00
Joris Vink
1412449fe7 skip certain files when building 2013-06-26 19:15:49 +02:00
Joris Vink
f707749cf4 no longer hold static openssl libs in the repo. 2013-06-26 19:05:54 +02:00
Joris Vink
124f3ecad9 no need to use kore_log() in a debug context 2013-06-26 15:59:42 +02:00
Joris Vink
113dbaba53 reset worker_max_connections back to default 2013-06-26 15:58:09 +02:00
Joris Vink
bf1940225a everybody loves to tout their own horn.. so introduce a server response header 2013-06-26 16:58:01 +02:00
Joris Vink
7a2e855d28 set tstamp to 0 in the correct location 2013-06-26 16:57:34 +02:00
Joris Vink
0dda6f996f Add a form of synchronization between what worker will be accepting
new connections and which ones will not be notified for it.

Fixes the thundering herd problem, and nicely spreads out load between
all the workers equally. A configuration option (workers_max_connections)
is available to tweak how many connections a worker will have before
giving up the accept lock.

Two ways are added to this commit for access locking:
- Locking via semaphores.
- Locking via GCC's builtin atomic methods.

The default is running with semaphores disabled (OpenBSD cannot do
sem_init() with pshared set to 1, which is required).

If you want to use semaphores add KORE_USE_SEMAPHORES to CFLAGS,
and -lpthread to LDFLAGS in the Makefile.

Other fixes:
- BSD: add a timeout to kevent().
- Merge kore_worker_wait together, linux knows waitpid() as well.
- Send the correct SIGQUIT signal to workers instead of SIGINT.
- Fix kore_time_ms().
- Log fatal worker messages in syslog.
- Refactor code even more.
- Do not free our own kore_worker structure.
2013-06-26 16:37:22 +02:00
Joris Vink
315f964abd correct typo 2013-06-26 11:20:25 +02:00
Joris Vink
3e5c17b8a3 refactor code quite a bit. 2013-06-26 11:18:32 +02:00
Joris Vink
cff44cd5f3 fix some broken things in the build script. 2013-06-25 08:26:06 +02:00
Joris Vink
d2c4fde7fe fix so we can properly add binary media 2013-06-24 18:29:40 +02:00
Joris Vink
f48fe0a326 remove unused 2013-06-24 18:23:29 +02:00
Joris Vink
ae5da79f61 new build script for modules, which should be used as a base for
all new modules written by others.
2013-06-24 18:22:35 +02:00
Joris Vink
c9f5bb82c9 i can't spell 2013-06-24 12:06:56 +02:00
Joris Vink
e50ec64710 properly mention what license kore is 2013-06-24 12:05:22 +02:00
Joris Vink
427f65bb3d sync README 2013-06-24 11:53:33 +02:00
Joris Vink
6026a6d4ee add SNI support, and change domain configuration a bit. 2013-06-24 11:32:45 +02:00
Joris Vink
a1b400c400 Add access logging to Kore. 2013-06-24 09:36:40 +02:00
Joris Vink
4dff38ebb0 ignore sigpipe in workers 2013-06-19 22:41:00 +02:00
Joris Vink
c22eebb6d9 for non spdy clients, attempt to keep the connection open as long as possible (aka, send connection: keep-alive and do not close it till client does). 2013-06-22 20:14:10 +02:00
Joris Vink
9a9faa0d87 switching to github as master repo 2013-06-21 00:14:20 +02:00
Joris Vink
aca6f75ff3 update readme 2013-06-21 00:07:35 +02:00
Joris Vink
8b832f0a37 fix off-by-one 2013-06-20 23:30:03 +02:00
Joris Vink
c49622e4ae do not schedule kqueue events if we've reached the limit of changelist. 2013-06-20 23:29:26 +02:00
Joris Vink
25f1ab9865 Add BSD kqueue(2) support. Compile with make bsd (or make linux for linux) 2013-06-17 23:39:17 +02:00
Joris Vink
98de763632 s/light/kore 2013-06-17 23:54:59 +02:00
Joris Vink
af3e57344b comment out non required lines 2013-06-15 16:16:51 +02:00
Joris Vink
920c2ad8b9 add link to maste repo 2013-06-05 16:57:24 +02:00
Joris Vink
6181cd7c8c even better 2013-06-05 16:42:39 +02:00
Joris Vink
463ea9c6f9 update README for github and split it up into docs/ 2013-06-05 16:41:42 +02:00
Joris Vink
ead8af3b81 add TODO 2013-06-05 14:30:06 +02:00
Joris Vink
61605a99c4 update README 2013-06-05 14:10:29 +02:00
Joris Vink
e170e916ce Reload the module in the main process as well when SIGHUP is received.
Otherwise new worker processes will not receive the updated module.
2013-06-05 13:50:50 +02:00
Joris Vink
b4deea82b4 add kore_buf_appendb() which allows us to append a kore_buf to another one.
(releases the kore_buf that is being appended while at it).
2013-06-05 11:27:03 +02:00
Joris Vink
a74fffe40c Introduce certfile and certkey in the configuration to specify where the certificate file and keys are located on a system.
Free unused vars in the main process after starting.
2013-06-05 09:47:08 +02:00
Joris Vink
32a2035ce9 move kore_server_sslstart() into main process, workers will inherit. 2013-06-05 09:32:53 +02:00
Joris Vink
72e09424af ergg spelling. 2013-06-05 09:30:04 +02:00
Joris Vink
36bf2d34c6 better example configuration. 2013-06-05 09:29:06 +02:00