Commit Graph

12 Commits

Author SHA1 Message Date
Nigel Deakin
1fb9c48867 Add README for hotfunctions go example and update docs to point to it 2017-09-29 12:12:16 +01:00
Nigel Deakin
82d0bcf34a Add README for hotfunctions go example and update docs to point to it 2017-09-29 12:10:53 +01:00
Nigel Deakin
16cdd98a62 Add README for hotfunctions go example and update docs to point to it 2017-09-29 12:01:29 +01:00
Reed Allman
4839edc12b add default to idle_timeout in hot fn docs (#309)
it's a bit funny that in hot / not functions idle_timeout appears but it's not such a big deal, either
2017-09-08 09:58:42 -07:00
Reed Allman
9edacae928 clean up hotf(x) concurrency, rm max c
this patch gets rid of max concurrency for functions altogether, as discussed,
since it will be challenging to support across functions nodes. as a result of
doing so, the previous version of functions would fall over when offered 1000
functions, so there was some work needed in order to push this through.
further work is necessary as docker basically falls over when trying to start
enough containers at the same time, and with this patch essentially every
function can scale infinitely. it seems like we could add some kind of
adaptive restrictions based on task run length and configured wait time so
that fast running functions will line up to run in a hot container instead of
them all creating new hot containers.

this patch takes a first cut at whacking out some of the insanity that was the
previous concurrency model, which was problematic in that it limited
concurrency significantly across all functions since every task went through
the same unbuffered channel, which could create blocking issues for all
functions if the channel is not picked off fast enough (it's not apparent that
this was impossible in the previous implementation). in any event, each
request has a goroutine already, there's no reason not to use it. not too hard
to wrap a map in a lock, not sure what the benefits were (added insanity?) in effect
this is marginally easier to understand and less insane (marginally). after
getting rid of max c this adds a blocking mechanism for the first invocation
of any function so that all other hot functions will wait on the first one to
finish to avoid a herd issue (was making docker die...) -- this could be
slightly improved, but works in a pinch. reduced some memory usage by having
redundant maps of htfnsvr's and task.Requests (by a factor of 2!). cleaned up
some of the protocol stuff, need to clean this up further. anyway, it's a
first cut. have another patch that rewrites all of it but was getting into
rabbit hole territory, would be happy to oblige if anybody else has problems
understanding this rat's nest of channels. there is a good bit of work left to
make this prod ready (regardless of removing max c).

a warning that this will break the db schemas, didn't put the effort in to add
migration stuff since this isn't deployed anywhere in prod...

TODO need to clean out the htfnmgr bucket with LRU
TODO need to clean up runner interface
TODO need to unify the task running paths across protocols
TODO need to move the ram checking stuff into worker for noted reasons
TODO need better elasticity of hot f(x) containers
2017-06-05 20:04:13 -07:00
Chad Arimura
75356d1936 slight update to hot functions docs 2017-05-26 21:59:19 -07:00
Travis Reeder
9cc12b4b12 Remove iron... 2017-05-18 18:59:34 +00:00
Travis Reeder
4b9bba352d Rename location. 2017-05-15 11:00:15 -07:00
Travis Reeder
615ae5c36f Mass s&r: iron-io -> kumokit 2017-04-19 09:49:12 -06:00
Denis Makogon
7603e6e8fa Add idle_timeout to routes API (#603)
* Add inactivity_timeout to routes API

Closes: #544

* Fix failing datastore tests

* Rename inactivity_timeout to idle_timeout

* Update swagger doc

* Update hot fn doc

* Fix json tags

* Add function timeouts docs

* Rewording
2017-03-25 18:28:53 +01:00
Lingxian Kong
73d4f1e180 Fix hot function example link (#469) 2017-01-02 08:01:44 +00:00
C Cirello
2f0520521c all: rename hot containers to hot functions (#465) 2016-12-29 20:07:41 +01:00