Commit Graph

515 Commits

Author SHA1 Message Date
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
Denis Makogon
3f065ce6bf [Feature] Function status 2017-06-06 14:12:50 -07:00
Denis Makogon
007f1982fc Hot fn ID 2017-05-31 22:50:31 -07:00
James Jeffrey
c7a5bae587 Merge branch 'chad-gitlab-url-change' into 'master'
Chad gitlab url change

See merge request !28
2017-05-30 11:34:22 -07:00
Travis Reeder
af918fdfe9 Fix run env vars passed in via command line to test locally and updated docs to match. 2017-05-30 10:54:34 -07:00
Denis Makogon
31b4ac4516 Address broken tests 2017-05-30 08:50:53 -07:00
Chad Arimura
49d397293b global url replace 2017-05-29 17:10:47 -07:00
Travis Reeder
37b53a5820 functions: 0.3.7 release [skip ci] 2017-05-27 10:10:21 -07:00
Travis Reeder
d3b713cf16 functions: 0.3.6 release [skip ci] 2017-05-27 10:08:14 -07:00
Travis Reeder
71b66091df functions: 0.3.5 release [skip ci] 2017-05-27 09:47:08 -07:00
Travis Reeder
9ba22989f8 functions: 0.3.4 release [skip ci] 2017-05-27 09:41:11 -07:00
James Jeffrey
ceaf497957 Merge branch 'chad-ux-improvements' into 'master'
Chad ux improvements

