Commit Graph

1156 Commits

Author SHA1 Message Date
Reed Allman
16529159a9 update other gitignore 2017-06-11 02:07:31 -07:00
Reed Allman
94c5b41961 updated gitignore 2017-06-11 02:06:54 -07:00
Reed Allman
f2c7aa5ee6 add functions/vendor files 2017-06-11 02:05:36 -07:00
Reed Allman
6ee9c1fa0a remove dep files, update glide top to ignore fn/ 2017-06-11 02:03:02 -07:00
Reed Allman
398ecc388e move the lb stuff around in lego form
this structure should allow us to keep the consistent hash code and just use
consistent hashing on a subset of nodes, then in order to satisfy the oracle
service stuff in functions-service we can just implement a different "Grouper"
that does vm allocation and whatever other magic we need to manage nodes and
poop out sets of nodes based on tenant id / func.

for the suga... see main.go and proxy.go, the rest is basically renaming /
moving stuff (not easy to follow changes, nature of the beast).

the only 'issues' i can think of is that down in the ch stuff (or Router) we
will need a back channel to tell the 'Grouper' to add a node (i.e. all nodes for
that shard are currently loaded) which isn't great and also the grouper has no
way of knowing that a node in the given set may not be being used anymore.
still thinking about how to couple those two. basically don't want to have to
just copy that consistent hash code but after munging with stuff i'm almost at
'fuck it' level and maybe it's worth it to just copy and hack it up in
functions-service for what we need. we'll also need to have different key
funcs for groupers and routers eventually (grouper wants tenant id, router
needs tenant id + router). anyway, open to any ideas, i haven't come up with
anything great. feedback on interface would be great

after this can plumb the datastore stuff into the allGrouper pretty easily
2017-06-10 15:21:23 -07:00
Reed Allman
8790859532 fix the fn glide 2017-06-10 02:35:26 -07:00
Reed Allman
75c5e83936 adds wait time based scaling across nodes
this works by having every request from the functions server kick back a
FXLB-WAIT header on every request with the wait time for that function to
start. the lb then keeps track on a per node+function basis an ewma of the
last 10 request's wait times (to reduce jitter).  now that we don't have max
concurrency it's actually pretty challenging to get the wait time stuff to
tick. i expect in the near future we will be throttling functions on a given
node in order to induce this, but that is for another day as that code needs a
lot of reworking. i tested this by introducing some arbitrary throttling (not
checked in) and load spreads over nodes correctly (see images). we will also
need to play with the intervals we want to use, as if you have a func with
50ms run time then basically 10 of those will rev up another node (this was
before removing max_c, with max_c=1) but in any event this wires in the basic
plumbing.

* make docs great again. renamed lb dir to fnlb
* added wait time to dashboard
* wires in a ready channel to await the first pull for hot images to count in
the wait time (should be otherwise useful)

future:
TODO rework lb code api to be pluggable + wire in data store
TODO toss out first data point containing pull to not jump onto another node
immediately (maybe this is actually a good thing?)
2017-06-09 16:30:34 -07:00
Reed Allman
8146864b0b Merge branch 'fix-logrus' into 'master'
hack logrus sirupsen name change

See merge request !47
2017-06-09 14:17:23 -07:00
Reed Allman
c23d893da6 Merge branch 'deploy_sh' into 'master'
Deploy sh

See merge request !46
2017-06-09 13:42:59 -07:00
James Jeffrey
79f1dab007 Deploy sh 2017-06-09 13:42:59 -07:00
Reed Allman
aa170c918f Merge branch 'fix-tests' into 'master'
fix up the tests

See merge request !44
2017-06-08 13:09:48 -07:00
Denis Makogon
1c9c30e062 Merge branch 'update-fn-tool' into 'master'
Update fn tool

See merge request !42
2017-06-08 11:46:56 -07:00
Denis Makogon
52137e3b61 Update fn tool 2017-06-08 11:46:56 -07:00
Reed Allman
478245de4c Merge branch 'rm-max-c-2' into 'master'
clean up hotf(x) concurrency, rm max c

See merge request !40
2017-06-07 15:51:07 -07:00
Travis Reeder
b737ce1f05 Merge branch 'fix-cli' into 'master'
need to use >=17.05 (not 17.5), add trimming for weird builds

See merge request !43
2017-06-07 15:48:00 -07:00
Reed Allman
9ed66591c3 need to use >=17.05 (not 17.5), add trimming for weird builds 2017-06-07 15:48:00 -07:00
Reed Allman
c6e4aa1a63 hack logrus sirupsen name change
:'( not sure how to fix dep tool... punting (maybe we should remove it so that
nobody else will try to use it?)

