Giter Club home page Giter Club logo

Comments (13)

alexellis avatar alexellis commented on May 13, 2024 1

It's awesome to see you guys testing FaaS - the limit here is in the gateway rather than the watchdog which I think you've set up correctly. I think I'd consider anything over a few seconds to be asynchronous and that's something I want to tackle through the roadmap.

An asynchronous item would probably return instantly with an ID and allow polling or call back to a URL on completion.

For the time being you could get past the 8 second limit by hacking server.go in the gateway - and I think that's probably something that should be configurable.

Here's the line you'd want to edit -

https://github.com/alexellis/faas/blob/master/gateway/server.go#L65

If you run the ./build.sh file you'll get an image you can swap into your docker-compose file for the gateway called "functions/gateway:latest-dev"

Does that help?

from faas.

alexellis avatar alexellis commented on May 13, 2024 1

@stealthybox @cgpuglie closing this re: fix in #95 #96 - thanks for contributing and hope to see you in the Slack channel.

Did you want to raise another issue to discuss a path prefix?

from faas.

stealthybox avatar stealthybox commented on May 13, 2024

Taking a look right now -- thanks alex!

from faas.

stealthybox avatar stealthybox commented on May 13, 2024

Built and tagged it in our private registry.
Changing those values works 👍

I'll look at adding some config options for the gateway.
A pathPrefix for all of the routes would be helpful in addition to these timeouts.

from faas.

cgpuglie avatar cgpuglie commented on May 13, 2024

from faas.

alexellis avatar alexellis commented on May 13, 2024

Great. Would be interesting to see a minimal example of the scraping contributed online somewhere or as a blog.

Btw you might find the faas-cli useful too - https://blog.alexellis.io/build-and-deploy-with-faas/

What are you thinking re: a path prefix?

from faas.

stealthybox avatar stealthybox commented on May 13, 2024

I still have a draft blog-post for some linuxkit usage on windows I never finished :/

For the path Prefix stuff, I was thinking setting PathPrefix=/faas would result in

/faas/system/alert
/faas/system/functions
/faas/function/...
/faas/ui/
/faas/assets/

Not sure what the best way to do this is in gorilla/mux

from faas.

stealthybox avatar stealthybox commented on May 13, 2024

I'm guessing that for the gateway config, we'd do something similar to what's implemented in watchdog with osEnv and readConfig ?

from faas.

stealthybox avatar stealthybox commented on May 13, 2024

I'm not sure about the Prometheus /metrics endpoint -- can Prometheus be configured to scrape nested routes?

If you're running Prometheus in the network, it's easier to just leave it unchanged, but from outside, it could be problematic to route to.

from faas.

alexellis avatar alexellis commented on May 13, 2024

For now let's look at the timeout config in this issue. Feel free to open separate threads.

from faas.

stealthybox avatar stealthybox commented on May 13, 2024

I'm confused as to why there are two levels of timeout.
Does the gateway re-invoke on bad exit codes within the gateway timeout?

If not, I'd suggest we set the request's timeout values to match the function's service spec if present.
What do you think?

from faas.

alexellis avatar alexellis commented on May 13, 2024

@stealthybox do you want to open another issue to talk about your idea re- prefixes?

from faas.

stealthybox avatar stealthybox commented on May 13, 2024

Yep!
I'll do that tonight

from faas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.