See merge request !20
2017-05-27 00:26:00 +00:00
Chad Arimura
1e90fc4459 consts 2017-05-26 17:01:39 -07:00
Travis Reeder
69f0201818 Some small cleanup to docs. 2017-05-26 18:54:26 +00:00
Chad Arimura
8899361545 adding ascii art to server start 2017-05-25 09:39:14 -07:00
Travis Reeder
3276377c3d Fixed dependencies due to moby changes. 2017-05-22 23:55:15 +00:00
Travis Reeder
961d17bdb8 Uses SetDefaults as it does in create too. 2017-05-18 14:18:16 -07:00
Travis Reeder
2696a8a917 Fixed idle timeout bug 2017-05-18 13:24:49 -07:00
Travis Reeder
9cc12b4b12 Remove iron... 2017-05-18 18:59:34 +00:00
Travis Reeder
fedf08964e Deploy will automatically create a route if it doesn't exist. 2017-05-17 15:11:44 -07:00
James
e4bb04887e Rewrite imports to use forks files on gitlab not use githubs. 2017-05-16 11:06:32 -07:00
Travis Reeder
7cfd7d413f Fixed up build and updated dependencies. 2017-05-15 15:40:36 -07:00
Travis Reeder
2b01ae3616 functions: 0.3.2 release [skip ci] 2017-05-15 14:16:30 -07:00
Travis Reeder
aa046ba5fc functions: 0.3.1 release [skip ci] 2017-05-15 14:08:53 -07:00
Travis Reeder
0c6ca08a2f functions: 0.2.62 release [skip ci] 2017-05-15 14:04:01 -07:00
Travis Reeder
ffae780f07 functions: 0.2.60 release [skip ci] 2017-05-15 12:00:43 -07:00
Travis Reeder
4b9bba352d Rename location. 2017-05-15 11:00:15 -07:00
Travis Reeder
d0ca2f9228 Moved runner into this repo, update dep files and now builds. 2017-04-21 07:42:42 -07:00
Travis Reeder
615ae5c36f Mass s&r: iron-io -> kumokit 2017-04-19 09:49:12 -06:00
CircleCI
32278fe2e0 functions: 0.2.59 release [skip ci] 2017-04-12 19:20:05 +00:00
CircleCI
d1ea037ea1 functions: 0.2.58 release [skip ci] 2017-04-07 18:28:29 +00:00
Travis Reeder
10f3178ae9 Switching to new dep tool (#616)
* making things work

* #506 - Add ability to login to a private docker registry

* Rolling back "make things work" to test them out more.

* Rolling back "make things work" to test them out more.

* credentials from docker/config.json if ENV is missing

* should get docker auth info just in the init

* update glide lock

* update glide

* Switched to new go dep tool, glide is too frikin annoying.

* Updated circle builds to use dep

* Added GOPATH/bin to path.

* Added GOPATH/bin to path.

* Using regular make test, instead of docker one (not sure why it was using the docker one?).
2017-04-07 11:22:08 -07:00
CircleCI
883cec599c functions: 0.2.57 release [skip ci] 2017-03-29 04:11:21 +00:00
Pedro Nasser
5e8340bc1c Solving postgres marshal/unmarshal issue (#610)
* Solving postgres marshal/unmarshal issue

Postgres datastore was not marshaling the App config during its insert, that behavior was resulting in issues when fetching the App and the datastore couldn't unmarshal the config.

The same issue was probably happening with the Route's headers in some situations.

This commit's idea is to always try to marshal configs and headers when inserting/updating Apps or Routes. But in Apps and Routes get methods, if the  config/headers unmarshal fails, it returns an empty config/headers.

* fix one more unmarshal case

* returning error when unmarshaling non-empty
2017-03-28 11:30:12 -07:00
Pedro Nasser
5761ce3499 fix: error unmarshal empty app config (#609) 2017-03-27 09:58:03 -07:00
CircleCI
a036563b9f functions: 0.2.56 release [skip ci] 2017-03-25 17:35:52 +00: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
CircleCI
11d3e29304 functions: 0.2.55 release [skip ci] 2017-03-24 17:50:47 +00:00
CircleCI
cc4ff197e0 functions: 0.2.54 release [skip ci] 2017-03-23 19:45:09 +00:00
Travis Reeder
46f4639fac functions: 0.2.53 release [skip ci] 2017-03-23 12:26:57 -07:00
Travis Reeder
bdc175ae09 functions: 0.2.52 release [skip ci] 2017-03-23 12:09:27 -07:00
CircleCI
6b05438575 functions: 0.2.51 release [skip ci] 2017-03-23 18:48:49 +00:00
CircleCI
b57a152241 functions: 0.2.50 release [skip ci] 2017-03-22 22:03:31 +00:00
CircleCI
9c977d9963 functions: 0.2.49 release [skip ci] 2017-03-22 20:47:25 +00:00
CircleCI
0492ca5dfb functions: 0.2.48 release [skip ci] 2017-03-22 18:13:02 +00:00
Pedro Nasser
debc710a89 Add env vars for hotfunctions (#597)
* add env vars for hot functions

* remove fn_hot
2017-03-22 15:05:21 -03:00
CircleCI
96fe4ee109 functions: 0.2.47 release [skip ci] 2017-03-21 23:51:59 +00:00
CircleCI
8592422cf5 functions: 0.2.46 release [skip ci] 2017-03-21 23:41:30 +00:00
CircleCI
200cac1477 functions: 0.2.45 release [skip ci] 2017-03-21 19:06:57 +00:00
Martin Pinto-Bazurco Mendieta
e4b3105d92 Fix #418 Added MySQL as DB storage layer. (#575)
* Fix #418 Added MySQL as DB storage layer.

* Make the mysql stuff work

* Make the mysql stuff work

* Make the mysql stuff work

* Make the mysql stuff work

* small fixes

* Switch to Go 1.8 installation inside CI (#589)

* Switch to Go 1.8 installation inside CI

Partially Addresses: #588

* Use url.Hostname() instead of custom method

* Added PR review changes.

* Added missing check for error.

* Changed * with name, config

* Removed unused import.

* Added check for NoRows

* Merged changes with HEAD

* Added documentation to mysql.go

* update mysql to be on par with postgres
2017-03-21 20:01:17 +01:00