https://github.com/sirupsen/logrus/issues/553#issuecomment-306591437
2017-06-06 16:45:45 -07:00
Denis Makogon
17bbfa0cdf Merge branch 'multi-stage-builds' into 'master'
Moving dep builds into Dockerfile and multi-stage builds.

Closes #36 and #39

See merge request !31
2017-06-06 15:02:08 -07:00
Travis Reeder
f628e39490 Moving dep builds into Dockerfile and multi-stage builds. 2017-06-06 15:02:08 -07:00
Denis Makogon
0276a1c156 Merge branch 'func_status' into 'master'
[Feature] Function status

See merge request !15
2017-06-06 14:12:50 -07:00
Denis Makogon
3f065ce6bf [Feature] Function status 2017-06-06 14:12:50 -07:00
Denis Makogon
6334f44a72 Merge branch 'update-source' into 'master'
Updating source to funcy/functions_go

See merge request !41
2017-06-06 12:41:28 -07:00
Denis Makogon
28e484a370 Updating source to funcy/functions_go 2017-06-06 22:40:48 +03:00
Travis Reeder
ebb0889869 Merge branch 'functionc_go' into 'master'
Update functions_{lang} tool to recent git source

See merge request !38
2017-06-06 10:03:56 -07:00
Denis Makogon
1a2a805740 Update functions_{lang} tool to recent git source 2017-06-06 19:50:33 +03:00
Reed Allman
636af2f7ea fix up the tests 2017-06-06 05:04:22 -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
James Jeffrey
7e02597142 Merge branch 'chad-update-tutorial' into 'master'
adding rust, fixing python/php, adding ability to detect rusts src/main.rs file. Updates all tutorials as well.

See merge request !39
2017-06-05 15:52:31 -07:00
Chad Arimura
dd816dece6 dont upset the java peeps 2017-06-05 14:29:56 -07:00
Chad Arimura
c8fab6f224 changed mind, back to hello-{lang} for better naming of tutorial 2017-06-05 14:27:30 -07:00
Chad Arimura
fea5fbf7b0 update gitignore, remove func.yaml and gitignore for php 2017-06-05 14:15:14 -07:00
Chad Arimura
d72343a697 update all hello examples to use /{language} as the default route instead of /hello, also renamed hello.payload.json to sample.payload.json 2017-06-05 14:07:44 -07:00
Chad Arimura
17bbef04f5 adding rust, fixing python/php, adding ability to detect rusts src/main.rs file 2017-06-05 12:32:23 -07:00
James Jeffrey
b62a73b408 Merge branch 'fix_ignore' into 'master'
Ignore only fn file in fn

See merge request !37
2017-06-02 08:47:14 -07:00
James
b29e4c2564 Ignore only fn file in fn 2017-06-02 08:45:16 -07:00
Travis Reeder
9c67c5024f Added glides files just in case. 2017-06-01 14:30:09 -07:00
Travis Reeder
87ef24fe04 Updated dependencies and fixed issue with fn dependending on version from api. 2017-06-01 13:45:24 -07:00
Matthew Gilliard
77ca8a22b5 Merge branch 'java-support' into 'master'
First iteration of support for Java

See merge request !34
2017-06-01 02:19:37 -07:00
Mukhtar Haji
cd0b68dfb7 First iteration of support for Java 2017-06-01 02:19:37 -07:00
Denis Makogon
82d612a754 Merge branch 'hofn-id' into 'master'
Hot fn ID

See merge request !30
2017-05-31 22:50:31 -07:00
Denis Makogon
007f1982fc Hot fn ID 2017-05-31 22:50:31 -07:00
Travis Reeder
102d025332 Merge branch 'patch-1' into 'master'
Propogate ${FN} outside of `functions/test.sh` script

See merge request !33
2017-05-31 11:58:59 -07:00
Denis Makogon
42b80c19ba Propogating ${FN} outside of test.sh script 2017-05-31 01:12:09 -07:00
Travis Reeder
cbec2d7c12 Updated deps 2017-05-30 16:19:35 -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
James Jeffrey
22dff9b45e Merge branch 'chad-ux-updates' into 'master'
changing url in install script

See merge request !26
2017-05-30 11:32:30 -07:00
Reed Allman
2224aa823a Merge branch 'fix-run-env-vars' into 'master'
Fix run env vars passed in via command line to test locally and updated docs to match.

Closes #29

See merge request !19
2017-05-30 10:54:34 -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
Travis Reeder
7b408468fa Added hello image. 2017-05-30 09:52:44 -07:00
James Jeffrey
2518898b65 Merge branch 'fix-lb-test' into 'master'
Address broken tests

Closes #46

See merge request !29
2017-05-30 08:50:53 -07:00